wt.pds
Class RangeResultCursor

java.lang.Object
  extended bywt.pds.RangeResultCursor
All Implemented Interfaces:
Externalizable, ResultCursor, Serializable

public class RangeResultCursor
extends Object
implements ResultCursor, Externalizable

This class provides functionality for accessing the rows in a result set beginning at a given index over a given range. The underlying result set methods are used once the result set has been advanced to the given index. The given range specifies the number of rows that can be accessed.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  WTConnection connection
           
private  ResultCursor delegate
           
static long EXTERNALIZATION_VERSION_UID
           
private  int offset
           
protected static long OLD_FORMAT_VERSION_UID
           
private  int range
           
private  int rangeCount
           
private  boolean reset
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Fields inherited from interface wt.pds.ResultCursor
CONNECTION, COUNT, QUERY_LIMIT, RESET, RESULT_BUILDER, STATEMENT_BUILDER
 
Constructor Summary
RangeResultCursor()
           
 
Method Summary
 boolean advance(int a_relative)
          Advances the ResultCursor the relative number of rows without result processing.
 void close()
          Ensures that any associated result sets and/or statements are closed.
private  void delegateValidate(ResultCursor a_Delegate)
           
 WTConnection getConnection()
          Gets the value of the attribute: connection.
 int getCount()
          Gets the value of the attribute: count; Total number of rows that were traversed (not necessarily returned results).
 ResultCursor getDelegate()
          Gets the object for the association that plays role: delegate.
 int getOffset()
          Gets the value of the attribute: offset.
 int getQueryLimit()
          Gets the value of the attribute: queryLimit.
 int getRange()
          Gets the value of the attribute: range.
 ResultBuilder getResultBuilder()
          Gets the object for the association that plays role: resultBuilder.
 StatementBuilder getStatementBuilder()
          Gets the object for the association that plays role: statementBuilder.
 boolean isReset()
          Gets the value of the attribute: reset; Indicates if the result cursor has been reset.
 Object[] next(AccessController a_accessController)
          Advance to the next valid row in the result set and returned the built objects.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(RangeResultCursor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setConnection(WTConnection a_Connection)
          Sets the value of the attribute: connection.
 void setDelegate(ResultCursor a_Delegate)
          Sets the object for the association that plays role: delegate.
 void setOffset(int a_Offset)
          Sets the value of the attribute: offset.
 void setRange(int a_Range)
          Sets the value of the attribute: range.
 void setReset(boolean a_Reset)
          Sets the value of the attribute: reset; Indicates if the result cursor has been reset.
 void setResultBuilder(ResultBuilder a_ResultBuilder)
          Sets the object for the association that plays role: resultBuilder.
 void setStatementBuilder(StatementBuilder a_StatementBuilder)
          Sets the object for the association that plays role: statementBuilder.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

range

private int range

offset

private int offset

delegate

private ResultCursor delegate

reset

private boolean reset

connection

private transient WTConnection connection

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

rangeCount

private transient int rangeCount
Constructor Detail

RangeResultCursor

public RangeResultCursor()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(RangeResultCursor thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getRange

public int getRange()
Gets the value of the attribute: range.

Supported API: false

Returns:
int

setRange

public void setRange(int a_Range)
              throws WTPropertyVetoException
Sets the value of the attribute: range.

Supported API: false

Parameters:
a_Range -
Throws:
WTPropertyVetoException

getOffset

public int getOffset()
Gets the value of the attribute: offset.

Supported API: false

Returns:
int

setOffset

public void setOffset(int a_Offset)
               throws WTPropertyVetoException
Sets the value of the attribute: offset.

Supported API: false

Parameters:
a_Offset -
Throws:
WTPropertyVetoException

getCount

public int getCount()
Gets the value of the attribute: count; Total number of rows that were traversed (not necessarily returned results).

Supported API: false

Specified by:
getCount in interface ResultCursor
Returns:
int

getDelegate

public ResultCursor getDelegate()
Gets the object for the association that plays role: delegate.

Supported API: false

Returns:
ResultCursor

setDelegate

public void setDelegate(ResultCursor a_Delegate)
                 throws WTPropertyVetoException
Sets the object for the association that plays role: delegate.

Supported API: false

Parameters:
a_Delegate -
Throws:
WTPropertyVetoException

delegateValidate

private void delegateValidate(ResultCursor a_Delegate)
                       throws WTPropertyVetoException
Parameters:
a_Delegate -
Throws:
WTPropertyVetoException

isReset

public boolean isReset()
Gets the value of the attribute: reset; Indicates if the result cursor has been reset.

Supported API: false

Specified by:
isReset in interface ResultCursor
Returns:
boolean

setReset

public void setReset(boolean a_Reset)
              throws WTPropertyVetoException
Sets the value of the attribute: reset; Indicates if the result cursor has been reset.

Supported API: false

Specified by:
setReset in interface ResultCursor
Parameters:
a_Reset -
Throws:
WTPropertyVetoException

getConnection

public WTConnection getConnection()
Gets the value of the attribute: connection.

Supported API: false

Specified by:
getConnection in interface ResultCursor
Returns:
WTConnection

setConnection

public void setConnection(WTConnection a_Connection)
                   throws WTPropertyVetoException
Sets the value of the attribute: connection.

Supported API: false

Specified by:
setConnection in interface ResultCursor
Parameters:
a_Connection -
Throws:
WTPropertyVetoException

getQueryLimit

public int getQueryLimit()
Gets the value of the attribute: queryLimit.

Supported API: false

Specified by:
getQueryLimit in interface ResultCursor
Returns:
int

next

public Object[] next(AccessController a_accessController)
              throws PersistenceException
Advance to the next valid row in the result set and returned the built objects.

Supported API: false

Specified by:
next in interface ResultCursor
Parameters:
a_accessController -
Returns:
Object[]
Throws:
PersistenceException

close

public void close()
Ensures that any associated result sets and/or statements are closed.

Supported API: false

Specified by:
close in interface ResultCursor

advance

public boolean advance(int a_relative)
                throws PersistenceException
Advances the ResultCursor the relative number of rows without result processing.

Supported API: false

Specified by:
advance in interface ResultCursor
Parameters:
a_relative -
Returns:
boolean
Throws:
PersistenceException

getStatementBuilder

public StatementBuilder getStatementBuilder()
Gets the object for the association that plays role: statementBuilder.

Supported API: false

Specified by:
getStatementBuilder in interface ResultCursor
Returns:
StatementBuilder

setStatementBuilder

public void setStatementBuilder(StatementBuilder a_StatementBuilder)
                         throws WTPropertyVetoException
Sets the object for the association that plays role: statementBuilder.

Supported API: false

Specified by:
setStatementBuilder in interface ResultCursor
Parameters:
a_StatementBuilder -
Throws:
WTPropertyVetoException

getResultBuilder

public ResultBuilder getResultBuilder()
Gets the object for the association that plays role: resultBuilder.

Supported API: false

Specified by:
getResultBuilder in interface ResultCursor
Returns:
ResultBuilder

setResultBuilder

public void setResultBuilder(ResultBuilder a_ResultBuilder)
                      throws WTPropertyVetoException
Sets the object for the association that plays role: resultBuilder.

Supported API: false

Specified by:
setResultBuilder in interface ResultCursor
Parameters:
a_ResultBuilder -
Throws:
WTPropertyVetoException