public abstract class CatalogRowFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
catalogName |
private int |
columnCount |
protected DataValueFactory |
dvf |
private ExecutionFactory |
ef |
protected UUID |
heapUUID |
protected int[][] |
indexColumnPositions |
private int |
indexCount |
protected java.lang.String[] |
indexNames |
protected boolean[] |
indexUniqueness |
protected UUID[] |
indexUUID |
protected UUID |
tableUUID |
private UUIDFactory |
uuidf |
Constructor and Description |
---|
CatalogRowFactory(UUIDFactory uuidf,
ExecutionFactory ef,
DataValueFactory dvf) |
Modifier and Type | Method and Description |
---|---|
abstract SystemColumn[] |
buildColumnList()
builds a column list for the catalog
|
abstract TupleDescriptor |
buildDescriptor(ExecRow row,
TupleDescriptor parentTuple,
DataDictionary dataDictionary)
builds a tuple descriptor from a row
|
java.lang.String |
generateIndexName(int indexNumber)
Generate an index name based on the index number.
|
java.lang.String |
getCanonicalHeapName()
Get the name for the heap conglomerate underlying this catalog.
|
UUID |
getCanonicalHeapUUID()
Get the UUID of the heap underlying this catalog.
|
UUID |
getCanonicalIndexUUID(int indexNumber)
Get the UUID of the numbered index.
|
UUID |
getCanonicalTableUUID()
Get the UUID of this catalog.
|
java.lang.String |
getCatalogName()
get the name of the catalog
|
java.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.
|
DataValueFactory |
getDataValueFactory()
Gets the DataValueFactory for this connection.
|
ExecutionFactory |
getExecutionFactory()
Gets a ExecutionFactory
|
int |
getHeapColumnCount()
Get the number of columns in the heap.
|
int |
getIndexColumnCount(int indexNum)
Get the number of columns in the index for the specified index number.
|
int[] |
getIndexColumnPositions(int indexNumber)
Return the column positions for a given index number
|
java.lang.String |
getIndexName(int indexNum)
Get the name for the specified index number.
|
int |
getNumIndexes()
get the number of indexes on this catalog
|
int |
getPrimaryKeyIndexNumber()
Get the index number for the primary key index on this catalog.
|
UUIDFactory |
getUUIDFactory()
Get the UUID factory
|
void |
initInfo(int columnCount,
java.lang.String catalogName,
int[][] indexColumnPositions,
boolean[] indexUniqueness,
java.lang.String[] uuidStrings)
Initialize info, including array of index names and array of
index column counts.
|
boolean |
isIndexUnique(int indexNumber)
Return whether or not the specified index is unique.
|
ExecRow |
makeEmptyRow()
Return an empty row for this conglomerate.
|
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.
|
ExecRow |
makeRow(TupleDescriptor td,
TupleDescriptor parent)
most subclasses should provide this method.
|
protected java.lang.String[] indexNames
protected int[][] indexColumnPositions
protected boolean[] indexUniqueness
protected UUID tableUUID
protected UUID heapUUID
protected UUID[] indexUUID
protected DataValueFactory dvf
private final ExecutionFactory ef
private UUIDFactory uuidf
private int indexCount
private int columnCount
private java.lang.String catalogName
public CatalogRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
public ExecutionFactory getExecutionFactory()
public UUIDFactory getUUIDFactory()
public UUID getCanonicalTableUUID()
public UUID getCanonicalHeapUUID()
public UUID getCanonicalIndexUUID(int indexNumber)
indexNumber
- The (0-based) index number.public int getIndexColumnCount(int indexNum)
indexNum
- The (0-based) index number.public java.lang.String getCanonicalHeapName()
public java.lang.String getIndexName(int indexNum)
indexNum
- The (0-based) index number.public boolean isIndexUnique(int indexNumber)
indexNumber
- The (0-based) index number.public DataValueFactory getDataValueFactory()
public java.lang.String generateIndexName(int indexNumber)
indexNumber
- Number of indexpublic int getNumIndexes()
public java.lang.String getCatalogName()
public void initInfo(int columnCount, java.lang.String catalogName, int[][] indexColumnPositions, boolean[] indexUniqueness, java.lang.String[] uuidStrings)
columnCount
- number of columns in the base table.catalogName
- name of the catalog (the case might have to be converted).indexColumnPositions
- 2 dim array of ints specifying the base
column positions for each index.indexUniqueness
- Uniqueness of the indicesuuidStrings
- Array of stringified UUIDs for table and its conglomeratespublic java.util.Properties getCreateHeapProperties()
public java.util.Properties getCreateIndexProperties(int indexNumber)
indexNumber
- The specified index number.public int getPrimaryKeyIndexNumber()
public int getHeapColumnCount() throws StandardException
StandardException
public ExecRow makeEmptyRow() throws StandardException
StandardException
public ExecRow makeEmptyRowForCurrentVersion() throws StandardException
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.
StandardException
- if an error happens when creating the rowpublic ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException
StandardException
public abstract TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTuple, DataDictionary dataDictionary) throws StandardException
StandardException
public abstract SystemColumn[] buildColumnList() throws StandardException
StandardException
public int[] getIndexColumnPositions(int indexNumber)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.