Class SYSCOLUMNSRowFactory
java.lang.Object
org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory
Factory for creating a SYSCOLUMNS row.
- Version:
- 0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataDictionary//////////////////////////////////////////////////////////////////////////private static final int[][]protected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final int(package private) static final Stringprivate static final boolean[]private static final String[]Fields inherited from class CatalogRowFactory
dvf, heapUUID, indexNames, indexUniqueness, indexUUID, tableUUID -
Constructor Summary
ConstructorsConstructorDescriptionSYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf) SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, String myName) -
Method Summary
Modifier and TypeMethodDescriptionBuilds a list of columns suitable for creating this Catalog.buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) Make a ColumnDescriptor out of a SYSCOLUMNS rowGet the Properties associated with creating the heap.getCreateIndexProperties(int indexNumber) Get the Properties associated with creating the specified index.intGet the number of columns in the heap.intGet the index number for the primary key index on this catalog.Create an empty row for this conglomerate, in the format that would be used in a database that was created with, or hard upgraded to, the currently running version.private ExecRowmakeRow(TupleDescriptor td, int columnCount) makeRow(TupleDescriptor td, TupleDescriptor parent) Make a SYSCOLUMNS rowMethods inherited from class CatalogRowFactory
generateIndexName, getCanonicalHeapName, getCanonicalHeapUUID, getCanonicalIndexUUID, getCanonicalTableUUID, getCatalogName, getDataValueFactory, getExecutionFactory, getIndexColumnCount, getIndexColumnPositions, getIndexName, getNumIndexes, getUUIDFactory, initInfo, isIndexUnique, makeEmptyRow
-
Field Details
-
TABLENAME_STRING
- See Also:
-
SYSCOLUMNS_COLUMN_COUNT
protected static final int SYSCOLUMNS_COLUMN_COUNT- See Also:
-
SYSCOLUMNS_TABLEID
protected static final int SYSCOLUMNS_TABLEID- See Also:
-
SYSCOLUMNS_REFERENCEID
protected static final int SYSCOLUMNS_REFERENCEID- See Also:
-
SYSCOLUMNS_COLUMNNAME
protected static final int SYSCOLUMNS_COLUMNNAME- See Also:
-
SYSCOLUMNS_COLUMNNUMBER
protected static final int SYSCOLUMNS_COLUMNNUMBER- See Also:
-
SYSCOLUMNS_COLUMNDATATYPE
protected static final int SYSCOLUMNS_COLUMNDATATYPE- See Also:
-
SYSCOLUMNS_COLUMNDEFAULT
protected static final int SYSCOLUMNS_COLUMNDEFAULT- See Also:
-
SYSCOLUMNS_COLUMNDEFAULTID
protected static final int SYSCOLUMNS_COLUMNDEFAULTID- See Also:
-
SYSCOLUMNS_AUTOINCREMENTVALUE
protected static final int SYSCOLUMNS_AUTOINCREMENTVALUE- See Also:
-
SYSCOLUMNS_AUTOINCREMENTSTART
protected static final int SYSCOLUMNS_AUTOINCREMENTSTART- See Also:
-
SYSCOLUMNS_AUTOINCREMENTINC
protected static final int SYSCOLUMNS_AUTOINCREMENTINC- See Also:
-
SYSCOLUMNS_AUTOINCREMENTINCCYCLE
protected static final int SYSCOLUMNS_AUTOINCREMENTINCCYCLE- See Also:
-
SYSCOLUMNS_INDEX1_ID
protected static final int SYSCOLUMNS_INDEX1_ID- See Also:
-
SYSCOLUMNS_INDEX2_ID
protected static final int SYSCOLUMNS_INDEX2_ID- See Also:
-
uniqueness
private static final boolean[] uniqueness -
uuids
-
indexColumnPositions
private static final int[][] indexColumnPositions -
dataDictionary
//////////////////////////////////////////////////////////////////////////
-
-
Constructor Details
-
SYSCOLUMNSRowFactory
SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf) -
SYSCOLUMNSRowFactory
SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, String myName)
-
-
Method Details
-
makeRow
Make a SYSCOLUMNS row- Overrides:
makeRowin classCatalogRowFactory- Returns:
- Row suitable for inserting into SYSCOLUMNS.
- Throws:
StandardException- thrown on failure
-
makeEmptyRowForCurrentVersion
Description copied from class:CatalogRowFactoryCreate an empty row for this conglomerate, in the format that would be used in a database that was created with, or hard upgraded to, the currently running version. That is, even if the database is only soft-upgraded, this method should return a row in the new format.
This method is for use in code that creates the catalogs, or that upgrades the format of the catalogs to the newest version. Other code should call
CatalogRowFactory.makeEmptyRow(), which returns a row in the format used in the old database version if the database is soft-upgraded.- Overrides:
makeEmptyRowForCurrentVersionin classCatalogRowFactory- Returns:
- an empty row
- Throws:
StandardException- if an error happens when creating the row
-
makeRow
- Throws:
StandardException
-
getCreateHeapProperties
Get the Properties associated with creating the heap.- Overrides:
getCreateHeapPropertiesin classCatalogRowFactory- Returns:
- The Properties associated with creating the heap.
-
getCreateIndexProperties
Get the Properties associated with creating the specified index.- Overrides:
getCreateIndexPropertiesin classCatalogRowFactory- Parameters:
indexNumber- The specified index number.- Returns:
- The Properties associated with creating the specified index.
-
buildDescriptor
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException Make a ColumnDescriptor out of a SYSCOLUMNS row- Specified by:
buildDescriptorin classCatalogRowFactory- Parameters:
row- a SYSCOLUMNS rowparentTupleDescriptor- The UniqueTupleDescriptor for the object that is tied to this columndd- dataDictionary- Returns:
- a column descriptor equivalent to a SYSCOLUMNS row
- Throws:
StandardException- thrown on failure
-
getPrimaryKeyIndexNumber
public int getPrimaryKeyIndexNumber()Get the index number for the primary key index on this catalog.- Overrides:
getPrimaryKeyIndexNumberin classCatalogRowFactory- Returns:
- a 0-based number
-
buildColumnList
Builds a list of columns suitable for creating this Catalog.- Specified by:
buildColumnListin classCatalogRowFactory- Returns:
- array of SystemColumn suitable for making this catalog.
- Throws:
StandardException
-
getHeapColumnCount
Description copied from class:CatalogRowFactoryGet the number of columns in the heap.- Overrides:
getHeapColumnCountin classCatalogRowFactory- Returns:
- The number of columns in the heap.
- Throws:
StandardException
-