|
@ -1585,4 +1585,62 @@ public class Games { |
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
return result.substring(0, result.length() - 2); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkPegiEighteen() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Name, Game_PEGI_Rating 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"); |
|
|
|
|
|
int gamePegi = resultSet.getInt("Game_PEGI_Rating"); |
|
|
|
|
|
|
|
|
|
|
|
if (gamePegi == 18) { |
|
|
|
|
|
result += gameName + ", "; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String checkPegiUnknown() { |
|
|
|
|
|
String result = ""; |
|
|
|
|
|
String query = "SELECT Game_Name, Game_PEGI_Rating 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"); |
|
|
|
|
|
int gamePegi = resultSet.getInt("Game_PEGI_Rating"); |
|
|
|
|
|
|
|
|
|
|
|
if (gamePegi == 0) { |
|
|
|
|
|
result += gameName + ", "; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
statement.close(); |
|
|
|
|
|
connection.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
|
|
} |
|
|
} |
|
|
} |