Methods Summary |
---|
public void | afterLast()
try {
getResultSet().afterLast();
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"exception calling afterLast()"
);
}
|
public void | beforeFirst()
try {
getResultSet().beforeFirst();
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"exception calling beforeFirst()"
);
}
|
public boolean | first()
try {
boolean result = getResultSet().first();
prepareCurrentRow(result);
return result;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"could not advance using first()"
);
}
|
protected java.lang.Object[] | getCurrentRow()
return currentRow;
|
public int | getRowNumber()
try {
return getResultSet().getRow()-1;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"exception calling getRow()"
);
}
|
public boolean | isFirst()
try {
return getResultSet().isFirst();
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"exception calling isFirst()"
);
}
|
public boolean | isLast()
try {
return getResultSet().isLast();
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"exception calling isLast()"
);
}
|
public boolean | last()
try {
boolean result = getResultSet().last();
prepareCurrentRow(result);
return result;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"could not advance using last()"
);
}
|
public boolean | next()
try {
boolean result = getResultSet().next();
prepareCurrentRow(result);
return result;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"could not advance using next()"
);
}
|
private void | prepareCurrentRow(boolean underlyingScrollSuccessful)
if (!underlyingScrollSuccessful) {
currentRow = null;
return;
}
Object result = getLoader().loadSingleRow(
getResultSet(),
getSession(),
getQueryParameters(),
false
);
if ( result != null && result.getClass().isArray() ) {
currentRow = (Object[]) result;
}
else {
currentRow = new Object[] { result };
}
if ( getHolderInstantiator() != null ) {
currentRow = new Object[] { getHolderInstantiator().instantiate(currentRow) };
}
afterScrollOperation();
|
public boolean | previous()
try {
boolean result = getResultSet().previous();
prepareCurrentRow(result);
return result;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"could not advance using previous()"
);
}
|
public boolean | scroll(int i)
try {
boolean result = getResultSet().relative(i);
prepareCurrentRow(result);
return result;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"could not advance using scroll()"
);
}
|
public boolean | setRowNumber(int rowNumber)
if (rowNumber>=0) rowNumber++;
try {
boolean result = getResultSet().absolute(rowNumber);
prepareCurrentRow(result);
return result;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert(
getSession().getFactory().getSQLExceptionConverter(),
sqle,
"could not advance using absolute()"
);
}
|