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[][]indexColumnPositionsprotected static intSYSCONSTRAINTS_COLUMN_COUNTprotected static intSYSCONSTRAINTS_CONSTRAINTIDprotected static intSYSCONSTRAINTS_CONSTRAINTNAMEprotected static intSYSCONSTRAINTS_INDEX1_IDprotected static intSYSCONSTRAINTS_INDEX2_IDprotected static intSYSCONSTRAINTS_INDEX3_IDprotected static intSYSCONSTRAINTS_REFERENCECOUNTprotected static intSYSCONSTRAINTS_SCHEMAIDstatic intSYSCONSTRAINTS_STATEprotected static intSYSCONSTRAINTS_TABLEIDprotected static intSYSCONSTRAINTS_TYPEprivate static java.lang.StringTABLENAME_STRINGprivate static boolean[]uniquenessprivate 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.TupleDescriptorbuildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd)Make a ConstraintDescriptor out of a SYSCONSTRAINTS rowprivate java.lang.StringencodeCharacteristics(boolean deferrable, boolean initiallyDeferred, boolean enforced)protected UUIDgetConstraintId(ExecRow row)Get the constraint ID of the row.protected java.lang.StringgetConstraintName(ExecRow row)Get the constraint name of the row.protected intgetConstraintType(ExecRow row)Get the constraint type out of the row.protected UUIDgetSchemaId(ExecRow row)Get the schema ID of the row.protected UUIDgetTableId(ExecRow row)Get the table ID of the row.ExecRowmakeRow(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:
makeRowin 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:
buildDescriptorin 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:
buildColumnListin classCatalogRowFactory- Returns:
- array of SystemColumn suitable for making this catalog.
-
-