rs = pstmt.executeQuery();
long rowCount = DAOListCursorUtil.getRowCount(rs);
// Detail Row Number.
int detailRowNum = condition.getDetailRowNum();
DataMap dm = new DataMap();
int dataCnt = 1;
ResultSetMetaData rsMd = rs.getMetaData();
int colCnt = rsMd.getColumnCount();
if(rs != null && detailRowNum > 1 && rs.absolute( detailRowNum - 1 )) {
DataMap data = new DataMap(colCnt);
for(int i = 1; i<=colCnt; i++){
String value = rs.getString(i);
data.put(rsMd.getColumnName(i), value);
}
// RowNum ��d.
data.setRownum(rs.getRow());
dm.setPrevData(data);
}
if(rs != null && rs.absolute( detailRowNum )) {
// DataMap data = new DataMap(colCnt);
for(int i = 1; i<=colCnt; i++){
String value = rs.getString(i);
// data.put(rsMd.getColumnName(i), value);
dm.put(rsMd.getColumnName(i), value);
}
// RowNum ��d.
dm.setRownum(rs.getRow());
//dm.putAll(data);
}
if(rs != null && detailRowNum < rowCount && rs.absolute( detailRowNum + 1 )) {
DataMap data = new DataMap(colCnt);
for(int i = 1; i<=colCnt; i++){
String value = rs.getString(i);
data.put(rsMd.getColumnName(i), value);
}
// RowNum ��d.
data.setRownum(rs.getRow());
dm.setNextData(data);
}
return dm;
}catch(NullPointerException e){
logger.error(e, e);