|
|
@ -647,4 +647,187 @@ public class Games { |
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
} |
|
|
|
|
|
|
|
public String checkPublishers() { |
|
|
|
String result = ""; |
|
|
|
String query = "SELECT Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; |
|
|
|
boolean sega = false; |
|
|
|
boolean atlus = false; |
|
|
|
boolean sce = false; |
|
|
|
boolean nintendo = false; |
|
|
|
boolean namco = false; |
|
|
|
boolean spikeChun = false; |
|
|
|
boolean bandaiNamco = false; |
|
|
|
boolean activision = false; |
|
|
|
boolean whileSwitchOne = true; |
|
|
|
boolean whileSwitchTwo = true; |
|
|
|
|
|
|
|
try { |
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); |
|
|
|
String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); |
|
|
|
String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); |
|
|
|
|
|
|
|
while (whileSwitchOne) { |
|
|
|
while (whileSwitchTwo) { |
|
|
|
if (sega && gamePublisherEu.equals("Sega")) { |
|
|
|
break; |
|
|
|
} else if (atlus && gamePublisherEu.equals("Atlus")) { |
|
|
|
break; |
|
|
|
} else if (sce && gamePublisherEu.equals("Sony Computer Entertainment")) { |
|
|
|
break; |
|
|
|
} else if (nintendo && gamePublisherEu.equals("Nintendo")) { |
|
|
|
break; |
|
|
|
} else if (namco && gamePublisherEu.equals("Namco")) { |
|
|
|
break; |
|
|
|
} else if (spikeChun && gamePublisherEu.equals("Spike Chunsoft")) { |
|
|
|
break; |
|
|
|
} else if (bandaiNamco && gamePublisherEu.equals("Bandai Namco Games")) { |
|
|
|
break; |
|
|
|
} else if (activision && gamePublisherEu.equals("Activision")) { |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
switch (gamePublisherEu) { |
|
|
|
case "Sega": |
|
|
|
sega = true; |
|
|
|
break; |
|
|
|
case "Atlus": |
|
|
|
atlus = true; |
|
|
|
break; |
|
|
|
case "Sony Computer Entertainment": |
|
|
|
sce = true; |
|
|
|
break; |
|
|
|
case "Nintendo": |
|
|
|
nintendo = true; |
|
|
|
break; |
|
|
|
case "Namco": |
|
|
|
namco = true; |
|
|
|
break; |
|
|
|
case "Spike Chunsoft": |
|
|
|
spikeChun = true; |
|
|
|
break; |
|
|
|
case "Bandai Namco Games": |
|
|
|
bandaiNamco = true; |
|
|
|
break; |
|
|
|
case "Activision": |
|
|
|
activision = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
result += gamePublisherEu + ", "; |
|
|
|
break; |
|
|
|
} |
|
|
|
if (sega && gamePublisherJp.equals("Sega")) { |
|
|
|
break; |
|
|
|
} else if (atlus && gamePublisherJp.equals("Atlus")) { |
|
|
|
break; |
|
|
|
} else if (sce && gamePublisherJp.equals("Sony Computer Entertainment")) { |
|
|
|
break; |
|
|
|
} else if (nintendo && gamePublisherJp.equals("Nintendo")) { |
|
|
|
break; |
|
|
|
} else if (namco && gamePublisherJp.equals("Namco")) { |
|
|
|
break; |
|
|
|
} else if (spikeChun && gamePublisherJp.equals("Spike Chunsoft")) { |
|
|
|
break; |
|
|
|
} else if (bandaiNamco && gamePublisherJp.equals("Bandai Namco Games")) { |
|
|
|
break; |
|
|
|
} else if (activision && gamePublisherJp.equals("Activision")) { |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
switch (gamePublisherJp) { |
|
|
|
case "Sega": |
|
|
|
sega = true; |
|
|
|
break; |
|
|
|
case "Atlus": |
|
|
|
atlus = true; |
|
|
|
break; |
|
|
|
case "Sony Computer Entertainment": |
|
|
|
sce = true; |
|
|
|
break; |
|
|
|
case "Nintendo": |
|
|
|
nintendo = true; |
|
|
|
break; |
|
|
|
case "Namco": |
|
|
|
namco = true; |
|
|
|
break; |
|
|
|
case "Spike Chunsoft": |
|
|
|
spikeChun = true; |
|
|
|
break; |
|
|
|
case "Bandai Namco Games": |
|
|
|
bandaiNamco = true; |
|
|
|
break; |
|
|
|
case "Activision": |
|
|
|
activision = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
result += gamePublisherJp + ", "; |
|
|
|
break; |
|
|
|
} |
|
|
|
if (sega && gamePublisherNa.equals("Sega")) { |
|
|
|
continue; |
|
|
|
} else if (atlus && gamePublisherNa.equals("Atlus")) { |
|
|
|
continue; |
|
|
|
} else if (sce && gamePublisherNa.equals("Sony Computer Entertainment")) { |
|
|
|
continue; |
|
|
|
} else if (nintendo && gamePublisherNa.equals("Nintendo")) { |
|
|
|
continue; |
|
|
|
} else if (namco && gamePublisherNa.equals("Namco")) { |
|
|
|
continue; |
|
|
|
} else if (spikeChun && gamePublisherNa.equals("Spike Chunsoft")) { |
|
|
|
continue; |
|
|
|
} else if (bandaiNamco && gamePublisherNa.equals("Bandai Namco Games")) { |
|
|
|
continue; |
|
|
|
} else if (activision && gamePublisherNa.equals("Activision")) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
switch (gamePublisherNa) { |
|
|
|
case "Sega": |
|
|
|
sega = true; |
|
|
|
break; |
|
|
|
case "Atlus": |
|
|
|
atlus = true; |
|
|
|
break; |
|
|
|
case "Sony Computer Entertainment": |
|
|
|
sce = true; |
|
|
|
break; |
|
|
|
case "Nintendo": |
|
|
|
nintendo = true; |
|
|
|
break; |
|
|
|
case "Namco": |
|
|
|
namco = true; |
|
|
|
break; |
|
|
|
case "Spike Chunsoft": |
|
|
|
spikeChun = true; |
|
|
|
break; |
|
|
|
case "Bandai Namco Games": |
|
|
|
bandaiNamco = true; |
|
|
|
break; |
|
|
|
case "Activision": |
|
|
|
activision = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
result += gamePublisherNa + ", "; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
statement.close(); |
|
|
|
connection.close(); |
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
} |
|
|
|
} |