T - the object typepublic class RemoteResultSetCursorImpl<T extends PersistentDomainObject<T>> extends org.tentackle.persist.rmi.RemoteDelegateImpl<T> implements RemoteResultSetCursor<T>
ResultSetCursor.| Constructor and Description |
|---|
RemoteResultSetCursorImpl(RemoteDbSessionImpl session,
Class<T> clazz)
Creates a remote cursor delegate.
|
| Modifier and Type | Method and Description |
|---|---|
int |
afterLast()
Positions the cursor after the last row.
Works even for empty cursors. |
void |
beforeFirst()
Positions the cursor before the first row.
Works even for empty cursors. |
void |
close()
Closes the scrollable resource.
The scrollable resource is opened in its constructor. |
void |
configureDelegate(Object... args)
Configures the delegate.
|
RemoteException |
createException(Throwable t)
Creates a remote exception.
|
ResultSetCursor.FetchList<T> |
fetch()
Fetches the next objects up to the fetchsize.
This method is provided to minimize the number of roundtrips especially for remote cursors. |
boolean |
first()
Rewinds the cursor to the first row.
|
T |
get()
Gets the data object of the current row.
|
ResultSetCursor<T> |
getCursor()
Gets the local cursor.
|
int |
getFetchDirection()
Gets the fetch direction.
|
int |
getFetchSize()
Gets the fetchsize.
|
boolean |
isAfterLast()
Checks whether the cursor is after the last row.
|
int |
last()
Positions the cursor on the last row.
|
boolean |
next()
Moves the cursor to the next row.
|
boolean |
previous()
Moves the cursor to the previous row.
|
int |
scroll(int rows)
Moves the cursor a given number of rows.
|
void |
setCursor(ResultSetCursor<T> cursor)
Sets the local cursor.
|
void |
setFetchDirection(int direction)
Sets the fetch direction.
|
void |
setFetchSize(int rows)
Sets the fetchsize.
This is the number of rows the cursor will fetch from the server in one batch. |
int |
setRow(int row)
Sets the cursor to a given row.
Row numbers start at 1. |
List<T> |
toList()
Returns the objects of this cursor as a list.
|
getServerSession, getServicedClass, getSession, initialize, toStringpublic RemoteResultSetCursorImpl(RemoteDbSessionImpl session, Class<T> clazz) throws RemoteException
session - is the RMI sessionclazz - is the subclass of DbObjectRemoteException - if creation failedpublic void configureDelegate(Object... args)
Invoked from RemoteDbSessionImpl.createRemoteDelegateInstance(java.lang.Class<T>, java.lang.Class<I>, java.lang.Class<?>, java.lang.Class<?>, java.lang.Object...) by reflection.
args - the configuration paramaterspublic void setCursor(ResultSetCursor<T> cursor)
cursor - the cursorpublic ResultSetCursor<T> getCursor()
public int afterLast()
throws RemoteException
RemoteResultSetCursorafterLast in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic void beforeFirst()
throws RemoteException
RemoteResultSetCursorbeforeFirst in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic void close()
throws RemoteException
RemoteResultSetCursorclose in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic boolean first()
throws RemoteException
RemoteResultSetCursorfirst in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic T get() throws RemoteException
RemoteResultSetCursorget in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic boolean isAfterLast()
throws RemoteException
RemoteResultSetCursorisAfterLast in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic int last()
throws RemoteException
RemoteResultSetCursorlast in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic boolean next()
throws RemoteException
RemoteResultSetCursornext in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic boolean previous()
throws RemoteException
RemoteResultSetCursorprevious in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic int setRow(int row)
throws RemoteException
RemoteResultSetCursorsetRow in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>row - the row number (must be ≥ 0)RemoteExceptionpublic int scroll(int rows)
throws RemoteException
RemoteResultSetCursorscroll in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>rows - the number of rows to move, negative to move backwardsRemoteExceptionpublic List<T> toList() throws RemoteException
RemoteResultSetCursortoList in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic void setFetchSize(int rows)
throws RemoteException
RemoteResultSetCursorsetFetchSize in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>rows - the fetchsizeRemoteExceptionpublic int getFetchSize()
throws RemoteException
RemoteResultSetCursorgetFetchSize in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic void setFetchDirection(int direction)
throws RemoteException
RemoteResultSetCursorsetFetchDirection in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>direction - the direction, see ResultSet.setFetchDirection(int).RemoteExceptionpublic int getFetchDirection()
throws RemoteException
RemoteResultSetCursorgetFetchDirection in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic ResultSetCursor.FetchList<T> fetch() throws RemoteException
RemoteResultSetCursorfetch in interface RemoteResultSetCursor<T extends PersistentDomainObject<T>>RemoteExceptionpublic RemoteException createException(Throwable t)
org.tentackle.persist.rmi.RemoteDelegateImplcreateException in class org.tentackle.persist.rmi.RemoteDelegateImpl<T extends PersistentDomainObject<T>>t - the causeCopyright © 2016 Krake Softwaretechnik. All rights reserved.