jremote jbase5.2.1

com.jbase.jremote.io
Class JCursorImpl

java.lang.Object
  extended by com.jbase.jremote.io.JSelectListImpl
      extended by com.jbase.jremote.io.JCursorImpl
All Implemented Interfaces:
JCursor, JSelectList, java.lang.Iterable<java.lang.String>

public class JCursorImpl
extends JSelectListImpl
implements JCursor

A cursor to a jBASE file.

This object represents a list of jBASE file records.


Field Summary
 
Fields inherited from class com.jbase.jremote.io.JSelectListImpl
connection, cursorStartPos, data, FETCH_BACKWARD, FETCH_FORWARD, fetchSize
 
Constructor Summary
JCursorImpl(AbstractJRemoteConnection connection, JSelectListProt data)
          Constructs a cursor from a serializable select list.
 
Method Summary
 void close()
          Close cursor.
 JDynArray getRecord()
          Returns the current record.
 boolean hasNext()
          Returns whether it is possible to move the cursor forwards.
 boolean hasPrevious()
          Returns whether it is possible to move the cursor backwards.
 boolean next()
          Move cursor to next item
 boolean previous()
          Move cursor to previous item
 void setRecord(JDynArray record)
          Modifies the current record.
 void update()
          Update changes.
 
Methods inherited from class com.jbase.jremote.io.JSelectListImpl
fetchNext, fetchPrevious, getData, getFetchSize, getKey, getPosition, goToPosition, hasNext, hasPrevious, iterator, next, previous, setConnection, setFetchSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jbase.jremote.JSelectList
getFetchSize, getKey, getPosition, goToPosition, iterator, setFetchSize
 

Constructor Detail

JCursorImpl

public JCursorImpl(AbstractJRemoteConnection connection,
                   JSelectListProt data)
Constructs a cursor from a serializable select list.

Parameters:
connection - Connection handle used to fetch records from the server
data - Serializable select list
Method Detail

next

public boolean next()
             throws JRemoteException
Move cursor to next item

Specified by:
next in interface JSelectList
Overrides:
next in class JSelectListImpl
Returns:
true if OK, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.next()

previous

public boolean previous()
                 throws JRemoteException
Move cursor to previous item

Specified by:
previous in interface JSelectList
Overrides:
previous in class JSelectListImpl
Returns:
true if OK, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.previous()

hasNext

public boolean hasNext()
                throws JRemoteException
Returns whether it is possible to move the cursor forwards.

Specified by:
hasNext in interface JSelectList
Overrides:
hasNext in class JSelectListImpl
Returns:
true if YES, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.hasNext()

hasPrevious

public boolean hasPrevious()
                    throws JRemoteException
Returns whether it is possible to move the cursor backwards.

Specified by:
hasPrevious in interface JSelectList
Overrides:
hasPrevious in class JSelectListImpl
Returns:
true if YES, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.hasPrevious()

close

public void close()
           throws JRemoteException
Close cursor. Applies all pending changes and request the server to release all resources associated to this cursor.

Specified by:
close in interface JSelectList
Overrides:
close in class JSelectListImpl
Throws:
JRemoteException
See Also:
JSelectList.close()

getRecord

public JDynArray getRecord()
Description copied from interface: JCursor
Returns the current record.

Specified by:
getRecord in interface JCursor
Returns:
record value
See Also:
JCursor.getRecord()

setRecord

public void setRecord(JDynArray record)
Description copied from interface: JCursor
Modifies the current record. Changes are not applied until methods update() or close() are called.

Specified by:
setRecord in interface JCursor
See Also:
JCursor.setRecord(com.jbase.jremote.JDynArray)

update

public void update()
            throws JRemoteException
Description copied from interface: JCursor
Update changes. This method will apply all pending changes to the cursor.

Specified by:
update in interface JCursor
Throws:
JRemoteException
See Also:
JCursor.update()

jremote jbase5.2.1

Copyright © 2010 TEMENOS. All Rights Reserved.