|
@ -581,4 +581,68 @@ public class Games { |
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
return result.substring(0, result.length() - 2); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkPublisherNintendo() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
|
|
String gameName = resultSet.getString("Game_Name"); |
|
|
|
|
|
String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); |
|
|
|
|
|
String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); |
|
|
|
|
|
String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); |
|
|
|
|
|
|
|
|
|
|
|
if (gamePublisherEu.equals("Nintendo") || gamePublisherJp.equals("Nintendo") || gamePublisherNa.equals("Nintendo")) { |
|
|
|
|
|
result += gameName + ", "; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkPublisherSega() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
|
|
String gameName = resultSet.getString("Game_Name"); |
|
|
|
|
|
String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); |
|
|
|
|
|
String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); |
|
|
|
|
|
String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); |
|
|
|
|
|
|
|
|
|
|
|
if (gamePublisherEu.equals("Sega") || gamePublisherJp.equals("Sega") || gamePublisherNa.equals("Sega")) { |
|
|
|
|
|
result += gameName + ", "; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
} |
|
|
} |