Top Description Fields Constructors Methods
org.apache.derby.impl.sql.catalog

public Class SYSCONSTRAINTSRowFactory

extends CatalogRowFactory
Class Inheritance
Imports
java.sql.Types, org.apache.derby.catalog.UUID, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.uuid.UUIDFactory, org.apache.derby.iapi.sql.dictionary.CatalogRowFactory, .ConglomerateDescriptor, .ConstraintDescriptor, .DataDescriptorGenerator, .DataDictionary, .SchemaDescriptor, .SubCheckConstraintDescriptor, .SubConstraintDescriptor, .SubKeyConstraintDescriptor, .SystemColumn, .TableDescriptor, .TupleDescriptor, org.apache.derby.iapi.sql.execute.ExecRow, .ExecutionFactory, org.apache.derby.iapi.types.DataValueDescriptor, .DataValueFactory, .SQLChar, .SQLInteger, .SQLVarchar, org.apache.derby.impl.sql.compile.ConstraintDefinitionNode

Factory for creating a SYSCONTRAINTS row.

Field Summary

Modifier and TypeField and Description
private static final int[][]
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
public static final int
protected static final int
protected static final int
private static final String
private static final boolean[]
private static final String[]
Inherited from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory:
dvfheapUUIDindexNamesindexUniquenessindexUUIDtableUUID

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public SystemColumn[]

Returns:

array of SystemColumn suitable for making this catalog.
buildColumnList
()

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildColumnList.

Builds a list of columns suitable for creating this Catalog.

public TupleDescriptor
buildDescriptor(ExecRow
a SYSCONSTRAINTS row
row
,
TupleDescriptor
Subconstraint descriptor with auxiliary info.
parentTupleDescriptor
,
DataDictionary
dataDictionary
dd
)

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildDescriptor.

Make a ConstraintDescriptor out of a SYSCONSTRAINTS row

private String
encodeCharacteristics(boolean deferrable, boolean initiallyDeferred, boolean enforced)

protected UUID

Returns:

UUID The constraint id
getConstraintId
(ExecRow
The row from sysconstraints
row
)

Get the constraint ID of the row.

protected String

Returns:

UUID The constraint name
getConstraintName
(ExecRow
The row from sysconstraints
row
)

Get the constraint name of the row.

protected int

Returns:

int The constraint type as an int
getConstraintType
(ExecRow
The row from sysconstraints
row
)

Get the constraint type out of the row.

protected UUID

Returns:

UUID The schema
getSchemaId
(ExecRow
The row from sysconstraints
row
)

Get the schema ID of the row.

protected UUID

Returns:

UUID The table id
getTableId
(ExecRow
The row from sysconstraints
row
)

Get the table ID of the row.

public ExecRow

Returns:

Row suitable for inserting into SYSCONTRAINTS.
makeRow
(TupleDescriptor td, TupleDescriptor parent)

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeRow.

Make a SYSCONTRAINTS row

Inherited from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory:
generateIndexNamegetCanonicalHeapNamegetCanonicalHeapUUIDgetCanonicalIndexUUIDgetCanonicalTableUUIDgetCatalogNamegetCreateHeapPropertiesgetCreateIndexPropertiesgetDataValueFactorygetExecutionFactorygetHeapColumnCountgetIndexColumnCountgetIndexColumnPositionsgetIndexNamegetNumIndexesgetPrimaryKeyIndexNumbergetUUIDFactoryinitInfoisIndexUniquemakeEmptyRowmakeEmptyRowForCurrentVersion

Field Detail

indexColumnPositionsback to summary
private static final int[][] indexColumnPositions

Hides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.indexColumnPositions.

SYSCONSTRAINTS_COLUMN_COUNTback to summary
protected static final int SYSCONSTRAINTS_COLUMN_COUNT
SYSCONSTRAINTS_CONSTRAINTIDback to summary
protected static final int SYSCONSTRAINTS_CONSTRAINTID
SYSCONSTRAINTS_CONSTRAINTNAMEback to summary
protected static final int SYSCONSTRAINTS_CONSTRAINTNAME
SYSCONSTRAINTS_INDEX1_IDback to summary
protected static final int SYSCONSTRAINTS_INDEX1_ID
SYSCONSTRAINTS_INDEX2_IDback to summary
protected static final int SYSCONSTRAINTS_INDEX2_ID
SYSCONSTRAINTS_INDEX3_IDback to summary
protected static final int SYSCONSTRAINTS_INDEX3_ID
SYSCONSTRAINTS_REFERENCECOUNTback to summary
protected static final int SYSCONSTRAINTS_REFERENCECOUNT
SYSCONSTRAINTS_SCHEMAIDback to summary
protected static final int SYSCONSTRAINTS_SCHEMAID
SYSCONSTRAINTS_STATEback to summary
public static final int SYSCONSTRAINTS_STATE
SYSCONSTRAINTS_TABLEIDback to summary
protected static final int SYSCONSTRAINTS_TABLEID
SYSCONSTRAINTS_TYPEback to summary
protected static final int SYSCONSTRAINTS_TYPE
TABLENAME_STRINGback to summary
private static final String TABLENAME_STRING
uniquenessback to summary
private static final boolean[] uniqueness
uuidsback to summary
private static final String[] uuids

Constructor Detail

SYSCONSTRAINTSRowFactoryback to summary
pack-priv SYSCONSTRAINTSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)

Method Detail

buildColumnListback to summary
public SystemColumn[] buildColumnList()

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildColumnList.

Builds a list of columns suitable for creating this Catalog.

Returns:SystemColumn[]

array of SystemColumn suitable for making this catalog.

buildDescriptorback to summary
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildDescriptor.

Make a ConstraintDescriptor out of a SYSCONSTRAINTS row

Parameters
row:ExecRow

a SYSCONSTRAINTS row

parentTupleDescriptor:TupleDescriptor

Subconstraint descriptor with auxiliary info.

dd:DataDictionary

dataDictionary

Exceptions
StandardException:
thrown on failure
encodeCharacteristicsback to summary
private String encodeCharacteristics(boolean deferrable, boolean initiallyDeferred, boolean enforced)
getConstraintIdback to summary
protected UUID getConstraintId(ExecRow row) throws StandardException

Get the constraint ID of the row.

Parameters
row:ExecRow

The row from sysconstraints

Returns:UUID

UUID The constraint id

Exceptions
StandardException:
thrown on failure
getConstraintNameback to summary
protected String getConstraintName(ExecRow row) throws StandardException

Get the constraint name of the row.

Parameters
row:ExecRow

The row from sysconstraints

Returns:String

UUID The constraint name

Exceptions
StandardException:
thrown on failure
getConstraintTypeback to summary
protected int getConstraintType(ExecRow row) throws StandardException

Get the constraint type out of the row.

Parameters
row:ExecRow

The row from sysconstraints

Returns:int

int The constraint type as an int

Exceptions
StandardException:
thrown on failure
getSchemaIdback to summary
protected UUID getSchemaId(ExecRow row) throws StandardException

Get the schema ID of the row.

Parameters
row:ExecRow

The row from sysconstraints

Returns:UUID

UUID The schema

Exceptions
StandardException:
thrown on failure
getTableIdback to summary
protected UUID getTableId(ExecRow row) throws StandardException

Get the table ID of the row.

Parameters
row:ExecRow

The row from sysconstraints

Returns:UUID

UUID The table id

Exceptions
StandardException:
thrown on failure
makeRowback to summary
public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeRow.

Make a SYSCONTRAINTS row

Returns:ExecRow

Row suitable for inserting into SYSCONTRAINTS.

Exceptions
StandardException:
thrown on failure