org.apache.derby.impl.sql.catalog
Class SYSSTATEMENTSRowFactory

java.lang.Object
  extended byorg.apache.derby.iapi.sql.dictionary.CatalogRowFactory
      extended byorg.apache.derby.impl.sql.catalog.SYSSTATEMENTSRowFactory

public class SYSSTATEMENTSRowFactory
extends CatalogRowFactory

Factory for creating a SYSSTATEMENTS row.

Version:
0.1
Author:
Jamie

Field Summary
private static java.lang.String[][] indexColumnNames
           
private static int[][] indexColumnPositions
           
static int SYSSTATEMENTS_COLUMN_COUNT
           
static int SYSSTATEMENTS_COMPILATION_SCHEMAID
           
static int SYSSTATEMENTS_CONSTANTSTATE
           
static int SYSSTATEMENTS_HIDDEN_COLUMN_COUNT
           
protected static int SYSSTATEMENTS_INDEX1_ID
           
protected static int SYSSTATEMENTS_INDEX2_ID
           
static int SYSSTATEMENTS_INITIALLY_COMPILABLE
           
static int SYSSTATEMENTS_LASTCOMPILED
           
static int SYSSTATEMENTS_SCHEMAID
           
static int SYSSTATEMENTS_STMTID
           
static int SYSSTATEMENTS_STMTNAME
           
static int SYSSTATEMENTS_TEXT
           
static int SYSSTATEMENTS_TYPE
           
static int SYSSTATEMENTS_USINGTEXT
           
static int SYSSTATEMENTS_VALID
           
(package private) static java.lang.String TABLENAME_STRING
           
private static boolean[] uniqueness
           
private static java.lang.String[] uuids
           
 
Fields inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
dvf, heapUUID, indexNames, indexUniqueness, indexUUID, tableUUID
 
Constructor Summary
SYSSTATEMENTSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, boolean convertIdToLower)
           
 
Method Summary
 SystemColumn[] buildColumnList()
          Builds a list of columns suitable for creating this Catalog.
 TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd)
          Make an Tuple Descriptor out of a SYSSTATEMENTS row
 ExecIndexRow buildEmptyIndexRow(int indexNumber, RowLocation rowLocation)
          Builds an empty index row.
 java.util.Properties getCreateHeapProperties()
          Get the Properties associated with creating the heap.
 ExecRow makeEmptyRow()
          Return an empty row for this conglomerate.
 ExecRow makeSYSSTATEMENTSrow(boolean compileMe, SPSDescriptor spsDescriptor)
          Make a SYSSTATEMENTS row.
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
checkIndexNumber, convertIdCase, generateIndexName, getCanonicalHeapName, getCanonicalHeapUUID, getCanonicalIndexUUID, getCanonicalTableUUID, getCatalogName, getCreateIndexProperties, getDataValueFactory, getExecutionFactory, getHeapColumnCount, getIndexColumnCount, getIndexColumnNames, getIndexColumnPositions, getIndexName, getNumIndexes, getPrimaryKeyIndexNumber, getUUIDFactory, initInfo, isIndexUnique, makeRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLENAME_STRING

static final java.lang.String TABLENAME_STRING
See Also:
Constant Field Values

SYSSTATEMENTS_STMTID

public static final int SYSSTATEMENTS_STMTID
See Also:
Constant Field Values

SYSSTATEMENTS_STMTNAME

public static final int SYSSTATEMENTS_STMTNAME
See Also:
Constant Field Values

SYSSTATEMENTS_SCHEMAID

public static final int SYSSTATEMENTS_SCHEMAID
See Also:
Constant Field Values

SYSSTATEMENTS_TYPE

public static final int SYSSTATEMENTS_TYPE
See Also:
Constant Field Values

SYSSTATEMENTS_VALID

public static final int SYSSTATEMENTS_VALID
See Also:
Constant Field Values

SYSSTATEMENTS_TEXT

public static final int SYSSTATEMENTS_TEXT
See Also:
Constant Field Values

SYSSTATEMENTS_LASTCOMPILED

public static final int SYSSTATEMENTS_LASTCOMPILED
See Also:
Constant Field Values

SYSSTATEMENTS_COMPILATION_SCHEMAID

public static final int SYSSTATEMENTS_COMPILATION_SCHEMAID
See Also:
Constant Field Values

SYSSTATEMENTS_USINGTEXT

public static final int SYSSTATEMENTS_USINGTEXT
See Also:
Constant Field Values

SYSSTATEMENTS_CONSTANTSTATE

public static final int SYSSTATEMENTS_CONSTANTSTATE
See Also:
Constant Field Values

SYSSTATEMENTS_INITIALLY_COMPILABLE

public static final int SYSSTATEMENTS_INITIALLY_COMPILABLE
See Also:
Constant Field Values

SYSSTATEMENTS_COLUMN_COUNT

public static final int SYSSTATEMENTS_COLUMN_COUNT
See Also:
Constant Field Values

SYSSTATEMENTS_HIDDEN_COLUMN_COUNT

public static final int SYSSTATEMENTS_HIDDEN_COLUMN_COUNT
See Also:
Constant Field Values

SYSSTATEMENTS_INDEX1_ID

protected static final int SYSSTATEMENTS_INDEX1_ID
See Also:
Constant Field Values

SYSSTATEMENTS_INDEX2_ID

protected static final int SYSSTATEMENTS_INDEX2_ID
See Also:
Constant Field Values

indexColumnPositions

private static final int[][] indexColumnPositions

indexColumnNames

private static final java.lang.String[][] indexColumnNames

uniqueness

private static final boolean[] uniqueness

uuids

private static final java.lang.String[] uuids
Constructor Detail

SYSSTATEMENTSRowFactory

public SYSSTATEMENTSRowFactory(UUIDFactory uuidf,
                               ExecutionFactory ef,
                               DataValueFactory dvf,
                               boolean convertIdToLower)
Method Detail

makeSYSSTATEMENTSrow

public ExecRow makeSYSSTATEMENTSrow(boolean compileMe,
                                    SPSDescriptor spsDescriptor)
                             throws StandardException
Make a SYSSTATEMENTS row.

WARNING: When empty row is true, this method takes a snapshot of the SPSD and creates a row. It is imperative that that row remain consistent with the descriptor (the valid and StorablePreparedStatement fields must be in sync). If this row is to be written out and valid is true, then this call and the insert should be synchronized on the SPSD. This method has NO synchronization.

Parameters:
compileMe - passed into SPSDescriptorImpl.getPreparedStatement(). if true, we (re)compile the stmt
spsDescriptor - In-memory tuple to be converted to a disk row.
Returns:
Row suitable for inserting into SYSSTATEMENTS.
Throws:
StandardException - thrown on failure

buildEmptyIndexRow

public ExecIndexRow buildEmptyIndexRow(int indexNumber,
                                       RowLocation rowLocation)
                                throws StandardException
Builds an empty index row.

Specified by:
buildEmptyIndexRow in class CatalogRowFactory
Parameters:
indexNumber - Index to build empty row for.
rowLocation - Row location for last column of index row
Returns:
corresponding empty index row
Throws:
StandardException - thrown on failure

buildDescriptor

public TupleDescriptor buildDescriptor(ExecRow row,
                                       TupleDescriptor parentTupleDescriptor,
                                       DataDictionary dd)
                                throws StandardException
Make an Tuple Descriptor out of a SYSSTATEMENTS row

Specified by:
buildDescriptor in class CatalogRowFactory
Parameters:
row - a SYSSTATEMENTS row
parentTupleDescriptor - unused
dd - dataDictionary
Returns:
a descriptor equivalent to a SYSSTATEMENTS row
Throws:
StandardException - thrown on failure

makeEmptyRow

public ExecRow makeEmptyRow()
                     throws StandardException
Description copied from class: CatalogRowFactory
Return an empty row for this conglomerate.

Overrides:
makeEmptyRow in class CatalogRowFactory
Throws:
StandardException

buildColumnList

public SystemColumn[] buildColumnList()
Builds a list of columns suitable for creating this Catalog. The last column, the serialized statement, is not added to the column list. This is done deliberately to make it a 'hidden' column -- one that is not visible to customers, but is visible to the system.

Specified by:
buildColumnList in class CatalogRowFactory
Returns:
array of SystemColumn suitable for making this catalog.

getCreateHeapProperties

public java.util.Properties getCreateHeapProperties()
Get the Properties associated with creating the heap.

Overrides:
getCreateHeapProperties in class CatalogRowFactory
Returns:
The Properties associated with creating the heap.


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