com.triactive.jdo.store.sql
Class ClassView
java.lang.Object
com.triactive.jdo.store.sql.View
com.triactive.jdo.store.sql.ClassView
- All Implemented Interfaces:
- ClassTable, Table
public class ClassView
- extends View
- implements ClassTable
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.triactive.jdo.store.sql.Table |
addColumn, create, drop, exists, getDatabaseAdapter, getName, intern, isInitialized, isValidated, newColumn, newColumn, validate |
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
dba
protected final DatabaseAdapter dba
name
protected final TableName name
state
protected int state
columnsByName
protected java.util.Map columnsByName
ClassView
public ClassView(TableName name,
ClassMetaData cmd,
DatabaseAdapter dba)
initialize
public void initialize(StoreManager.MgmtTransaction mtx)
- Specified by:
initialize in interface Table- Overrides:
initialize in class View
getType
public java.lang.Class getType()
- Specified by:
getType in interface ClassTable
getClassMetaData
public ClassMetaData getClassMetaData()
- Specified by:
getClassMetaData in interface ClassTable
newOIDGenerator
public OIDGenerator newOIDGenerator(int classID)
- Specified by:
newOIDGenerator in interface ClassTable
isFieldPersistent
public boolean isFieldPersistent(int fieldNumber)
- Specified by:
isFieldPersistent in interface ClassTable
getFieldMapping
public Mapping getFieldMapping(int fieldNumber)
- Specified by:
getFieldMapping in interface ClassTable
getFieldMapping
public Mapping getFieldMapping(java.lang.String fieldName)
- Specified by:
getFieldMapping in interface ClassTable
getSqlCreateStatements
protected java.util.List getSqlCreateStatements(StoreManager.MgmtTransaction mtx)
- Overrides:
getSqlCreateStatements in class View
newExtent
public javax.jdo.Extent newExtent(PersistenceManager pm,
boolean subclasses)
- Specified by:
newExtent in interface ClassTable
hashCode
public int hashCode()
equals
public boolean equals(java.lang.Object obj)
getName
public TableName getName()
- Specified by:
getName in interface Table
getDatabaseAdapter
public DatabaseAdapter getDatabaseAdapter()
- Specified by:
getDatabaseAdapter in interface Table
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()
addColumn
public void addColumn(Column col)
- Specified by:
addColumn in interface Table
hasColumnName
protected boolean hasColumnName(ColumnName 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,
ColumnName baseColName,
Role role)
- Specified by:
newColumn in interface Table
intern
public Table intern()
- Description copied from interface:
Table
- Returns a canonical representation for the table object.
This method behaves much like String.intern().
A pool of tables, initially empty, is maintained privately.
When the intern method is invoked, if the pool already contains a table
equal to this Table object as determined by the
equals(Object) method, then the table from the pool is
returned.
Otherwise, this Table object is added to the pool and a
reference to this Table object is returned.
It follows that for any two tables t1 and t2,
t1.intern() == t2.intern() is true
if and only if t1.equals(t2) is true.
- Specified by:
intern in interface Table
- Returns:
- a table that is equivalent to this table, but is guaranteed to be
from a pool of unique tables.
exists
public boolean exists(StoreManager.MgmtTransaction mtx)
throws java.sql.SQLException
- Description copied from interface:
Table
- Tests if the database table exists.
- Specified by:
exists in interface Table
- Parameters:
mtx - the active management transaction
- Returns:
- true if the table exists in the database,
false otherwise.
- Throws:
java.sql.SQLException
toString
public final java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright ? 2001-2007 The TJDO Project All Rights Reserved.