com.triactive.jdo.store
Class AbstractTable
java.lang.Object
com.triactive.jdo.store.AbstractTable
- All Implemented Interfaces:
- Table
- Direct Known Subclasses:
- BaseTable, View
abstract class AbstractTable
- extends java.lang.Object
- implements Table
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
TABLE_STATE_NEW
protected static final int TABLE_STATE_NEW
- See Also:
- Constant Field Values
TABLE_STATE_INITIALIZED
protected static final int TABLE_STATE_INITIALIZED
- See Also:
- Constant Field Values
TABLE_STATE_VALIDATED
protected static final int TABLE_STATE_VALIDATED
- See Also:
- Constant Field Values
storeMgr
protected final StoreManager storeMgr
dba
protected final DatabaseAdapter dba
name
protected SQLIdentifier name
state
protected int state
columns
protected java.util.ArrayList columns
columnsByName
protected java.util.HashMap columnsByName
AbstractTable
public AbstractTable(StoreManager storeMgr)
AbstractTable
public AbstractTable(SQLIdentifier name,
StoreManager storeMgr)
isInitialized
public boolean isInitialized()
- Specified by:
isInitialized in interface Table
isValidated
public boolean isValidated()
- Specified by:
isValidated in interface Table
assertIsUninitialized
protected void assertIsUninitialized()
assertIsInitialized
protected void assertIsInitialized()
assertIsValidated
protected void assertIsValidated()
getName
public SQLIdentifier getName()
- Specified by:
getName in interface Table
getStoreManager
public StoreManager getStoreManager()
- Specified by:
getStoreManager in interface Table
getSchemaName
public java.lang.String getSchemaName()
- Specified by:
getSchemaName in interface Table
addColumn
public void addColumn(Column col)
- Specified by:
addColumn in interface Table
hasColumnName
protected boolean hasColumnName(SQLIdentifier colName)
newColumn
public Column newColumn(java.lang.Class type,
java.lang.String javaName)
- Specified by:
newColumn in interface Table
newColumn
public Column newColumn(java.lang.Class type,
SQLIdentifier name,
Role role)
- Specified by:
newColumn in interface Table
executeStatementList
protected void executeStatementList(java.util.List stmts,
java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getSQLCreateStatements
protected abstract java.util.List getSQLCreateStatements()
getSQLDropStatements
protected abstract java.util.List getSQLDropStatements()
create
public void create(java.sql.Connection conn)
throws java.sql.SQLException
- Specified by:
create in interface Table
- Throws:
java.sql.SQLException
drop
public void drop(java.sql.Connection conn)
throws java.sql.SQLException
- Specified by:
drop in interface Table
- Throws:
java.sql.SQLException
exists
public boolean exists(java.sql.Connection conn)
throws java.sql.SQLException
- Tests if the database table exists.
- Specified by:
exists in interface Table
- Parameters:
conn - a JDBC connection to the database.
- Returns:
- true if the table exists in the database,
false otherwise.
- Throws:
java.sql.SQLException
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public final int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public final java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright ? 2001 TriActive, Inc. All Rights Reserved.