Refactor and clean up code
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user