Class SYSCONSTRAINTSRowFactory
java.lang.Object
org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
org.apache.derby.impl.sql.catalog.SYSCONSTRAINTSRowFactory
Factory for creating a SYSCONTRAINTS row.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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
static final int
protected static final int
protected static final int
private static final String
private static final boolean[]
private static final String[]
Fields inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
dvf, heapUUID, indexNames, indexUniqueness, indexUUID, tableUUID
-
Constructor Summary
ConstructorsConstructorDescriptionSYSCONSTRAINTSRowFactory
(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf) -
Method Summary
Modifier and TypeMethodDescriptionBuilds a list of columns suitable for creating this Catalog.buildDescriptor
(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) Make a ConstraintDescriptor out of a SYSCONSTRAINTS rowprivate String
encodeCharacteristics
(boolean deferrable, boolean initiallyDeferred, boolean enforced) protected UUID
getConstraintId
(ExecRow row) Get the constraint ID of the row.protected 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.makeRow
(TupleDescriptor td, TupleDescriptor parent) Make a SYSCONTRAINTS rowMethods 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, makeEmptyRowForCurrentVersion
-
Field Details
-
TABLENAME_STRING
- See Also:
-
SYSCONSTRAINTS_COLUMN_COUNT
protected static final int SYSCONSTRAINTS_COLUMN_COUNT- See Also:
-
SYSCONSTRAINTS_CONSTRAINTID
protected static final int SYSCONSTRAINTS_CONSTRAINTID- See Also:
-
SYSCONSTRAINTS_TABLEID
protected static final int SYSCONSTRAINTS_TABLEID- See Also:
-
SYSCONSTRAINTS_CONSTRAINTNAME
protected static final int SYSCONSTRAINTS_CONSTRAINTNAME- See Also:
-
SYSCONSTRAINTS_TYPE
protected static final int SYSCONSTRAINTS_TYPE- See Also:
-
SYSCONSTRAINTS_SCHEMAID
protected static final int SYSCONSTRAINTS_SCHEMAID- See Also:
-
SYSCONSTRAINTS_STATE
public static final int SYSCONSTRAINTS_STATE- See Also:
-
SYSCONSTRAINTS_REFERENCECOUNT
protected static final int SYSCONSTRAINTS_REFERENCECOUNT- See Also:
-
SYSCONSTRAINTS_INDEX1_ID
protected static final int SYSCONSTRAINTS_INDEX1_ID- See Also:
-
SYSCONSTRAINTS_INDEX2_ID
protected static final int SYSCONSTRAINTS_INDEX2_ID- See Also:
-
SYSCONSTRAINTS_INDEX3_ID
protected static final int SYSCONSTRAINTS_INDEX3_ID- See Also:
-
uniqueness
private static final boolean[] uniqueness -
indexColumnPositions
private static final int[][] indexColumnPositions -
uuids
-
-
Constructor Details
-
SYSCONSTRAINTSRowFactory
SYSCONSTRAINTSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
-
-
Method Details
-
makeRow
Make a SYSCONTRAINTS row- Overrides:
makeRow
in classCatalogRowFactory
- Returns:
- Row suitable for inserting into SYSCONTRAINTS.
- Throws:
StandardException
- thrown on failure
-
encodeCharacteristics
private String encodeCharacteristics(boolean deferrable, boolean initiallyDeferred, boolean enforced) -
buildDescriptor
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException Make a ConstraintDescriptor out of a SYSCONSTRAINTS row- Specified by:
buildDescriptor
in classCatalogRowFactory
- Parameters:
row
- a SYSCONSTRAINTS rowparentTupleDescriptor
- Subconstraint descriptor with auxiliary info.dd
- dataDictionary- Throws:
StandardException
- thrown on failure
-
getConstraintId
Get the constraint ID of the row.- Parameters:
row
- The row from sysconstraints- Returns:
- UUID The constraint id
- Throws:
StandardException
- thrown on failure
-
getConstraintName
Get the constraint name of the row.- Parameters:
row
- The row from sysconstraints- Returns:
- UUID The constraint name
- Throws:
StandardException
- thrown on failure
-
getSchemaId
Get the schema ID of the row.- Parameters:
row
- The row from sysconstraints- Returns:
- UUID The schema
- Throws:
StandardException
- thrown on failure
-
getTableId
Get the table ID of the row.- Parameters:
row
- The row from sysconstraints- Returns:
- UUID The table id
- Throws:
StandardException
- thrown on failure
-
getConstraintType
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
Builds a list of columns suitable for creating this Catalog.- Specified by:
buildColumnList
in classCatalogRowFactory
- Returns:
- array of SystemColumn suitable for making this catalog.
-