Refactor and clean up code

This commit is contained in:
2020-09-27 23:27:07 +02:00
parent d18100eb2d
commit 8144831b6e
20 changed files with 349 additions and 373 deletions
+14 -9
View File
@@ -17,7 +17,7 @@ public class TLWTeam {
private String groupId;
private int matchday;
public TLWTeam(ResultSet rset) throws SQLException {
public TLWTeam(ResultSet rset) {
final int SEASON = 1;
final int LEAGUE = 2;
final int TEAM_ID = 3;
@@ -27,14 +27,19 @@ public class TLWTeam {
final int GROUP_ID = 7;
final int MATCHDAY = 8;
this.season = Integer.parseInt(rset.getString(SEASON));
this.league = Integer.parseInt(rset.getString(LEAGUE));
this.teamId = Integer.parseInt(rset.getString(TEAM_ID));
this.teamName = rset.getString(TEAM_NAME);
this.teamNameShort = rset.getString(TEAM_NAME_SHORT);
this.teamSymbol = rset.getString(TEAM_SYMBOL);
this.groupId = rset.getString(GROUP_ID);
this.matchday = Integer.parseInt(rset.getString(MATCHDAY));
try {
this.season = Integer.parseInt(rset.getString(SEASON));
this.league = Integer.parseInt(rset.getString(LEAGUE));
this.teamId = Integer.parseInt(rset.getString(TEAM_ID));
this.teamName = rset.getString(TEAM_NAME);
this.teamNameShort = rset.getString(TEAM_NAME_SHORT);
this.teamSymbol = rset.getString(TEAM_SYMBOL);
this.groupId = rset.getString(GROUP_ID);
this.matchday = Integer.parseInt(rset.getString(MATCHDAY));
} catch (SQLException e) {
/* TODO */
e.printStackTrace();
}
}
public int getSeason() {