org.bsf.remoteIterator.common
Class RemoteIteratorResultTable

java.lang.Object
  extended byorg.bsf.remoteIterator.common.RemoteIteratorResultTable
All Implemented Interfaces:
java.io.Serializable

public class RemoteIteratorResultTable
extends java.lang.Object
implements java.io.Serializable

This class defines the RemoteIterator's result format expected by the client.

See Also:
RemoteIteratorBean, Serialized Form

Field Summary
private  boolean _isAlreadyLast
           
private  boolean _isBeforeFirst
           
private  boolean _isFirst
           
private  boolean _isLast
           
private  java.util.List _rowIndexes
           
private  java.util.List _rows
           
static int RESULT_TABLE_DEFAULT_INITIAL_SIZE
           
 
Constructor Summary
RemoteIteratorResultTable()
          Creates a RemoteIteratorResultTable using the RESULT_TABLE_DEFAULT_INITIAL_SIZE.
RemoteIteratorResultTable(int p_initialSize)
          Creates a RemoteIteratorResultTable using the given int as the default size for the underlying Lists.
 
Method Summary
 void addRow(java.util.List p_rows, java.lang.Integer p_rowsPosition)
          adds the row (an arrayList) in the list of result.
 java.util.List getRowIndexes()
           
 java.util.List getRows()
           
 int getSize()
           
 boolean isAlreadyLast()
           
 boolean isBeforeFirst()
           
 boolean isFirst()
           
 boolean isLast()
           
 void setAlreadyLast(boolean p_alreadyLast)
           
 void setBeforeFirst(boolean p_beforeFirst)
           
 void setFirst(boolean p_first)
           
 void setLast(boolean p_last)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESULT_TABLE_DEFAULT_INITIAL_SIZE

public static final int RESULT_TABLE_DEFAULT_INITIAL_SIZE
See Also:
Constant Field Values

_isLast

private boolean _isLast

_isFirst

private boolean _isFirst

_isBeforeFirst

private boolean _isBeforeFirst

_isAlreadyLast

private boolean _isAlreadyLast

_rows

private java.util.List _rows

_rowIndexes

private java.util.List _rowIndexes
Constructor Detail

RemoteIteratorResultTable

public RemoteIteratorResultTable()
Creates a RemoteIteratorResultTable using the RESULT_TABLE_DEFAULT_INITIAL_SIZE. If you an idea of how many rows will be in this ResultTable you should probably use other constructor. By specifying the number of rows you will prevent ongoing resize of the underlying Lists used to store the rows and the indexes.

See Also:
#RemoteIteratorResultTable( int p_size );, RESULT_TABLE_DEFAULT_INITIAL_SIZE

RemoteIteratorResultTable

public RemoteIteratorResultTable(int p_initialSize)
Creates a RemoteIteratorResultTable using the given int as the default size for the underlying Lists. Enables to prevent ongoing resize of the Lists. Should be used if you have an idea of how many rows will be in the Lists.

Parameters:
p_initialSize - The initial size of the underlying Lists.
See Also:
RemoteIteratorResultTable()
Method Detail

getSize

public int getSize()
Returns:
the actual number of rows in this RemoteIteratorResultTable. Could be less than the final number if called before all the rows are added to it.
See Also:
addRow(java.util.List, java.lang.Integer), RemoteIteratorBean

isFirst

public boolean isFirst()

setFirst

public void setFirst(boolean p_first)

isLast

public boolean isLast()

setLast

public void setLast(boolean p_last)

isAlreadyLast

public boolean isAlreadyLast()

setAlreadyLast

public void setAlreadyLast(boolean p_alreadyLast)

isBeforeFirst

public boolean isBeforeFirst()

setBeforeFirst

public void setBeforeFirst(boolean p_beforeFirst)

getRows

public java.util.List getRows()

getRowIndexes

public java.util.List getRowIndexes()

addRow

public void addRow(java.util.List p_rows,
                   java.lang.Integer p_rowsPosition)
adds the row (an arrayList) in the list of result. Used by the RI.

Parameters:
p_rows -