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?

JSelectListImpl (jremote API)

Class JSelectListImpl


All Implemented Interfaces:
JSelectList, Iterable<String>
Direct Known Subclasses:
JCursorImpl


public class JSelectListImpl
extends Object
implements JSelectList

A select list to a jBASE file.

This object represents a list of record keys to a jBASE file.

Field Summary

Modifier and Type
Field and Description
protected AbstractJRemoteConnection
connection 
protected int
cursorStartPos 
protected JSelectListProt
data 
protected static int
FETCH_BACKWARD 
protected static int
FETCH_FORWARD 
protected int
fetchSize 


Constructor Summary

Constructor and Description
JSelectListImpl(AbstractJRemoteConnection connection, JDynArray keys)
Constructs a select list from specified dynamic array.
JSelectListImpl(AbstractJRemoteConnection connection, JSelectListProt data)
Constructs a select list from a serializable select list.


Method Summary

Modifier and Type
Method and Description
void
close()
Close select list.
protected JSelectListProt
fetchNext(boolean fetchData) 
protected JSelectListProt
fetchPrevious(boolean fetchData) 
JSelectListProt
getData()
Obtains a reference to the serializable part of the select list
int
getFetchSize()
Returns the fetch size.
String
getKey()
Returns the current key
int
getPosition()
Returns the current position.
void
goToPosition(int targetPos)
Move to the specified position.
boolean
hasNext()
Returns whether it is possible to move forward.
protected boolean
hasNext(boolean fetchData) 
boolean
hasPrevious()
Returns whether it is possible to move backwards.
protected boolean
hasPrevious(boolean fetchData) 
Iterator<String>
iterator()
Returns an iterator to the select list
boolean
next()
Move to next item
protected boolean
next(boolean fetchData) 
boolean
previous()
Move to previous item
protected boolean
previous(boolean fetchData) 
void
setConnection(AbstractJRemoteConnection connection)
Attaches a connection handle to this select list.
void
setFetchSize(int fetchSize)
Sets the fetch size.
  • Methods inherited from class java.lang.Object
    • clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Methods inherited from interface java.lang.Iterable
    • forEach, spliterator

Field Detail

connection

protected AbstractJRemoteConnection connection


data

protected JSelectListProt data


fetchSize

protected int fetchSize


cursorStartPos

protected int cursorStartPos


FETCH_FORWARD

protected static final int FETCH_FORWARD
See Also:
Constant Field Values


FETCH_BACKWARD

protected static final int FETCH_BACKWARD
See Also:
Constant Field Values


Constructor Detail

JSelectListImpl

public JSelectListImpl(AbstractJRemoteConnection connection,
                       JDynArray keys)
Constructs a select list from specified dynamic array.
Parameters:
connection - Connection handle used to fetch items from server
keys - Dynamic array containing keys separated by attribute markers.


JSelectListImpl

public JSelectListImpl(AbstractJRemoteConnection connection,
                       JSelectListProt data)
Constructs a select list from a serializable select list.
Parameters:
connection - Connection handle used to fetch items from server
data - Serializable select list


Method Detail

getKey

public String getKey()
Description copied from interface: JSelectList
Returns the current key
Specified by:
getKey in interface JSelectList
Returns:
key
See Also:
JSelectList.getKey()


getFetchSize

public int getFetchSize()
Description copied from interface: JSelectList
Returns the fetch size. This value represents the number of items fetched simultaneously from the server.
Specified by:
getFetchSize in interface JSelectList
Returns:
fetch size
See Also:
JSelectList.getFetchSize()


setFetchSize

public void setFetchSize(int fetchSize)
Description copied from interface: JSelectList
Sets the fetch size.
Specified by:
setFetchSize in interface JSelectList
Parameters:
fetchSize - fetch size
See Also:
JSelectList.setFetchSize(int)


setConnection

public void setConnection(AbstractJRemoteConnection connection)
Attaches a connection handle to this select list. A connection is required to fetch items from the server.
Parameters:
connection - Connection handle


getData

public JSelectListProt getData()
Obtains a reference to the serializable part of the select list
Returns:
serializable select list


next

public boolean next()
             throws JRemoteException
Description copied from interface: JSelectList
Move to next item
Specified by:
next in interface JSelectList
Returns:
true if OK, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.next()


previous

public boolean previous()
                 throws JRemoteException
Description copied from interface: JSelectList
Move to previous item
Specified by:
previous in interface JSelectList
Returns:
true if OK, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.previous()


hasNext

public boolean hasNext()
                throws JRemoteException
Description copied from interface: JSelectList
Returns whether it is possible to move forward.
Specified by:
hasNext in interface JSelectList
Returns:
true if YES, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.hasNext()


hasPrevious

public boolean hasPrevious()
                    throws JRemoteException
Description copied from interface: JSelectList
Returns whether it is possible to move backwards.
Specified by:
hasPrevious in interface JSelectList
Returns:
true if YES, false otherwise
Throws:
JRemoteException
See Also:
JSelectList.hasPrevious()


next

protected boolean next(boolean fetchData)
                throws JRemoteException
Throws:
JRemoteException


previous

protected boolean previous(boolean fetchData)
                    throws JRemoteException
Throws:
JRemoteException


hasNext

protected boolean hasNext(boolean fetchData)
                   throws JRemoteException
Throws:
JRemoteException


hasPrevious

protected boolean hasPrevious(boolean fetchData)
                       throws JRemoteException
Throws:
JRemoteException


getPosition

public int getPosition()
Description copied from interface: JSelectList
Returns the current position. The first item in the list has position 1.
Specified by:
getPosition in interface JSelectList
Returns:
position
See Also:
JSelectList.getPosition()


goToPosition

public void goToPosition(int targetPos)
                  throws JRemoteException
Description copied from interface: JSelectList
Move to the specified position. The first item in the list has position 1.
Specified by:
goToPosition in interface JSelectList
Throws:
JRemoteException
See Also:
com.jbase.jremote.JSelectList#goToPosition()


fetchNext

protected JSelectListProt fetchNext(boolean fetchData)
                             throws JRemoteException
Throws:
JRemoteException


fetchPrevious

protected JSelectListProt fetchPrevious(boolean fetchData)
                                 throws JRemoteException
Throws:
JRemoteException


close

public void close()
           throws JRemoteException
Description copied from interface: JSelectList
Close select list. Requests server to release all resources associated to this object.
Specified by:
close in interface JSelectList
Throws:
JRemoteException
See Also:
JSelectList.close()


iterator

public Iterator<String> iterator()
Description copied from interface: JSelectList
Returns an iterator to the select list
Specified by:
iterator in interface JSelectList
Specified by:
iterator in interface Iterable<String>
Returns:
iterator
See Also:
JSelectList.iterator()


Back to jREMOTE API

Was this article helpful?