com.triactive.jdo.store.sql
Interface Table

All Known Subinterfaces:
ClassTable
All Known Implementing Classes:
BaseTable, ClassBaseTable, ClassView, MapTable, ProbeTable, SchemaTable, SetTable, View

public interface Table


Field Summary
static int TABLE_TYPE_BASE_TABLE
          Returned by MgmtTransaction.getTableType() if the table is a base table.
static int TABLE_TYPE_MISSING
          Returned by MgmtTransaction.getTableType() if the table does not exist.
static int TABLE_TYPE_UNKNOWN
          Returned by MgmtTransaction.getTableType() if the table type is not recognized.
static int TABLE_TYPE_VIEW
          Returned by MgmtTransaction.getTableType() if the table is a view.
 
Method Summary
 void addColumn(Column col)
           
 void create(StoreManager.MgmtTransaction mtx)
           
 void drop(StoreManager.MgmtTransaction mtx)
           
 boolean exists(StoreManager.MgmtTransaction mtx)
          Tests if the database table exists.
 DatabaseAdapter getDatabaseAdapter()
           
 TableName getName()
           
 void initialize(StoreManager.MgmtTransaction mtx)
           
 Table intern()
          Returns a canonical representation for the table object.
 boolean isInitialized()
           
 boolean isValidated()
           
 Column newColumn(java.lang.Class type, ColumnName baseName, Role role)
           
 Column newColumn(java.lang.Class type, java.lang.String javaName)
           
 boolean validate(StoreManager.MgmtTransaction mtx)
           
 

Field Detail

TABLE_TYPE_MISSING

static final int TABLE_TYPE_MISSING
Returned by MgmtTransaction.getTableType() if the table does not exist.

See Also:
Constant Field Values

TABLE_TYPE_UNKNOWN

static final int TABLE_TYPE_UNKNOWN
Returned by MgmtTransaction.getTableType() if the table type is not recognized.

See Also:
Constant Field Values

TABLE_TYPE_BASE_TABLE

static final int TABLE_TYPE_BASE_TABLE
Returned by MgmtTransaction.getTableType() if the table is a base table.

See Also:
Constant Field Values

TABLE_TYPE_VIEW

static final int TABLE_TYPE_VIEW
Returned by MgmtTransaction.getTableType() if the table is a view.

See Also:
Constant Field Values
Method Detail

initialize

void initialize(StoreManager.MgmtTransaction mtx)

isInitialized

boolean isInitialized()

getName

TableName getName()

getDatabaseAdapter

DatabaseAdapter getDatabaseAdapter()

addColumn

void addColumn(Column col)

newColumn

Column newColumn(java.lang.Class type,
                 java.lang.String javaName)

newColumn

Column newColumn(java.lang.Class type,
                 ColumnName baseName,
                 Role role)

intern

Table intern()
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.

Returns:
a table that is equivalent to this table, but is guaranteed to be from a pool of unique tables.

exists

boolean exists(StoreManager.MgmtTransaction mtx)
               throws java.sql.SQLException
Tests if the database table exists.

Parameters:
mtx - the active management transaction
Returns:
true if the table exists in the database, false otherwise.
Throws:
java.sql.SQLException

create

void create(StoreManager.MgmtTransaction mtx)
            throws java.sql.SQLException
Throws:
java.sql.SQLException

validate

boolean validate(StoreManager.MgmtTransaction mtx)
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

isValidated

boolean isValidated()

drop

void drop(StoreManager.MgmtTransaction mtx)
          throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright ? 2001-2007 The TJDO Project All Rights Reserved.