wt.introspection
Class BaseTableInfo

java.lang.Object
  extended bywt.introspection.TableInfo
      extended bywt.introspection.BaseTableInfo
All Implemented Interfaces:
Externalizable, Serializable

public class BaseTableInfo
extends TableInfo
implements Externalizable

BaseTableInfo is the class for providing database table meta-data

  


Supported API: false

Extendable: false

See Also:
WTIntrospector, ClassInfo, ColumnDescriptor, Serialized Form

Field Summary
private  String absoluteDir
           
private  com.objectspace.jgl.OrderedMap columnTable
           
private  String[] compositeIndexString
           
private  String[][] compositeIndices
           
private  String[][] compositeUniques
           
private  String[] compositeUniqueString
           
static long externalizationVersionUID
          Version identifier for managing compatibility and evolution of externalizable classes.
private  String indexTableSpaceName
           
private  ColumnDescriptor[] myColumns
           
private  com.objectspace.jgl.HashMap myComposites
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String tableSize
           
private  String tableSpaceName
           
(package private) static boolean VERBOSE
           
 
Fields inherited from class wt.introspection.TableInfo
COLUMN_NAME_MAX_LENGTH, columns, owner
 
Constructor Summary
BaseTableInfo()
          Constructor
BaseTableInfo(String table_name, String table_space_name, String table_size, String index_table_space_name, String[] compositeIndexNames, String[] compositeUniqueNames, ColumnDescriptor[] cols, com.objectspace.jgl.HashMap composites)
           
 
Method Summary
protected  void accumulateColumns()
           
private  void accumulateCompositeIndices()
           
private  void accumulateCompositeUniques()
           
private  ColumnDescriptor[] addInfoCols(ColumnDescriptor[] cols, BaseTableInfo anotherInfo)
           
private  com.objectspace.jgl.OrderedMap addInfoCols(com.objectspace.jgl.OrderedMap cols, BaseTableInfo anotherInfo)
           
private  void addInfoUniques(ArrayList accumulator, String[][] another, int index)
           
 ColumnDescriptor getColumnDescriptor(String name)
          Obtain a column descriptor by name
private  String getColumnName(String attrName)
           
 String[][] getCompositeIndices()
          Obtain the composite indices
 String[][] getCompositeUniques()
          Obtain the composite uniqueness constraints
 String getIndexTableSpaceName()
          Get the index table space name.
 String getTableSize()
          Get the table size.
 String getTableSpaceName()
          Get the table space name.
private  void handleForeignKeyLink()
           
(package private)  boolean isaComposite(String attrName)
           
private  String parseElement(String element)
           
private  void parseToUnique(ArrayList accumulator, String items, String separator)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
(package private)  void setAbsoluteDir(String absolute_dir)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.introspection.TableInfo
getColumnDescriptors, getTablename, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

externalizationVersionUID

public static final long externalizationVersionUID
Version identifier for managing compatibility and evolution of externalizable classes.

See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

absoluteDir

private String absoluteDir

VERBOSE

static boolean VERBOSE

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

tableSpaceName

private String tableSpaceName

tableSize

private String tableSize

indexTableSpaceName

private String indexTableSpaceName

compositeIndexString

private String[] compositeIndexString

compositeUniqueString

private String[] compositeUniqueString

compositeIndices

private transient String[][] compositeIndices

compositeUniques

private transient String[][] compositeUniques

columnTable

private transient com.objectspace.jgl.OrderedMap columnTable

myColumns

private ColumnDescriptor[] myColumns

myComposites

private com.objectspace.jgl.HashMap myComposites
Constructor Detail

BaseTableInfo

public BaseTableInfo()
Constructor


BaseTableInfo

public BaseTableInfo(String table_name,
                     String table_space_name,
                     String table_size,
                     String index_table_space_name,
                     String[] compositeIndexNames,
                     String[] compositeUniqueNames,
                     ColumnDescriptor[] cols,
                     com.objectspace.jgl.HashMap composites)
Method Detail

accumulateColumns

protected void accumulateColumns()
                          throws WTIntrospectionException
Specified by:
accumulateColumns in class TableInfo
Throws:
WTIntrospectionException

accumulateCompositeIndices

private void accumulateCompositeIndices()
                                 throws WTIntrospectionException
Throws:
WTIntrospectionException

accumulateCompositeUniques

private void accumulateCompositeUniques()
                                 throws WTIntrospectionException
Throws:
WTIntrospectionException

addInfoCols

private ColumnDescriptor[] addInfoCols(ColumnDescriptor[] cols,
                                       BaseTableInfo anotherInfo)
                                throws WTIntrospectionException
Throws:
WTIntrospectionException

addInfoCols

private com.objectspace.jgl.OrderedMap addInfoCols(com.objectspace.jgl.OrderedMap cols,
                                                   BaseTableInfo anotherInfo)
                                            throws WTIntrospectionException
Throws:
WTIntrospectionException

addInfoUniques

private void addInfoUniques(ArrayList accumulator,
                            String[][] another,
                            int index)
                     throws WTIntrospectionException
Throws:
WTIntrospectionException

getColumnDescriptor

public ColumnDescriptor getColumnDescriptor(String name)
                                     throws WTIntrospectionException
Obtain a column descriptor by name

Specified by:
getColumnDescriptor in class TableInfo
Returns:
ColumnDescriptor
Throws:
WTIntrospectionException

getColumnName

private String getColumnName(String attrName)
                      throws WTIntrospectionException
Throws:
WTIntrospectionException

getCompositeIndices

public String[][] getCompositeIndices()
                               throws WTIntrospectionException
Obtain the composite indices

Returns:
String[][] The column names that comprise the indices.
Throws:
WTIntrospectionException

getCompositeUniques

public String[][] getCompositeUniques()
                               throws WTIntrospectionException
Obtain the composite uniqueness constraints

Returns:
String[][] The column names that comprise the uniqueness constraints.
Throws:
WTIntrospectionException

getIndexTableSpaceName

public String getIndexTableSpaceName()
Get the index table space name.

Returns:
Index Table Space Name

getTableSize

public String getTableSize()
Get the table size.

Returns:
Table Size is a categorization, with valid String values of [ TINY | SMALL | MEDIUM | LARGE | HUGE ]

getTableSpaceName

public String getTableSpaceName()
Get the table space name.

Returns:
Table Space Name

handleForeignKeyLink

private void handleForeignKeyLink()
                           throws WTIntrospectionException
Throws:
WTIntrospectionException

isaComposite

boolean isaComposite(String attrName)
               throws WTIntrospectionException
Throws:
WTIntrospectionException

parseElement

private String parseElement(String element)

parseToUnique

private void parseToUnique(ArrayList accumulator,
                           String items,
                           String separator)
                    throws WTIntrospectionException
Throws:
WTIntrospectionException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class TableInfo
Parameters:
input -
Throws:
IOException
ClassNotFoundException

setAbsoluteDir

void setAbsoluteDir(String absolute_dir)

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class TableInfo
Parameters:
output -
Throws:
IOException