org.datanucleus.store.mapped
Interface DatastoreContainerObject

All Known Subinterfaces:
DatastoreClass, DatastoreElementContainer, DatastoreMap, SecondaryDatastoreClass

public interface DatastoreContainerObject

This represents a container of fields. Such as table (container of columns), file, etc.


Method Summary
 DatastoreField addDatastoreField(java.lang.String storedJavaType, DatastoreIdentifier name, JavaTypeMapping mapping, MetaData colmd)
          Method to add a new column to the internal representation.
 DatastoreField getDatastoreField(DatastoreIdentifier identifier)
          Accessor for the Datastore field with the specified identifier.
 DatastoreField[] getDatastoreFields()
          Accessor for the DatastoreFields for this table.
 JavaTypeMapping getDiscriminatorMapping(boolean allowSuperclasses)
          Accessor for the discriminator mapping specified.
 DiscriminatorMetaData getDiscriminatorMetaData()
          Accessor for Discriminator MetaData.
 DatastoreIdentifier getIdentifier()
          Accessor for the identifier for this object.
 JavaTypeMapping getIdMapping()
          Accessor for the ID mapping of this container object.
 JavaTypeMapping getMemberMapping(AbstractMemberMetaData mmd)
          Accessor for the mapping for the specified FieldMetaData.
 MappedStoreManager getStoreManager()
          Accessor for the StoreManager for this table.
 JavaTypeMapping getVersionMapping(boolean allowSuperclasses)
          Accessor for the version mapping specified .
 VersionMetaData getVersionMetaData()
          Accessor for the Version MetaData.
 boolean hasDatastoreField(DatastoreIdentifier identifier)
          Checks if there is a DatastoreField for the identifier
 

Method Detail

getStoreManager

MappedStoreManager getStoreManager()
Accessor for the StoreManager for this table.

Returns:
The StoreManager.

getIdentifier

DatastoreIdentifier getIdentifier()
Accessor for the identifier for this object.

Returns:
The identifier.

addDatastoreField

DatastoreField addDatastoreField(java.lang.String storedJavaType,
                                 DatastoreIdentifier name,
                                 JavaTypeMapping mapping,
                                 MetaData colmd)
Method to add a new column to the internal representation.

Parameters:
storedJavaType - The type of the Java field to store
name - The name of the column
mapping - The type mapping for this column
colmd - The MetaData (ColumnMetaData for RDBMS)
Returns:
The new Column

hasDatastoreField

boolean hasDatastoreField(DatastoreIdentifier identifier)
Checks if there is a DatastoreField for the identifier

Parameters:
identifier - the identifier of the DatastoreField
Returns:
true if the DatastoreField exists for the identifier

getDatastoreField

DatastoreField getDatastoreField(DatastoreIdentifier identifier)
Accessor for the Datastore field with the specified identifier. Returns null if has no column of this name.

Parameters:
identifier - The name of the column
Returns:
The column

getDatastoreFields

DatastoreField[] getDatastoreFields()
Accessor for the DatastoreFields for this table.

Returns:
the DatastoreField[]

getIdMapping

JavaTypeMapping getIdMapping()
Accessor for the ID mapping of this container object.

Returns:
The ID Mapping (if present)

getMemberMapping

JavaTypeMapping getMemberMapping(AbstractMemberMetaData mmd)
Accessor for the mapping for the specified FieldMetaData. A datastore container object may store many fields.

Parameters:
mmd - Metadata for the field/property
Returns:
The Mapping for the member, or null if the FieldMetaData cannot be found

getDiscriminatorMetaData

DiscriminatorMetaData getDiscriminatorMetaData()
Accessor for Discriminator MetaData.

Returns:
Returns the Discriminator MetaData.

getDiscriminatorMapping

JavaTypeMapping getDiscriminatorMapping(boolean allowSuperclasses)
Accessor for the discriminator mapping specified.

Parameters:
allowSuperclasses - Whether we should return just the mapping from this table or whether we should return it when this table has none and the supertable has
Returns:
The discriminator mapping

getVersionMetaData

VersionMetaData getVersionMetaData()
Accessor for the Version MetaData.

Returns:
Returns the Version MetaData.

getVersionMapping

JavaTypeMapping getVersionMapping(boolean allowSuperclasses)
Accessor for the version mapping specified .

Parameters:
allowSuperclasses - Whether we should return just the mapping from this table or whether we should return it when this table has none and the supertable has
Returns:
The version mapping.


Copyright © 2010. All Rights Reserved.