52 lines
1.3 KiB
Java
52 lines
1.3 KiB
Java
package de.jeyp91.tippliga;
|
|
|
|
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
|
|
public class TLWLeague {
|
|
|
|
private Integer season = null;
|
|
private Integer league = null;
|
|
private String leagueName = null;
|
|
private String leagueNameShort = null;
|
|
|
|
public TLWLeague(ResultSet rset) {
|
|
final int SEASON = 1;
|
|
final int LEAGUE = 2;
|
|
final int LEAGUE_NAME = 3;
|
|
final int LEAGUE_NAME_SHORT = 4;
|
|
try {
|
|
this.season = Integer.parseInt(rset.getString(SEASON));
|
|
this.league = Integer.parseInt(rset.getString(LEAGUE));
|
|
this.leagueName = rset.getString(LEAGUE_NAME);
|
|
this.leagueNameShort = rset.getString(LEAGUE_NAME_SHORT);
|
|
} catch (SQLException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public Integer getSeason() {
|
|
return this.season;
|
|
}
|
|
|
|
public Integer getLeague() {
|
|
return this.league;
|
|
}
|
|
|
|
public String getLeagueName() {
|
|
return this.leagueName;
|
|
}
|
|
|
|
public String getLeagueNameShort() {
|
|
return this.leagueNameShort;
|
|
}
|
|
|
|
public String getLeagueNameCalendar() {
|
|
String leagueName = this.leagueName;
|
|
if (leagueName.equals("1. Tippliga Würzburg") || leagueName.equals("2. Tippliga Würzburg")) {
|
|
leagueName = "Tippliga";
|
|
}
|
|
return leagueName;
|
|
}
|
|
}
|