java.io.Externalizable, java.io.Serializable, Formatable, TypedFormatpublic class ExecRowBuilder extends java.lang.Object implements Formatable
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.
This class must be Formatable so that it can be stored in the
database as part of a stored prepared statement generated for trigger
actions or metadata queries. The stored format does not need to be stable
across different versions, since the stored prepared statements are
discarded on upgrade and will never be read by other Derby versions than
the one that originally wrote them.
| Modifier and Type | Field | Description |
|---|---|---|
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 java.lang.Object[] |
template |
Array of templates used for creating NULL values to put in the row.
|
| Constructor | Description |
|---|---|
ExecRowBuilder() |
Public no-arg constructor required by the
Formatable interface. |
ExecRowBuilder(int size,
boolean indexable) |
Create an instance that produces an
ExecRow instance of
the specified size. |
| Modifier and Type | Method | Description |
|---|---|---|
ExecRow |
build(ExecutionFactory ef) |
Build a new
ExecRow instance with the columns specified by
the setColumn(int, Object) method initialized to empty (NULL)
values. |
int |
getTypeFormatId() |
Get a universally unique identifier for the type of
this object.
|
void |
readExternal(java.io.ObjectInput in) |
|
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.
|
void |
writeExternal(java.io.ObjectOutput out) |
private boolean indexable
ExecIndexRow.private java.lang.Object[] template
DataValueDescriptors or
DataTypeDescriptors.private int[] columns
private int count
private int maxColumnNumber
public ExecRowBuilder(int size,
boolean indexable)
ExecRow instance of
the specified size.size - the number of columns to initialize in the produced rowindexable - true if the returned row should be an
ExecIndexRow, false otherwisepublic ExecRowBuilder()
Formatable interface.
Should not be called directly.public void setColumn(int column,
java.lang.Object columnTemplate)
DataValueDescriptor or a
DataTypeDescriptor.column - the column numbercolumnTemplate - a template from which a NULL value can be created
(either a DataValueDescriptor or a DataTypeDescriptor)public ExecRow build(ExecutionFactory ef) throws StandardException
ExecRow instance with the columns specified by
the setColumn(int, Object) method initialized to empty (NULL)
values.ef - an execution factory used to create a rowStandardExceptionpublic void reset(ExecRow row) throws StandardException
row - the row to resetStandardExceptionpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic int getTypeFormatId()
TypedFormatgetTypeFormatId in interface TypedFormatApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.