Top Description Fields Constructors Methods
org.apache.derby.impl.sql.catalog

public Class SYSCOLUMNSRowFactory

extends CatalogRowFactory
Class Inheritance
Imports
java.sql.Types, java.util.Properties, org.apache.derby.catalog.TypeDescriptor, .UUID, org.apache.derby.catalog.types.DefaultInfoImpl, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.Property, org.apache.derby.iapi.types.*, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.uuid.UUIDFactory, org.apache.derby.iapi.sql.dictionary.CatalogRowFactory, .ColumnDescriptor, .DataDescriptorGenerator, .DataDictionary, .SystemColumn, .TupleDescriptor, .UniqueTupleDescriptor, org.apache.derby.iapi.sql.execute.ExecRow, .ExecutionFactory, org.apache.derby.iapi.store.raw.RawStoreFactory, org.apache.derby.impl.sql.compile.ColumnDefinitionNode

Factory for creating a SYSCOLUMNS row.
Version
0.1

Field Summary

Modifier and TypeField and Description
private final DataDictionary
private 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
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
pack-priv static final String
private static final boolean[]
private static final String[]
Inherited from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory:
dvfheapUUIDindexNamesindexUniquenessindexUUIDtableUUID

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public SystemColumn[]

Returns:

array of SystemColumn suitable for making this catalog.
buildColumnList
()

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildColumnList.

Builds a list of columns suitable for creating this Catalog.

public TupleDescriptor

Returns:

a column descriptor equivalent to a SYSCOLUMNS row
buildDescriptor
(ExecRow
a SYSCOLUMNS row
row
,
TupleDescriptor
The UniqueTupleDescriptor for the object that is tied to this column
parentTupleDescriptor
,
DataDictionary
dataDictionary
dd
)

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildDescriptor.

Make a ColumnDescriptor out of a SYSCOLUMNS row

public Properties

Returns:

The Properties associated with creating the heap.
getCreateHeapProperties
()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getCreateHeapProperties.

Get the Properties associated with creating the heap.

public Properties

Returns:

The Properties associated with creating the specified index.
getCreateIndexProperties
(int
The specified index number.
indexNumber
)

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getCreateIndexProperties.

Get the Properties associated with creating the specified index.

public int
public int

Returns:

a 0-based number
getPrimaryKeyIndexNumber
()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getPrimaryKeyIndexNumber.

Get the index number for the primary key index on this catalog.

public ExecRow
makeEmptyRowForCurrentVersion()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.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.

public ExecRow

Returns:

Row suitable for inserting into SYSCOLUMNS.
makeRow
(TupleDescriptor td, TupleDescriptor parent)

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeRow.

Make a SYSCOLUMNS row

private ExecRow
makeRow(TupleDescriptor td, int columnCount)

Inherited from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory:
generateIndexNamegetCanonicalHeapNamegetCanonicalHeapUUIDgetCanonicalIndexUUIDgetCanonicalTableUUIDgetCatalogNamegetDataValueFactorygetExecutionFactorygetIndexColumnCountgetIndexColumnPositionsgetIndexNamegetNumIndexesgetUUIDFactoryinitInfoisIndexUniquemakeEmptyRow

Field Detail

dataDictionaryback to summary
private final DataDictionary dataDictionary
indexColumnPositionsback to summary
private static final int[][] indexColumnPositions

Hides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.indexColumnPositions.

SYSCOLUMNS_AUTOINCREMENTINCback to summary
protected static final int SYSCOLUMNS_AUTOINCREMENTINC
SYSCOLUMNS_AUTOINCREMENTINCCYCLEback to summary
protected static final int SYSCOLUMNS_AUTOINCREMENTINCCYCLE
SYSCOLUMNS_AUTOINCREMENTSTARTback to summary
protected static final int SYSCOLUMNS_AUTOINCREMENTSTART
SYSCOLUMNS_AUTOINCREMENTVALUEback to summary
protected static final int SYSCOLUMNS_AUTOINCREMENTVALUE
SYSCOLUMNS_COLUMN_COUNTback to summary
protected static final int SYSCOLUMNS_COLUMN_COUNT
SYSCOLUMNS_COLUMNDATATYPEback to summary
protected static final int SYSCOLUMNS_COLUMNDATATYPE
SYSCOLUMNS_COLUMNDEFAULTback to summary
protected static final int SYSCOLUMNS_COLUMNDEFAULT
SYSCOLUMNS_COLUMNDEFAULTIDback to summary
protected static final int SYSCOLUMNS_COLUMNDEFAULTID
SYSCOLUMNS_COLUMNNAMEback to summary
protected static final int SYSCOLUMNS_COLUMNNAME
SYSCOLUMNS_COLUMNNUMBERback to summary
protected static final int SYSCOLUMNS_COLUMNNUMBER
SYSCOLUMNS_INDEX1_IDback to summary
protected static final int SYSCOLUMNS_INDEX1_ID
SYSCOLUMNS_INDEX2_IDback to summary
protected static final int SYSCOLUMNS_INDEX2_ID
SYSCOLUMNS_REFERENCEIDback to summary
protected static final int SYSCOLUMNS_REFERENCEID
SYSCOLUMNS_TABLEIDback to summary
protected static final int SYSCOLUMNS_TABLEID
TABLENAME_STRINGback to summary
pack-priv static final String TABLENAME_STRING
uniquenessback to summary
private static final boolean[] uniqueness
uuidsback to summary
private static final String[] uuids

Constructor Detail

SYSCOLUMNSRowFactoryback to summary
pack-priv SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
SYSCOLUMNSRowFactoryback to summary
pack-priv SYSCOLUMNSRowFactory(DataDictionary dd, UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, String myName)

Method Detail

buildColumnListback to summary
public SystemColumn[] buildColumnList() throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildColumnList.

Builds a list of columns suitable for creating this Catalog.

Returns:SystemColumn[]

array of SystemColumn suitable for making this catalog.

buildDescriptorback to summary
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildDescriptor.

Make a ColumnDescriptor out of a SYSCOLUMNS row

Parameters
row:ExecRow

a SYSCOLUMNS row

parentTupleDescriptor:TupleDescriptor

The UniqueTupleDescriptor for the object that is tied to this column

dd:DataDictionary

dataDictionary

Returns:TupleDescriptor

a column descriptor equivalent to a SYSCOLUMNS row

Exceptions
StandardException:
thrown on failure
getCreateHeapPropertiesback to summary
public Properties getCreateHeapProperties()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getCreateHeapProperties.

Get the Properties associated with creating the heap.

Returns:Properties

The Properties associated with creating the heap.

getCreateIndexPropertiesback to summary
public Properties getCreateIndexProperties(int indexNumber)

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getCreateIndexProperties.

Get the Properties associated with creating the specified index.

Parameters
indexNumber:int

The specified index number.

Returns:Properties

The Properties associated with creating the specified index.

getHeapColumnCountback to summary
public int getHeapColumnCount() throws StandardException

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getHeapColumnCount.

Doc from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getHeapColumnCount.

Get the number of columns in the heap.

Returns:int

The number of columns in the heap.

Annotations
@Override
getPrimaryKeyIndexNumberback to summary
public int getPrimaryKeyIndexNumber()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getPrimaryKeyIndexNumber.

Get the index number for the primary key index on this catalog.

Returns:int

a 0-based number

makeEmptyRowForCurrentVersionback to summary
public ExecRow makeEmptyRowForCurrentVersion() throws StandardException

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeEmptyRowForCurrentVersion.

Doc from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.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. 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 makeEmptyRow(), which returns a row in the format used in the old database version if the database is soft-upgraded.

Returns:ExecRow

an empty row

Annotations
@Override
Exceptions
StandardException:
if an error happens when creating the row
makeRowback to summary
public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeRow.

Make a SYSCOLUMNS row

Returns:ExecRow

Row suitable for inserting into SYSCOLUMNS.

Annotations
@Override
Exceptions
StandardException:
thrown on failure
makeRowback to summary
private ExecRow makeRow(TupleDescriptor td, int columnCount) throws StandardException