diff --git a/src/engine/db/handlers/dbGuildHandler.java b/src/engine/db/handlers/dbGuildHandler.java index fcebe3ac..7a61f1a7 100644 --- a/src/engine/db/handlers/dbGuildHandler.java +++ b/src/engine/db/handlers/dbGuildHandler.java @@ -695,87 +695,4 @@ public class dbGuildHandler extends dbHandlerBase { } } - //TODO uncomment this when finished with guild history warehouse integration -// public HashMap GET_WAREHOUSE_GUILD_HISTORY(){ -// -// HashMap tempMap = new HashMap<>(); -// prepareCallable("SELECT * FROM `warehouse_guildhistory` WHERE `eventType` = 'CREATE'"); -// try { -// ResultSet rs = executeQuery(); -// -// while (rs.next()) { -// GuildRecord guildRecord = new GuildRecord(rs); -// tempMap.put(guildRecord.guildID, guildRecord); -// } -// }catch (Exception e){ -// Logger.error(e); -// } -// return tempMap; -// -// } - - public ArrayList LOAD_CHARTER_RACE_RESTRICTIONS(String name){ - ArrayList reqRaces= new ArrayList<>(); - try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `lore_charter_restrictions` WHERE `GUILDTYPE` = ?")) { - - preparedStatement.setString(1, name); - ResultSet rs = preparedStatement.executeQuery(); - - while (rs.next()) { - String read = rs.getString("RACE_REQUIRED"); - if(read != null){ - for(String entry : read.split(";")) - reqRaces.add(Enum.MonsterType.valueOf(entry.replace("-",""))); - } - } - - } catch (SQLException e) { - Logger.error(e); - } - - return reqRaces; - } - public ArrayList LOAD_CHARTER_CLASS_RESTRICTIONS(String name){ - ArrayList reqClasses= new ArrayList<>(); - try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `lore_charter_restrictions` WHERE `GUILDTYPE` = ?")) { - - preparedStatement.setString(1, name); - ResultSet rs = preparedStatement.executeQuery(); - - while (rs.next()) { - String read = rs.getString("CLASS_REQUIRED"); - if(read != null){ - for(String entry : read.split(";")) - reqClasses.add(Enum.PromoteType.valueOf(entry)); - } - } - - } catch (SQLException e) { - Logger.error(e); - } - - return reqClasses; - } - public Enum.SexType LOAD_CHARTER_SEX_RESTRICTIONS(String name){ - try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `lore_charter_restrictions` WHERE `GUILDTYPE` = ?")) { - - preparedStatement.setString(1, name); - ResultSet rs = preparedStatement.executeQuery(); - - while (rs.next()) { - String read = rs.getString("SEX_REQUIRED"); - if(read != null){ - if(read == "Female") - return Enum.SexType.FEMALE; - } - } - - } catch (SQLException e) { - Logger.error(e); - } - return Enum.SexType.NONE; - } }