|
@ -873,4 +873,102 @@ public class Games { |
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
return result.substring(0, result.length() - 2); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkPublishersJp() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Publisher_JP FROM Games"; |
|
|
|
|
|
boolean atlus = false; |
|
|
|
|
|
boolean nintendo = false; |
|
|
|
|
|
boolean sega = false; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
|
|
String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); |
|
|
|
|
|
|
|
|
|
|
|
if (atlus && gamePublisherJp.equals("Atlus")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} else if (nintendo && gamePublisherJp.equals("Nintendo")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} else if (sega && gamePublisherJp.equals("Sega")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (gamePublisherJp) { |
|
|
|
|
|
case "Atlus": |
|
|
|
|
|
atlus = true; |
|
|
|
|
|
break; |
|
|
|
|
|
case "Nintendo": |
|
|
|
|
|
nintendo = true; |
|
|
|
|
|
break; |
|
|
|
|
|
case "Sega": |
|
|
|
|
|
sega = true; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result += gamePublisherJp + ", "; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkPublishersNa() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Publisher_NA FROM Games"; |
|
|
|
|
|
boolean atlus = false; |
|
|
|
|
|
boolean nintendo = false; |
|
|
|
|
|
boolean sega = false; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
|
|
String gamePublisherNa = resultSet.getString("Game_Publisher_Na"); |
|
|
|
|
|
|
|
|
|
|
|
if (atlus && gamePublisherNa.equals("Atlus")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} else if (nintendo && gamePublisherNa.equals("Nintendo")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} else if (sega && gamePublisherNa.equals("Sega")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (gamePublisherNa) { |
|
|
|
|
|
case "Atlus": |
|
|
|
|
|
atlus = true; |
|
|
|
|
|
break; |
|
|
|
|
|
case "Nintendo": |
|
|
|
|
|
nintendo = true; |
|
|
|
|
|
break; |
|
|
|
|
|
case "Sega": |
|
|
|
|
|
sega = true; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result += gamePublisherNa + ", "; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
} |
|
|
} |