|
@ -538,4 +538,47 @@ public class Games { |
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
return result.substring(0, result.length() - 2); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkDevelopers() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Developer FROM Games"; |
|
|
|
|
|
boolean atlus = false; |
|
|
|
|
|
boolean nintendoSpd = false; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
|
|
String gameDeveloper = resultSet.getString("Game_Developer"); |
|
|
|
|
|
|
|
|
|
|
|
if (atlus && gameDeveloper.equals("Atlus")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} else if (nintendoSpd && gameDeveloper.equals("Nintendo SPD")) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (gameDeveloper) { |
|
|
|
|
|
case "Atlus": |
|
|
|
|
|
atlus = true; |
|
|
|
|
|
break; |
|
|
|
|
|
case "Nintendo SPD": |
|
|
|
|
|
nintendoSpd = true; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result += gameDeveloper + ", "; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
} |
|
|
} |