Package com.mckoi.database
Class AbstractInternalTableInfo
- java.lang.Object
-
- com.mckoi.database.AbstractInternalTableInfo
-
- All Implemented Interfaces:
InternalTableInfo
- Direct Known Subclasses:
DatabaseConnection.ConnectionInternalTableInfo
,Transaction.TransactionInternalTables
abstract class AbstractInternalTableInfo extends java.lang.Object implements InternalTableInfo
An implementation of InternalTableInfo that provides a number of methods to aid in the productions of the InternalTableInfo interface.This leaves the 'createInternalTable' method implementation to the derived class.
-
-
Field Summary
Fields Modifier and Type Field Description private DataTableDef[]
table_def_list
The list of DataTableDef objects that descibe each table in the above list.private TableName[]
table_list
The list of table names (as TableName) that this object maintains.private java.lang.String
table_type
The table type of table objects returned by this method.
-
Constructor Summary
Constructors Constructor Description AbstractInternalTableInfo(java.lang.String type, DataTableDef[] table_def_list)
Constructs the container than manages the creation of the given table objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsTableName(TableName name)
Returns true if this container contains a table with the given name.int
findTableName(TableName name)
Finds the index in this container of the given table name, otherwise returns -1.DataTableDef
getDataTableDef(int i)
Returns the DataTableDef object that describes the table at the given index in this container.int
getTableCount()
Returns the number of internal table sources that this object is maintaining.TableName
getTableName(int i)
Returns the name of the table at the given index in this container.java.lang.String
getTableType(int i)
Returns a String that describes the type of the table at the given index.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.mckoi.database.InternalTableInfo
createInternalTable
-
-
-
-
Field Detail
-
table_list
private TableName[] table_list
The list of table names (as TableName) that this object maintains.
-
table_def_list
private DataTableDef[] table_def_list
The list of DataTableDef objects that descibe each table in the above list.
-
table_type
private java.lang.String table_type
The table type of table objects returned by this method.
-
-
Constructor Detail
-
AbstractInternalTableInfo
AbstractInternalTableInfo(java.lang.String type, DataTableDef[] table_def_list)
Constructs the container than manages the creation of the given table objects.
-
-
Method Detail
-
getTableCount
public int getTableCount()
Returns the number of internal table sources that this object is maintaining.- Specified by:
getTableCount
in interfaceInternalTableInfo
-
findTableName
public int findTableName(TableName name)
Finds the index in this container of the given table name, otherwise returns -1.- Specified by:
findTableName
in interfaceInternalTableInfo
-
getTableName
public TableName getTableName(int i)
Returns the name of the table at the given index in this container.- Specified by:
getTableName
in interfaceInternalTableInfo
-
getDataTableDef
public DataTableDef getDataTableDef(int i)
Returns the DataTableDef object that describes the table at the given index in this container.- Specified by:
getDataTableDef
in interfaceInternalTableInfo
-
containsTableName
public boolean containsTableName(TableName name)
Returns true if this container contains a table with the given name.- Specified by:
containsTableName
in interfaceInternalTableInfo
-
getTableType
public java.lang.String getTableType(int i)
Returns a String that describes the type of the table at the given index.- Specified by:
getTableType
in interfaceInternalTableInfo
-
-