Class SYSCONSTRAINTSRowFactory
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
-
- org.apache.derby.impl.sql.catalog.SYSCONSTRAINTSRowFactory
-
public class SYSCONSTRAINTSRowFactory extends CatalogRowFactory
Factory for creating a SYSCONTRAINTS row.
-
-
Field Summary
Fields Modifier and Type Field Description 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
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
Constructors Constructor Description SYSCONSTRAINTSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 rowprivate java.lang.String
encodeCharacteristics(boolean deferrable, boolean initiallyDeferred, boolean enforced)
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, makeEmptyRowForCurrentVersion
-
-
-
-
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
public 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 classCatalogRowFactory
- Returns:
- Row suitable for inserting into SYSCONTRAINTS.
- Throws:
StandardException
- thrown on failure
-
encodeCharacteristics
private java.lang.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
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 classCatalogRowFactory
- Returns:
- array of SystemColumn suitable for making this catalog.
-
-