Add teams for wtl pokal
This commit is contained in:
@@ -24,7 +24,7 @@ public abstract class TLWMatchesCreatorBase {
|
||||
|
||||
// Add matches from config
|
||||
for(TLWMatch match : tlwMatches) {
|
||||
sql += match.getSQLQueryInsert() + "\n";
|
||||
sql += match.getSQLQueryReplace() + "\n";
|
||||
}
|
||||
|
||||
return sql;
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package de.jeyp91.tippliga;
|
||||
|
||||
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class TLWTeamsCreator {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(TLWTeamsCreator.class);
|
||||
int season;
|
||||
int league;
|
||||
ArrayList<TLWMatch> matches;
|
||||
@@ -36,6 +40,10 @@ public class TLWTeamsCreator {
|
||||
String sql = "";
|
||||
for (Integer id : teamIds) {
|
||||
ArrayList<TLWTeam> teams = connector.getTeams(String.valueOf(id));
|
||||
if(teams.size() == 0) {
|
||||
this.logger.error("Did not find team id " + id.toString());
|
||||
continue;
|
||||
}
|
||||
String teamName = teams.get(0).getTeamName();
|
||||
String teamNameShort = teams.get(0).getTeamNameShort();
|
||||
String teamSymbol = teams.get(0).getTeamSymbol();
|
||||
|
||||
Reference in New Issue
Block a user