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

java.lang.Object
  extended by org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
      extended by org.apache.derby.impl.sql.catalog.SYSTABLESRowFactory

 class SYSTABLESRowFactory
extends CatalogRowFactory

Factory for creating a SYSTABLES row.

Version:
0.1

Field Summary
private static int[][] indexColumnPositions
           
protected static int SYSTABLES_COLUMN_COUNT
           
protected static int SYSTABLES_INDEX1_ID
           
protected static int SYSTABLES_INDEX1_SCHEMAID
           
protected static int SYSTABLES_INDEX1_TABLENAME
           
protected static int SYSTABLES_INDEX2_ID
           
protected static int SYSTABLES_INDEX2_TABLEID
           
protected static int SYSTABLES_LOCKGRANULARITY
           
protected static int SYSTABLES_SCHEMAID
           
protected static int SYSTABLES_TABLEID
           
protected static int SYSTABLES_TABLENAME
           
protected static int SYSTABLES_TABLETYPE
           
private static java.lang.String TABLENAME_STRING
           
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
SYSTABLESRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
           
 
Method Summary
 SystemColumn[] buildColumnList()
          Builds a list of columns suitable for creating this Catalog.
 TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd)
          Make a TableDescriptor out of a SYSTABLES row
(package private)  TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd, int isolationLevel)
          Make a TableDescriptor out of a SYSTABLES row
 TupleDescriptor buildDescriptorBody(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd, int isolationLevel)
           
(package private)  ExecIndexRow buildEmptyIndexRow(int indexNumber, RowLocation rowLocation)
          Builds an empty index row.
protected  java.lang.String getTableName(ExecRow row)
          Get the table name out of this SYSTABLES row
 ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent)
          Make a SYSTABLES row
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
generateIndexName, getCanonicalHeapName, getCanonicalHeapUUID, getCanonicalIndexUUID, getCanonicalTableUUID, getCatalogName, getCreateHeapProperties, getCreateIndexProperties, getDataValueFactory, getExecutionFactory, getHeapColumnCount, getIndexColumnCount, getIndexColumnPositions, getIndexName, getNumIndexes, getPrimaryKeyIndexNumber, getUUIDFactory, initInfo, isIndexUnique, makeEmptyRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLENAME_STRING

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

SYSTABLES_COLUMN_COUNT

protected static final int SYSTABLES_COLUMN_COUNT
See Also:
Constant Field Values

SYSTABLES_TABLEID

protected static final int SYSTABLES_TABLEID
See Also:
Constant Field Values

SYSTABLES_TABLENAME

protected static final int SYSTABLES_TABLENAME
See Also:
Constant Field Values

SYSTABLES_TABLETYPE

protected static final int SYSTABLES_TABLETYPE
See Also:
Constant Field Values

SYSTABLES_SCHEMAID

protected static final int SYSTABLES_SCHEMAID
See Also:
Constant Field Values

SYSTABLES_LOCKGRANULARITY

protected static final int SYSTABLES_LOCKGRANULARITY
See Also:
Constant Field Values

SYSTABLES_INDEX1_ID

protected static final int SYSTABLES_INDEX1_ID
See Also:
Constant Field Values

SYSTABLES_INDEX1_TABLENAME

protected static final int SYSTABLES_INDEX1_TABLENAME
See Also:
Constant Field Values

SYSTABLES_INDEX1_SCHEMAID

protected static final int SYSTABLES_INDEX1_SCHEMAID
See Also:
Constant Field Values

SYSTABLES_INDEX2_ID

protected static final int SYSTABLES_INDEX2_ID
See Also:
Constant Field Values

SYSTABLES_INDEX2_TABLEID

protected static final int SYSTABLES_INDEX2_TABLEID
See Also:
Constant Field Values

uuids

private static final java.lang.String[] uuids

indexColumnPositions

private static final int[][] indexColumnPositions
Constructor Detail

SYSTABLESRowFactory

SYSTABLESRowFactory(UUIDFactory uuidf,
                    ExecutionFactory ef,
                    DataValueFactory dvf)
Method Detail

makeRow

public ExecRow makeRow(TupleDescriptor td,
                       TupleDescriptor parent)
                throws StandardException
Make a SYSTABLES row

Overrides:
makeRow in class CatalogRowFactory
Returns:
Row suitable for inserting into SYSTABLES.
Throws:
StandardException - thrown on failure

buildEmptyIndexRow

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

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

TupleDescriptor buildDescriptor(ExecRow row,
                                TupleDescriptor parentTupleDescriptor,
                                DataDictionary dd,
                                int isolationLevel)
                          throws StandardException
Make a TableDescriptor out of a SYSTABLES row

Parameters:
row - a SYSTABLES row
parentTupleDescriptor - Null for this kind of descriptor.
dd - dataDictionary
isolationLevel - use this explicit isolation level. Only ISOLATION_REPEATABLE_READ (normal usage) or ISOLATION_READ_UNCOMMITTED (corner cases) supported for now.
Throws:
StandardException - thrown on failure

buildDescriptor

public TupleDescriptor buildDescriptor(ExecRow row,
                                       TupleDescriptor parentTupleDescriptor,
                                       DataDictionary dd)
                                throws StandardException
Make a TableDescriptor out of a SYSTABLES row

Specified by:
buildDescriptor in class CatalogRowFactory
Parameters:
row - a SYSTABLES row
parentTupleDescriptor - Null for this kind of descriptor.
dd - dataDictionary
Returns:
a table descriptor equivalent to a SYSTABLES row
Throws:
StandardException - thrown on failure

buildDescriptorBody

public TupleDescriptor buildDescriptorBody(ExecRow row,
                                           TupleDescriptor parentTupleDescriptor,
                                           DataDictionary dd,
                                           int isolationLevel)
                                    throws StandardException
Throws:
StandardException

getTableName

protected java.lang.String getTableName(ExecRow row)
                                 throws StandardException
Get the table name out of this SYSTABLES row

Parameters:
row - a SYSTABLES row
Returns:
string, the table name
Throws:
StandardException - thrown on failure

buildColumnList

public SystemColumn[] buildColumnList()
                               throws StandardException
Builds a list of columns suitable for creating this Catalog.

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

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

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