org.apache.derby.impl.sql.execute
Class IndexValueRow

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.IndexValueRow
All Implemented Interfaces:
ExecIndexRow, ExecRow, Row

class IndexValueRow
extends java.lang.Object
implements ExecIndexRow

Mapper of ValueRow into ExecIndexRow.

Author:
ames

Field Summary
private  ExecRow valueRow
           
 
Constructor Summary
(package private) IndexValueRow(ExecRow valueRow)
           
 
Method Summary
 boolean areNullsOrdered(int columnPosition)
          Return true if orderedNulls was called on this ExecIndexRow for the given column position.
 DataValueDescriptor cloneColumn(int columnPosition)
          Get a clone of a DataValueDescriptor from an ExecRow.
 void execRowToExecIndexRow(ExecRow valueRow)
          Turn the ExecRow into an ExecIndexRow.
 ExecRow getClone()
          Clone the Row and its contents.
 ExecRow getClone(FormatableBitSet clonedCols)
          Clone the Row.
 DataValueDescriptor getColumn(int position)
          Get a DataValueDescriptor in a Row by ordinal position (1-based).
 ExecRow getNewNullRow()
          Get a new row with the same columns type as this one, containing nulls.
 void getNewObjectArray()
          Get a new DataValueDescriptor[]
 DataValueDescriptor[] getRowArray()
          Get the array form of the row that Access expects.
 DataValueDescriptor[] getRowArrayClone()
          Get a clone of the array form of the row that Access expects.
 int nColumns()
           
 void orderedNulls(int columnPosition)
          These two methods are a sort of a hack.
 void setColumn(int position, DataValueDescriptor col)
          Set a DataValueDescriptor in a Row by ordinal position (1-based).
 void setRowArray(DataValueDescriptor[] value)
           
 void setRowArray(Storable[] value)
          Set the array of objects
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

valueRow

private ExecRow valueRow
Constructor Detail

IndexValueRow

IndexValueRow(ExecRow valueRow)
Method Detail

toString

public java.lang.String toString()

getRowArray

public DataValueDescriptor[] getRowArray()
Get the array form of the row that Access expects.

Specified by:
getRowArray in interface ExecRow
See Also:
ExecRow.getRowArray()

setRowArray

public void setRowArray(DataValueDescriptor[] value)
Specified by:
setRowArray in interface ExecRow
See Also:
ExecRow.getRowArray()

setRowArray

public void setRowArray(Storable[] value)
Description copied from interface: ExecRow
Set the array of objects

Specified by:
setRowArray in interface ExecRow

getRowArrayClone

public DataValueDescriptor[] getRowArrayClone()
Get a clone of the array form of the row that Access expects.

Specified by:
getRowArrayClone in interface ExecRow
See Also:
ExecRow.getRowArray()

nColumns

public int nColumns()
Specified by:
nColumns in interface Row

getColumn

public DataValueDescriptor getColumn(int position)
                              throws StandardException
Description copied from interface: Row
Get a DataValueDescriptor in a Row by ordinal position (1-based).

Specified by:
getColumn in interface Row
Parameters:
position - The ordinal position of the column.
Returns:
The DataValueDescriptor, null if no such column exists
Throws:
StandardException - Thrown on failure.

setColumn

public void setColumn(int position,
                      DataValueDescriptor col)
Description copied from interface: Row
Set a DataValueDescriptor in a Row by ordinal position (1-based).

Specified by:
setColumn in interface Row
Parameters:
position - The ordinal position of the column.
Returns:
The DataValueDescriptor, null if no such column exists

getClone

public ExecRow getClone()
Description copied from interface: ExecRow
Clone the Row and its contents.

Specified by:
getClone in interface ExecRow
Returns:
Row A clone of the Row and its contents.

getClone

public ExecRow getClone(FormatableBitSet clonedCols)
Description copied from interface: ExecRow
Clone the Row. The cloned row will contain clones of the specified columns and the same object as the original row for the other columns.

Specified by:
getClone in interface ExecRow
Parameters:
clonedCols - 1-based FormatableBitSet representing the columns to clone.
Returns:
Row A clone of the Row and its contents.

getNewNullRow

public ExecRow getNewNullRow()
Description copied from interface: ExecRow
Get a new row with the same columns type as this one, containing nulls.

Specified by:
getNewNullRow in interface ExecRow

cloneColumn

public DataValueDescriptor cloneColumn(int columnPosition)
Description copied from interface: ExecRow
Get a clone of a DataValueDescriptor from an ExecRow.

Specified by:
cloneColumn in interface ExecRow

orderedNulls

public void orderedNulls(int columnPosition)
Description copied from interface: ExecIndexRow
These two methods are a sort of a hack. The store implements ordered null semantics for start and stop positioning, which is correct for IS NULL and incorrect for everything else. To work around this, TableScanResultSet will check whether the start and stop positions have NULL in any column position other than for an IS NULL check. If so, it won't do the scan (that is, it will return no rows). This method is to inform this ExecIndexRow (which can be used for start and stop positioning) that the given column uses ordered null semantics.

Specified by:
orderedNulls in interface ExecIndexRow
Parameters:
columnPosition - The position of the column that uses ordered null semantics (zero-based).

areNullsOrdered

public boolean areNullsOrdered(int columnPosition)
Description copied from interface: ExecIndexRow
Return true if orderedNulls was called on this ExecIndexRow for the given column position.

Specified by:
areNullsOrdered in interface ExecIndexRow
Parameters:
columnPosition - The position of the column (zero-based) for which we want to check if ordered null semantics are used.
Returns:
true if we are to use ordered null semantics on the given column

execRowToExecIndexRow

public void execRowToExecIndexRow(ExecRow valueRow)
Turn the ExecRow into an ExecIndexRow.

Specified by:
execRowToExecIndexRow in interface ExecIndexRow
Returns:
Nothing.

getNewObjectArray

public void getNewObjectArray()
Description copied from interface: ExecRow
Get a new DataValueDescriptor[]

Specified by:
getNewObjectArray in interface ExecRow


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.