org.apache.derby.iapi.sql.execute
Class ExecRowBuilder

java.lang.Object
  extended by org.apache.derby.iapi.sql.execute.ExecRowBuilder
All Implemented Interfaces:
java.io.Serializable

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

A class used for storing information on how to build ExecRow instances. Typically created by the compiler and used during execution to produce and reset row templates.

See Also:
Serialized Form

Field Summary
private  int[] columns
          Array of 1-based column numbers for the columns to access.
private  int count
          The number of columns to set in the row.
private  boolean indexable
          If true, the row should be an ExecIndexRow.
private  int maxColumnNumber
          The highest column number in the row.
private static long serialVersionUID
          Serial version produced by the serialver utility.
private  java.lang.Object[] template
          Array of templates used for creating NULL values to put in the row.
 
Constructor Summary
ExecRowBuilder(int size, boolean indexable)
          Create an instance that produces an ExecRow instance of the specified size.
 
Method Summary
 ExecRow build(ExecutionFactory ef)
          Build a new ExecRow instance with the columns specified by the setColumn(int, Object) method initialized to empty (NULL) values.
 void reset(ExecRow row)
          Reset a row by creating fresh NULL values.
 void setColumn(int column, java.lang.Object columnTemplate)
          Add a template from which a NULL value of the correct type can be created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version produced by the serialver utility. Needed in order to make serialization work reliably across different compilers.

See Also:
Constant Field Values

indexable

private final boolean indexable
If true, the row should be an ExecIndexRow.


template

private final java.lang.Object[] template
Array of templates used for creating NULL values to put in the row. The templates are either DataValueDescriptors or DataTypeDescriptors.


columns

private final int[] columns
Array of 1-based column numbers for the columns to access.


count

private int count
The number of columns to set in the row.


maxColumnNumber

private int maxColumnNumber
The highest column number in the row.

Constructor Detail

ExecRowBuilder

public ExecRowBuilder(int size,
                      boolean indexable)
Create an instance that produces an ExecRow instance of the specified size.

Parameters:
size - the number of columns to initialize in the produced row
indexable - true if the returned row should be an ExecIndexRow, false otherwise
Method Detail

setColumn

public void setColumn(int column,
                      java.lang.Object columnTemplate)
Add a template from which a NULL value of the correct type can be created. It should either be a DataValueDescriptor or a DataTypeDescriptor.

Parameters:
column - the column number
columnTemplate - a template from which a NULL value can be created (either a DataValueDescriptor or a DataTypeDescriptor)

build

public ExecRow build(ExecutionFactory ef)
              throws StandardException
Build a new ExecRow instance with the columns specified by the setColumn(int, Object) method initialized to empty (NULL) values.

Parameters:
ef - an execution factory used to create a row
Returns:
a row initialized with NULL values of the requested types
Throws:
StandardException

reset

public void reset(ExecRow row)
           throws StandardException
Reset a row by creating fresh NULL values.

Parameters:
row - the row to reset
Throws:
StandardException

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.