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

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

public class SYSCONSTRAINTSRowFactory
extends CatalogRowFactory

Factory for creating a SYSCONTRAINTS row.


Field Summary
private static int[][] indexColumnPositions
           
protected static int SYSCONSTRAINTS_COLUMN_COUNT
           
protected static int SYSCONSTRAINTS_CONSTRAINTID
           
protected static int SYSCONSTRAINTS_CONSTRAINTNAME
           
protected static int SYSCONSTRAINTS_INDEX1_ID
           
protected static int SYSCONSTRAINTS_INDEX2_ID
           
protected static int SYSCONSTRAINTS_INDEX3_ID
           
protected static int SYSCONSTRAINTS_REFERENCECOUNT
           
protected static int SYSCONSTRAINTS_SCHEMAID
           
protected static int SYSCONSTRAINTS_STATE
           
protected static int SYSCONSTRAINTS_TABLEID
           
protected static int SYSCONSTRAINTS_TYPE
           
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
SYSCONSTRAINTSRowFactory(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 ConstraintDescriptor out of a SYSCONSTRAINTS row
protected  UUID getConstraintId(ExecRow row)
          Get the constraint ID of the row.
protected  java.lang.String getConstraintName(ExecRow row)
          Get the constraint name of the row.
protected  int getConstraintType(ExecRow row)
          Get the constraint type out of the row.
protected  UUID getSchemaId(ExecRow row)
          Get the schema ID of the row.
protected  UUID getTableId(ExecRow row)
          Get the table ID of the row.
 ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent)
          Make a SYSCONTRAINTS 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

SYSCONSTRAINTS_COLUMN_COUNT

protected static final int SYSCONSTRAINTS_COLUMN_COUNT
See Also:
Constant Field Values

SYSCONSTRAINTS_CONSTRAINTID

protected static final int SYSCONSTRAINTS_CONSTRAINTID
See Also:
Constant Field Values

SYSCONSTRAINTS_TABLEID

protected static final int SYSCONSTRAINTS_TABLEID
See Also:
Constant Field Values

SYSCONSTRAINTS_CONSTRAINTNAME

protected static final int SYSCONSTRAINTS_CONSTRAINTNAME
See Also:
Constant Field Values

SYSCONSTRAINTS_TYPE

protected static final int SYSCONSTRAINTS_TYPE
See Also:
Constant Field Values

SYSCONSTRAINTS_SCHEMAID

protected static final int SYSCONSTRAINTS_SCHEMAID
See Also:
Constant Field Values

SYSCONSTRAINTS_STATE

protected static final int SYSCONSTRAINTS_STATE
See Also:
Constant Field Values

SYSCONSTRAINTS_REFERENCECOUNT

protected static final int SYSCONSTRAINTS_REFERENCECOUNT
See Also:
Constant Field Values

SYSCONSTRAINTS_INDEX1_ID

protected static final int SYSCONSTRAINTS_INDEX1_ID
See Also:
Constant Field Values

SYSCONSTRAINTS_INDEX2_ID

protected static final int SYSCONSTRAINTS_INDEX2_ID
See Also:
Constant Field Values

SYSCONSTRAINTS_INDEX3_ID

protected static final int SYSCONSTRAINTS_INDEX3_ID
See Also:
Constant Field Values

uniqueness

private static final boolean[] uniqueness

indexColumnPositions

private static final int[][] indexColumnPositions

uuids

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

SYSCONSTRAINTSRowFactory

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

makeRow

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

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

buildDescriptor

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

Specified by:
buildDescriptor in class CatalogRowFactory
Parameters:
row - a SYSCONSTRAINTS row
parentTupleDescriptor - Subconstraint descriptor with auxiliary info.
dd - dataDictionary
Throws:
StandardException - thrown on failure

getConstraintId

protected UUID getConstraintId(ExecRow row)
                        throws StandardException
Get the constraint ID of the row.

Parameters:
row - The row from sysconstraints
Returns:
UUID The constraint id
Throws:
StandardException - thrown on failure

getConstraintName

protected java.lang.String getConstraintName(ExecRow row)
                                      throws StandardException
Get the constraint name of the row.

Parameters:
row - The row from sysconstraints
Returns:
UUID The constraint name
Throws:
StandardException - thrown on failure

getSchemaId

protected UUID getSchemaId(ExecRow row)
                    throws StandardException
Get the schema ID of the row.

Parameters:
row - The row from sysconstraints
Returns:
UUID The schema
Throws:
StandardException - thrown on failure

getTableId

protected UUID getTableId(ExecRow row)
                   throws StandardException
Get the table ID of the row.

Parameters:
row - The row from sysconstraints
Returns:
UUID The table id
Throws:
StandardException - thrown on failure

getConstraintType

protected int getConstraintType(ExecRow row)
                         throws StandardException
Get the constraint type out of the row.

Parameters:
row - The row from sysconstraints
Returns:
int The constraint type as an int
Throws:
StandardException - thrown on failure

buildColumnList

public SystemColumn[] buildColumnList()
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.

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.