newnoise, SHiv16, I apologize, I made a wrong copy-paste. This is the code of getGameDayList procedure
public List<GameDay> getGameDayList() {
// TODO Auto-generated method stub
List<GameDay> v_game_day_list = new ArrayList<GameDay>();
GameDay v_game_day_tmp = new GameDay();
String v_sql_statement;
try {
v_sql_statement = "SELECT T1.\"game_day_id\",T1.\"game_day_date\",T1.\"game_day_competition\","
+ " T1.\"game_day_season\",T1.\"game_day_cup_fl\",T1.\"game_day_order\""
+ " FROM \"game_days\" T1 ORDER BY T1.\"game_day_order\" DESC";
System.out.println(" ------- ------- -------");
System.out.println("classe ODBConnectionImpl");
System.out.println("getGameDayList");
System.out.println("esecuzione statement " + v_sql_statement);
ResultSet rs = Connection2DB.resultset(v_sql_statement);
System.out.println("query eseguita");
int i = 0;
System.out.println("#########################################");
System.out.println("ODBConnectionImpl");
System.out.println("Start creating the list");
while (rs.next()) {
v_game_day_tmp.getGameDay(rs.getDate("game_day_date"),
rs.getString("game_day_competition"),
rs.getString("game_day_season"),
rs.getBoolean("game_day_cup_fl"),
rs.getInt("game_day_id"), rs.getInt("game_day_order"));
System.out.println("scanning resultset");
System.out.println("v_game_day_tmp.getGameDayCompetition()="+v_game_day_tmp.getGameDayCompetition());
System.out.println("v_game_day_tmp.getGameDayCupFl()="+v_game_day_tmp.getGameDayCupFl());
System.out.println("v_game_day_tmp.getGameDayId()="+v_game_day_tmp.getGameDayId());
System.out.println("v_game_day_tmp.getGameDayOrder()"+v_game_day_tmp.getGameDayOrder());
System.out.println("v_game_day_tmp.getGameDaySeason()"+v_game_day_tmp.getGameDaySeason());
System.out.println(i);
v_game_day_list.add(v_game_day_tmp);
System.out.println("index="+i);
System.out.println("v_game_day_list.get(i).getGameDayCompetition()="+v_game_day_list.get(i).getGameDayCompetition());
System.out.println("v_game_day_list.get(i).getGameDayCupFl()="+v_game_day_list.get(i).getGameDayCupFl());
System.out.println("v_game_day_list.get(i).getGameDayId()="+v_game_day_list.get(i).getGameDayId());
System.out.println("v_game_day_list.get(i).getGameDayOrder()="+v_game_day_list.get(i).getGameDayOrder());
System.out.println("v_game_day_list.get(i).getGameDaySeason()="+v_game_day_list.get(i).getGameDaySeason());
i++;
}
for(i=0;i<v_game_day_list.size();i++)
System.out.println("secondo loop v_game_day_list.get(i).getGameDayId()="+v_game_day_list.get(i).getGameDayId());
System.out.println("list created");
return v_game_day_list;
} catch (SQLException e) {
System.out.println("ODBConnectionImpl SQLException: "
+ e.toString());
return null;
} catch (ParseException e) {
System.out.println("ODBConnectionImpl ParseException: "
+ e.toString());
return null;
}
}
And this is the code of shared class GameDay:
package com.fantaprica.shared;
import java.util.Date;
import java.io.Serializable;
@SuppressWarnings("serial")
public class GameDay implements Serializable {
private int v_game_day_id;
private Date v_game_day_date;
private String v_game_day_competition;
private String v_game_day_season;
private boolean v_game_day_cup_fl;
private int v_game_day_order;
public GameDay() {
// TODO Auto-generated constructor stub
}
// questo metodo viene uitilizzato per l'UPDATE
public void setGameDay(int p_game_day_id,Date p_game_day_date, String p_game_day_competition,
String p_game_day_season, boolean p_game_day_cup_fl) {
v_game_day_id = p_game_day_id;
v_game_day_date = p_game_day_date;
v_game_day_competition = p_game_day_competition;
v_game_day_season = p_game_day_season;
v_game_day_cup_fl = p_game_day_cup_fl;
}
// questo metodo viene utilizzato per l'INSERT
public void setGameDay(Date p_game_day_date, String p_game_day_competition,
String p_game_day_season, boolean p_game_day_cup_fl) {
v_game_day_date = p_game_day_date;
v_game_day_competition = p_game_day_competition;
v_game_day_season = p_game_day_season;
v_game_day_cup_fl = p_game_day_cup_fl;
}
public void getGameDay(Date p_game_day_date, String p_game_day_competition,
String p_game_day_season, boolean p_game_day_cup_fl,
int p_game_day_id, int p_game_day_order) {
v_game_day_date = p_game_day_date;
v_game_day_competition = p_game_day_competition;
v_game_day_season = p_game_day_season;
v_game_day_cup_fl = p_game_day_cup_fl;
v_game_day_id = p_game_day_id;
v_game_day_order = p_game_day_order;
}
public Date getGameDayDate() {
return v_game_day_date;
}
public String getGameDayCompetition() {
return v_game_day_competition;
}
public String getGameDaySeason() {
return v_game_day_season;
}
public boolean getGameDayCupFl() {
return v_game_day_cup_fl;
}
public int getGameDayId() {
return v_game_day_id;
}
public int getGameDayOrder() {
return v_game_day_order;
}
}
I read that the problem could be a "static" implementation of the attribute of thr class, it's not this case, as GameDay class has no static attribute
Dario