|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.database.Table
Field Summary | |
static String |
className
|
static String |
KEY_SEPARATOR
|
Method Summary | |
StringBuffer |
appendFullyQualifiedName(StringBuffer sb)
Appends the library qualified name of the table, such as "mylibrary.mytable" |
static StringBuffer |
appendFullyQualifiedName(Table t,
StringBuffer sb)
Appends the library qualified name of the table, such as "mylibrary.mytable" |
int |
copyFieldDescriptors(String newAlias)
Copies all of this table's FD's into another system alias. |
void |
createFieldDescriptors()
This is to be overridden to allow Table subclasses to create their own unique FieldDescriptors. |
static Table |
createTable(String systemAlias,
String libName,
String tblName)
Creates and returns a new Table using the given system alias, library name, and table name. |
static Table |
createTable(String pSystemAlias,
String pLibraryName,
String pTableName,
Class pTableClass)
Creates and returns a new Table using the given system Alias, library name, and table name. |
boolean |
createTableInDB(SQLContext context,
boolean overwrite,
List fds)
Creates this table in the database specified in the SQLContext. |
List |
getAllOrderedColumnNames()
Returns a List of column names in this Table. |
List |
getAllOrderedColumnNames(boolean pDatabaseOnly)
Returns a List of column names in this Table. |
RowCollection |
getAllRows()
Gets all the rows from the table |
RowCollection |
getAssociations()
Return a RowCollection of FieldDescriptorRows for this Table that have a Associations defined for them. |
List |
getAutoIncrementFieldDescriptors()
Returns a List containing all the FieldDescriptorRow objects which describe Auto-Increment fields in the table |
String |
getCreationSQL()
Gets the "CREATE TABLE" SQL statement that can be used to recreate this table. |
String |
getCreationSQL(String newSystem,
String newLibrary,
String newTable)
Gets the "CREATE TABLE" SQL statement that can be used to duplicate this table on another system. |
String |
getCreationSQL(Table table)
Gets the "CREATE TABLE" SQL statement that can be used to duplicate this table on another system. |
String |
getCreationSQL(Table table,
List fieldDescriptors)
Gets the "CREATE TABLE" SQL statement that can be used to duplicate this table on another system. |
List |
getFieldDescriptor(Class pFldClass)
Returns an IFieldDescriptor for the specified Type |
FieldDescriptorRow |
getFieldDescriptor(String fldName)
Returns a FieldDescriptorRow for the specified field name. |
FieldDescriptorCollection |
getFieldDescriptorCollection()
Returns a Map of FieldDescriptors for this table. |
FieldDescriptorCollection |
getFieldDescriptorCollection(boolean pCreate)
Returns a Map of FieldDescriptors for this table. |
Iterator |
getFieldDescriptorsWithAssociations()
Return a Collection of FieldDescriptorRow for this Table that have a Associations defined for them |
List |
getFieldDescriptorsWithUsageIdOverlap(Table t)
Gets the FD's in this table whose usageids equal the usageids in one or more fields of another table |
List |
getFieldNames()
Returns a List of Field names in this Table. |
String |
getFullyQualifiedName()
Returns the library qualified name of the table, such as "mylibrary.mytable" |
byte[] |
getIPAddress()
Gets the IP address of the system containing this ITable |
List |
getKeyFieldNames()
Returns a List of names of Fields that are part of the Table's key. |
long |
getLastUpdated()
Gets when this table was last updated by the DataEngine, or when this table's metatdata was last invalidated - whichever is later. |
Library |
getLibrary()
Returns the Library to which this Table belongs to. |
String |
getLibraryName()
Returns the name of the Library to which this Table belongs. |
List |
getLogicalFieldNames()
Returns a List of Field names in this Table. |
long |
getMetadataInvalidationTime()
Gets when this table's metadata was last invalidated. |
String |
getMetaDataSystemAlias()
Gets the alias of the system this Table's Library's DBSystem uses for retrieving its meta data. |
String |
getName()
Gets the name of this ITable |
List |
getPhysicalFieldNames()
Returns a List of Field names in this Table. |
PhysicalTable |
getPhysicalTable()
Gets information about the Table's location. |
Row |
getRow(RowKey rowKey)
Reads a row from the this table in the database with the specified key |
Class |
getRowClass()
Gets the subclass of Row that should be used for rows read from this table |
DBSystem |
getSystem()
Returns the system of the Library to which this Table belongs. |
String |
getSystemAlias()
Returns the system url of the Library to which this Table belongs (the Library gets the url from it's DBSystem). |
String |
getSystemURL()
Returns the system url of the Library to which this Table belongs (the Library gets the url from it's DBSystem). |
static Table |
getTable(String pSystemAlias,
String pLibraryName,
String pTableName)
Get the Table for the given table name using the specified library name and system url. |
static Table |
getTable(String pSystemAlias,
String pLibraryName,
String pTableName,
boolean create)
Get the Table for the given table name using the specified library name and system url. |
TableDescriptor |
getTableDescriptor()
Gets the table descriptor |
StringBuffer |
getXMLData(StringBuffer pXMLData)
This returns a StringBuffer containing all necessary XML data for this object. |
boolean |
isCheckedDataFileForFDs()
Return flag to indicate if Field data file has already been checked for FieldDescriptors. |
boolean |
isExistenceConfirmed()
Return whether or not this Table's existence in the database has been confirmed. |
boolean |
isFDsReadFromDBMetadata()
Return flag to indicate if FD's have been read from the database metadata |
boolean |
isShared()
Tests if this table is a logical "shared" table |
void |
setCheckedDataFileForFDs(boolean pCheckedDataFileForFDs)
Set flag to indicate Field data file has already been checked for FieldDescriptors. |
void |
setFDsReadFromDBMetadata(boolean pAllFDsRead)
Set flag to indicate FDs have been read from DB metadata |
void |
setLastUpdated(long newLastUpdated)
Sets when this table was last updated by DataEngine |
void |
setMetadataInvalidationTime(long time)
Sets when this table's metadata was last invalidated. |
String |
toString()
Returns the String representation of this Table. |
TableCollection |
toTableCollection()
Returns a new TableCollection object containing this table |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String KEY_SEPARATOR
public static final String className
Method Detail |
public StringBuffer appendFullyQualifiedName(StringBuffer sb)
public static StringBuffer appendFullyQualifiedName(Table t, StringBuffer sb)
public int copyFieldDescriptors(String newAlias) throws CMException
CMException
public void createFieldDescriptors() throws CMException
CMException
public static Table createTable(String systemAlias, String libName, String tblName)
public static Table createTable(String pSystemAlias, String pLibraryName, String pTableName, Class pTableClass)
pSystemAlias
- pLibraryName
- pTableName
- pTableClass
-
public boolean createTableInDB(SQLContext context, boolean overwrite, List fds) throws CMException
overwrite
- If the table already exists on the specified system, it is either deleted and recreated
or an exception is thrown, depending on the value of this argument
CMException
public List getAllOrderedColumnNames() throws CMException
CMException
public List getAllOrderedColumnNames(boolean pDatabaseOnly) throws CMException
pDatabaseOnly
- When this is false, the returned list may contain the names of logical columns not present
in the database. When this is true, only the names of columns in the database will be returned
CMException
public RowCollection getAllRows() throws CMException
CMException
public RowCollection getAssociations() throws CMException
CMException
public List getAutoIncrementFieldDescriptors()
public String getCreationSQL() throws CMException
CMException
public String getCreationSQL(String newSystem, String newLibrary, String newTable) throws CMException
newSystem
- The system on which the new table should be creatednewLibrary
- The library the new table should be created in. This may be null if the target database
system does not require a librarynewTable
- The name of the new table
CMException
public String getCreationSQL(Table table) throws CMException
table
- The table specifing the system, library name, and table name for the new table
CMException
public String getCreationSQL(Table table, List fieldDescriptors) throws CMException
table
- The table specifing the system, library name, and table name for the new tablefieldDescriptors
- The field descriptors describing the fields that should be included in the SQL statement.
If this is null, all of the fields that are in the database table described by the Table parameter will be included
in the SQL statement. Otherwise, only those fields in this List of field descriptors (which may or may
not be in the database table) will be included in the SQL.
CMException
public List getFieldDescriptor(Class pFldClass) throws CMException
CMException
public FieldDescriptorRow getFieldDescriptor(String fldName) throws CMException
fldName
- String
CMException
public FieldDescriptorCollection getFieldDescriptorCollection()
public FieldDescriptorCollection getFieldDescriptorCollection(boolean pCreate) throws CMException
CMException
public Iterator getFieldDescriptorsWithAssociations() throws CMException
CMException
public List getFieldDescriptorsWithUsageIdOverlap(Table t)
public List getFieldNames()
public String getFullyQualifiedName()
public byte[] getIPAddress()
getIPAddress
in interface ITable
public List getKeyFieldNames() throws CMException
CMException
public long getLastUpdated()
public Library getLibrary()
public String getLibraryName()
getLibraryName
in interface ITable
public List getLogicalFieldNames()
public long getMetadataInvalidationTime()
public String getMetaDataSystemAlias()
public String getName()
ITable
getName
in interface IDBObject
public List getPhysicalFieldNames()
public PhysicalTable getPhysicalTable()
public Row getRow(RowKey rowKey) throws CMException
CMException
public Class getRowClass()
public DBSystem getSystem()
public String getSystemAlias()
public String getSystemURL()
public static Table getTable(String pSystemAlias, String pLibraryName, String pTableName)
pSystemAlias
- StringpLibraryName
- StringpTableName
- String
public static Table getTable(String pSystemAlias, String pLibraryName, String pTableName, boolean create)
create
- boolean
public TableDescriptor getTableDescriptor() throws CMException
CMException
public StringBuffer getXMLData(StringBuffer pXMLData)
getXMLData
in interface IXMLObject
public boolean isCheckedDataFileForFDs()
public boolean isExistenceConfirmed()
public boolean isFDsReadFromDBMetadata()
public boolean isShared()
public void setCheckedDataFileForFDs(boolean pCheckedDataFileForFDs)
pCheckedDataFileForFDs
- booleanpublic void setFDsReadFromDBMetadata(boolean pAllFDsRead)
public void setLastUpdated(long newLastUpdated)
public void setMetadataInvalidationTime(long time)
public String toString()
toString
in class Object
public TableCollection toTableCollection()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |