Class SYSCOLUMNSRowFactory
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
-
- org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory
-
public class SYSCOLUMNSRowFactory extends CatalogRowFactory
Factory for creating a SYSCOLUMNS row.- Version:
- 0.1
-
-
Field Summary
Fields Modifier and Type Field Description private DataDictionary
dataDictionary
private static int[][]
indexColumnPositions
protected static int
SYSCOLUMNS_AUTOINCREMENTINC
protected static int
SYSCOLUMNS_AUTOINCREMENTINCCYCLE
protected static int
SYSCOLUMNS_AUTOINCREMENTSTART
protected static int
SYSCOLUMNS_AUTOINCREMENTVALUE
protected static int
SYSCOLUMNS_COLUMN_COUNT
protected static int
SYSCOLUMNS_COLUMNDATATYPE
protected static int
SYSCOLUMNS_COLUMNDEFAULT
protected static int
SYSCOLUMNS_COLUMNDEFAULTID
protected static int
SYSCOLUMNS_COLUMNNAME
protected static int
SYSCOLUMNS_COLUMNNUMBER
protected static int
SYSCOLUMNS_INDEX1_ID
protected static int
SYSCOLUMNS_INDEX2_ID
protected static int
SYSCOLUMNS_REFERENCEID
protected static int
SYSCOLUMNS_TABLEID
(package 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 SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, java.lang.String myName)
-
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 ColumnDescriptor out of a SYSCOLUMNS rowjava.util.Properties
getCreateHeapProperties()
Get the Properties associated with creating the heap.java.util.Properties
getCreateIndexProperties(int indexNumber)
Get the Properties associated with creating the specified index.int
getHeapColumnCount()
Get the number of columns in the heap.int
getPrimaryKeyIndexNumber()
Get the index number for the primary key index on this catalog.ExecRow
makeEmptyRowForCurrentVersion()
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 ExecRow
makeRow(TupleDescriptor td, int columnCount)
ExecRow
makeRow(TupleDescriptor td, TupleDescriptor parent)
Make a SYSCOLUMNS row-
Methods inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
generateIndexName, getCanonicalHeapName, getCanonicalHeapUUID, getCanonicalIndexUUID, getCanonicalTableUUID, getCatalogName, getDataValueFactory, getExecutionFactory, getIndexColumnCount, getIndexColumnPositions, getIndexName, getNumIndexes, getUUIDFactory, initInfo, isIndexUnique, makeEmptyRow
-
-
-
-
Field Detail
-
TABLENAME_STRING
static final java.lang.String TABLENAME_STRING
- See Also:
- Constant Field Values
-
SYSCOLUMNS_COLUMN_COUNT
protected static final int SYSCOLUMNS_COLUMN_COUNT
- See Also:
- Constant Field Values
-
SYSCOLUMNS_TABLEID
protected static final int SYSCOLUMNS_TABLEID
- See Also:
- Constant Field Values
-
SYSCOLUMNS_REFERENCEID
protected static final int SYSCOLUMNS_REFERENCEID
- See Also:
- Constant Field Values
-
SYSCOLUMNS_COLUMNNAME
protected static final int SYSCOLUMNS_COLUMNNAME
- See Also:
- Constant Field Values
-
SYSCOLUMNS_COLUMNNUMBER
protected static final int SYSCOLUMNS_COLUMNNUMBER
- See Also:
- Constant Field Values
-
SYSCOLUMNS_COLUMNDATATYPE
protected static final int SYSCOLUMNS_COLUMNDATATYPE
- See Also:
- Constant Field Values
-
SYSCOLUMNS_COLUMNDEFAULT
protected static final int SYSCOLUMNS_COLUMNDEFAULT
- See Also:
- Constant Field Values
-
SYSCOLUMNS_COLUMNDEFAULTID
protected static final int SYSCOLUMNS_COLUMNDEFAULTID
- See Also:
- Constant Field Values
-
SYSCOLUMNS_AUTOINCREMENTVALUE
protected static final int SYSCOLUMNS_AUTOINCREMENTVALUE
- See Also:
- Constant Field Values
-
SYSCOLUMNS_AUTOINCREMENTSTART
protected static final int SYSCOLUMNS_AUTOINCREMENTSTART
- See Also:
- Constant Field Values
-
SYSCOLUMNS_AUTOINCREMENTINC
protected static final int SYSCOLUMNS_AUTOINCREMENTINC
- See Also:
- Constant Field Values
-
SYSCOLUMNS_AUTOINCREMENTINCCYCLE
protected static final int SYSCOLUMNS_AUTOINCREMENTINCCYCLE
- See Also:
- Constant Field Values
-
SYSCOLUMNS_INDEX1_ID
protected static final int SYSCOLUMNS_INDEX1_ID
- See Also:
- Constant Field Values
-
SYSCOLUMNS_INDEX2_ID
protected static final int SYSCOLUMNS_INDEX2_ID
- See Also:
- Constant Field Values
-
uniqueness
private static final boolean[] uniqueness
-
uuids
private static final java.lang.String[] uuids
-
indexColumnPositions
private static final int[][] indexColumnPositions
-
dataDictionary
private final DataDictionary dataDictionary
-
-
Constructor Detail
-
SYSCOLUMNSRowFactory
SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
-
SYSCOLUMNSRowFactory
SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, java.lang.String myName)
-
-
Method Detail
-
makeRow
public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException
Make a SYSCOLUMNS row- Overrides:
makeRow
in classCatalogRowFactory
- Returns:
- Row suitable for inserting into SYSCOLUMNS.
- Throws:
StandardException
- thrown on failure
-
makeEmptyRowForCurrentVersion
public ExecRow makeEmptyRowForCurrentVersion() throws StandardException
Description copied from class:CatalogRowFactory
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. 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:
makeEmptyRowForCurrentVersion
in classCatalogRowFactory
- Returns:
- an empty row
- Throws:
StandardException
- if an error happens when creating the row
-
makeRow
private ExecRow makeRow(TupleDescriptor td, int columnCount) throws StandardException
- Throws:
StandardException
-
getCreateHeapProperties
public java.util.Properties getCreateHeapProperties()
Get the Properties associated with creating the heap.- Overrides:
getCreateHeapProperties
in classCatalogRowFactory
- Returns:
- The Properties associated with creating the heap.
-
getCreateIndexProperties
public java.util.Properties getCreateIndexProperties(int indexNumber)
Get the Properties associated with creating the specified index.- Overrides:
getCreateIndexProperties
in 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:
buildDescriptor
in 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:
getPrimaryKeyIndexNumber
in classCatalogRowFactory
- Returns:
- a 0-based number
-
buildColumnList
public SystemColumn[] buildColumnList() throws StandardException
Builds a list of columns suitable for creating this Catalog.- Specified by:
buildColumnList
in classCatalogRowFactory
- Returns:
- array of SystemColumn suitable for making this catalog.
- Throws:
StandardException
-
getHeapColumnCount
public int getHeapColumnCount() throws StandardException
Description copied from class:CatalogRowFactory
Get the number of columns in the heap.- Overrides:
getHeapColumnCount
in classCatalogRowFactory
- Returns:
- The number of columns in the heap.
- Throws:
StandardException
-
-