com.triactive.jdo.store.sql
Class MapTable

java.lang.Object
  extended by com.triactive.jdo.store.sql.BaseTable
      extended by com.triactive.jdo.store.sql.MapTable
All Implemented Interfaces:
Table

public class MapTable
extends BaseTable


Field Summary
protected  java.util.Map columnsByName
           
protected  DatabaseAdapter dba
           
protected  FieldMetaData fmd
           
protected  TableName name
           
protected  int state
           
protected static int TABLE_STATE_INITIALIZED
           
protected static int TABLE_STATE_NEW
           
protected static int TABLE_STATE_VALIDATED
           
 
Fields inherited from class com.triactive.jdo.store.sql.BaseTable
TABLE_STATE_CONSTRAINTS_FROZEN, TABLE_STATE_CONSTRAINTS_INITIALIZED
 
Fields inherited from interface com.triactive.jdo.store.sql.Table
TABLE_TYPE_BASE_TABLE, TABLE_TYPE_MISSING, TABLE_TYPE_UNKNOWN, TABLE_TYPE_VIEW
 
Constructor Summary
MapTable(TableName name, FieldMetaData fmd, DatabaseAdapter dba)
           
 
Method Summary
 void addColumn(Column col)
           
protected  void assertIsInitialized()
           
protected  void assertIsUninitialized()
           
protected  void assertIsValidated()
           
 boolean equals(java.lang.Object obj)
           
 boolean exists(StoreManager.MgmtTransaction mtx)
          Tests if the database table exists.
protected  ColumnName getBaseColumnNameForType(java.lang.Class c, StoreManager storeMgr)
           
 DatabaseAdapter getDatabaseAdapter()
           
 ColumnMapping getKeyMapping()
           
 TableName getName()
           
 ColumnMapping getOwnerMapping()
           
 ColumnMapping getValueMapping()
           
protected  boolean hasColumnName(ColumnName colName)
           
 int hashCode()
           
 void initialize(StoreManager.MgmtTransaction mtx)
           
 void initializeConstraints(StoreManager.MgmtTransaction mtx)
           
 boolean isInitialized()
           
 boolean isValidated()
           
 Column newColumn(java.lang.Class type, ColumnName baseColName, Role role)
           
 Column newColumn(java.lang.Class type, java.lang.String javaName)
           
 java.lang.String toString()
           
 
Methods inherited from class com.triactive.jdo.store.sql.BaseTable
addCandidateKey, addForeignKey, addIndex, assertConstraintsInitialized, assertConstraintsNotFrozen, assertConstraintsUninitialized, constraintsFrozen, constraintsInitialized, create, drop, dropConstraints, getSqlAddFKStatements, getSqlCreateIndexStatements, getSqlCreateStatements, getSqlDropStatements, intern, setPrimaryKey, validate, validateConstraints
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fmd

protected final FieldMetaData fmd

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
Constructor Detail

MapTable

public MapTable(TableName name,
                FieldMetaData fmd,
                DatabaseAdapter dba)
Method Detail

initialize

public void initialize(StoreManager.MgmtTransaction mtx)
Specified by:
initialize in interface Table
Overrides:
initialize in class BaseTable

initializeConstraints

public void initializeConstraints(StoreManager.MgmtTransaction mtx)
Overrides:
initializeConstraints in class BaseTable

getOwnerMapping

public ColumnMapping getOwnerMapping()

getKeyMapping

public ColumnMapping getKeyMapping()

getValueMapping

public ColumnMapping getValueMapping()

getBaseColumnNameForType

protected ColumnName getBaseColumnNameForType(java.lang.Class c,
                                              StoreManager storeMgr)

hashCode

public int hashCode()
Overrides:
hashCode in class BaseTable

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class BaseTable

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

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.