| java.lang.Object org.jpox.store.StoreData org.jpox.store.TableStoreData
TableStoreData | public class TableStoreData extends StoreData (Code) | | Representation of a class/field managed by the StoreManager where the datastore persists objects
into a "DatastoreClass" (table).
Type of data
There are 2 constructors, one for specifying a class (FCO) being managed, and one
for specifying a field (SCO) being managed. The "type" is set accordingly to represent
which one is being used.
Ownership of Tables
In JPOX, a class can have a table assigned where the class is not the "owner" of the table.
This happens when the class has its fields persisted in the table of another class
- so they share the table.
version: $Revision: 1.2 $ |
Field Summary | |
final protected String | interfaceName If this class is an implementation of a persistent interface, this attribute will hold the name of the interface. | final protected boolean | isTableOwner Whether this class is the owner of the table. | protected DatastoreContainerObject | table The datastore container (table) where this class/field is persisted. | protected String | tableName Name of the datastore object where it is stored. |
interfaceName | final protected String interfaceName(Code) | | If this class is an implementation of a persistent interface, this attribute will hold the name of the interface.
|
isTableOwner | final protected boolean isTableOwner(Code) | | Whether this class is the owner of the table.
|
tableName | protected String tableName(Code) | | Name of the datastore object where it is stored.
|
TableStoreData | public TableStoreData(String name, String tableName, boolean tableOwner, int type, String interfaceName)(Code) | | Constructor. To be used when creating for the start mechanism.
Parameters: name - Name of the class/field Parameters: tableName - Name of the table associated Parameters: tableOwner - Whether this is the owner Parameters: type - The type (FCO/SCO) Parameters: interfaceName - if this class is an implementation of a persistent interface (multiple persistent interface names are comma separated), otherwise is null. |
TableStoreData | public TableStoreData(ClassMetaData cmd, DatastoreContainerObject table, boolean tableOwner)(Code) | | Constructor for FCO data.
Parameters: cmd - MetaData for the class. Parameters: table - Table where the class is stored. Parameters: tableOwner - Whether the class is the owner of the table. |
getDatastoreIdentifier | public DatastoreIdentifier getDatastoreIdentifier()(Code) | | Accessor for the identifier for the table.
The table identifier |
getTableName | public String getTableName()(Code) | | Accessor for tableName.
Returns the tableName. |
hasTable | public boolean hasTable()(Code) | | Accessor for whether this has a table representation.
Whether it has a table |
isTableOwner | public boolean isTableOwner()(Code) | | Accessor for whether this class is the owner of the table.
Whether it owns the table |
setDatastoreContainerObject | public void setDatastoreContainerObject(DatastoreClass table)(Code) | | Convenience to set the table. To be used in cases where the table isn't known
until after the initial create
Parameters: table - The table |
toString | public String toString()(Code) | | Method to return this class/field managed object as a string.
String version of this class/field managed object. |
|
|