org.apache.derby.impl.sql.catalog
Class SYSALIASESRowFactory

java.lang.Object
  extended byorg.apache.derby.iapi.sql.dictionary.CatalogRowFactory
      extended byorg.apache.derby.impl.sql.catalog.SYSALIASESRowFactory

class SYSALIASESRowFactory
extends CatalogRowFactory

Factory for creating a SYSALIASES row. Here are the directions for adding a new system supplied alias. Misc: All system supplied aliases are class aliases at this point. Additional arrays will need to be added if we supply system aliases of other types. The preloadAliasIDs array is an array of hard coded UUIDs for the system supplied aliases. The preloadAliases array is the array of aliases for the system supplied aliases. This array is in alphabetical order by package and class in Xena. Each alias is the uppercase class name of the alias. The preloadJavaClassNames array is the array of full package.class names for the system supplied aliases. This array is in alphabetical order by package and class in Xena. SYSALIASES_NUM_BOOT_ROWS is the number of boot rows in sys.sysaliases in a new database.

Author:
jerry

Field Summary
private static java.lang.String[][] indexColumnNames
           
private static int[][] indexColumnPositions
           
private static int SYSALIASES_ALIAS
           
private static int SYSALIASES_ALIASID
           
static int SYSALIASES_ALIASINFO
           
private static int SYSALIASES_ALIASTYPE
           
private static int SYSALIASES_COLUMN_COUNT
           
protected static int SYSALIASES_INDEX1_ID
           
protected static int SYSALIASES_INDEX2_ID
           
protected static int SYSALIASES_INDEX3_ID
           
private static int SYSALIASES_JAVACLASSNAME
           
private static int SYSALIASES_NAMESPACE
           
private static int SYSALIASES_SCHEMAID
           
private static int SYSALIASES_SPECIFIC_NAME
           
private static int SYSALIASES_SYSTEMALIAS
           
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
SYSALIASESRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf, boolean convertIdToLower)
           
 
Method Summary
 SystemColumn[] buildColumnList()
          Builds a list of columns suitable for creating this Catalog.
 TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd)
          Make a AliasDescriptor out of a SYSALIASES row
 ExecIndexRow buildEmptyIndexRow(int indexNumber, RowLocation rowLocation)
          Builds an empty index row.
 ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent)
          Make a SYSALIASES row
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
checkIndexNumber, convertIdCase, generateIndexName, getCanonicalHeapName, getCanonicalHeapUUID, getCanonicalIndexUUID, getCanonicalTableUUID, getCatalogName, getCreateHeapProperties, getCreateIndexProperties, getDataValueFactory, getExecutionFactory, getHeapColumnCount, getIndexColumnCount, getIndexColumnNames, getIndexColumnPositions, getIndexName, getNumIndexes, getPrimaryKeyIndexNumber, getUUIDFactory, initInfo, isIndexUnique, makeEmptyRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSALIASES_COLUMN_COUNT

private static final int SYSALIASES_COLUMN_COUNT
See Also:
Constant Field Values

SYSALIASES_ALIASID

private static final int SYSALIASES_ALIASID
See Also:
Constant Field Values

SYSALIASES_ALIAS

private static final int SYSALIASES_ALIAS
See Also:
Constant Field Values

SYSALIASES_SCHEMAID

private static final int SYSALIASES_SCHEMAID
See Also:
Constant Field Values

SYSALIASES_JAVACLASSNAME

private static final int SYSALIASES_JAVACLASSNAME
See Also:
Constant Field Values

SYSALIASES_ALIASTYPE

private static final int SYSALIASES_ALIASTYPE
See Also:
Constant Field Values

SYSALIASES_NAMESPACE

private static final int SYSALIASES_NAMESPACE
See Also:
Constant Field Values

SYSALIASES_SYSTEMALIAS

private static final int SYSALIASES_SYSTEMALIAS
See Also:
Constant Field Values

SYSALIASES_ALIASINFO

public static final int SYSALIASES_ALIASINFO
See Also:
Constant Field Values

SYSALIASES_SPECIFIC_NAME

private static final int SYSALIASES_SPECIFIC_NAME
See Also:
Constant Field Values

SYSALIASES_INDEX1_ID

protected static final int SYSALIASES_INDEX1_ID
See Also:
Constant Field Values

SYSALIASES_INDEX2_ID

protected static final int SYSALIASES_INDEX2_ID
See Also:
Constant Field Values

SYSALIASES_INDEX3_ID

protected static final int SYSALIASES_INDEX3_ID
See Also:
Constant Field Values

uniqueness

private static final boolean[] uniqueness

indexColumnPositions

private static int[][] indexColumnPositions

indexColumnNames

private static java.lang.String[][] indexColumnNames

uuids

private static final java.lang.String[] uuids
Constructor Detail

SYSALIASESRowFactory

public SYSALIASESRowFactory(UUIDFactory uuidf,
                            ExecutionFactory ef,
                            DataValueFactory dvf,
                            boolean convertIdToLower)
Method Detail

makeRow

public ExecRow makeRow(TupleDescriptor td,
                       TupleDescriptor parent)
                throws StandardException
Make a SYSALIASES row

Overrides:
makeRow in class CatalogRowFactory
Returns:
Row suitable for inserting into SYSALIASES.
Throws:
StandardException - thrown on failure

buildEmptyIndexRow

public ExecIndexRow buildEmptyIndexRow(int indexNumber,
                                       RowLocation rowLocation)
                                throws StandardException
Builds an empty index row.

Specified by:
buildEmptyIndexRow in class CatalogRowFactory
Parameters:
indexNumber - Index to build empty row for.
rowLocation - Row location for last column of index row
Returns:
corresponding empty index row
Throws:
StandardException - thrown on failure

buildDescriptor

public TupleDescriptor buildDescriptor(ExecRow row,
                                       TupleDescriptor parentTupleDescriptor,
                                       DataDictionary dd)
                                throws StandardException
Make a AliasDescriptor out of a SYSALIASES row

Specified by:
buildDescriptor in class CatalogRowFactory
Parameters:
row - a SYSALIASES row
parentTupleDescriptor - Null for this kind of descriptor.
dd - dataDictionary
Throws:
StandardException - thrown on failure

buildColumnList

public SystemColumn[] buildColumnList()
Builds a list of columns suitable for creating this Catalog.

Specified by:
buildColumnList in class CatalogRowFactory
Returns:
array of SystemColumn suitable for making this catalog.


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.