Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

JCursorImpl (jremote API)

Class JCursorImpl


All Implemented Interfaces:
JCursor, JSelectList, Iterable<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


Constructor Summary

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


Method Summary

Modifier and Type
Method and Description
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.

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()

Back to jREMOTE API

Was this article helpful?