|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--kodo.meta.DelegatingExtensions
|
+--kodo.meta.DelegatingClassMetaData
|
+--kodo.jdbc.meta.AbstractClassMapping
|
+--kodo.jdbc.meta.HorizontalClassMapping
Mapping that relies on subclass mappings to define the fields. There is no primary table for this mapping.
| Field Summary | |
static String |
TYPE
|
| Fields inherited from interface kodo.jdbc.meta.ClassMapping |
AUTO_INCREMENT, CLASS_IND, CLASS_INDEXED, CLASS_INDICATOR_VALUE, CLASS_MAP, EXTENSION_KEYS, REF_DELETE_ACTION, SEQUENCE_FACTORY, SEQUENCE_NAME, VERSION_IND, VERSION_INDEXED |
| Fields inherited from interface kodo.meta.ClassMetaData |
DATA_CACHE, DATA_CACHE_TIMEOUT, DETACH_OID_FIELD, DETACH_STATE_FIELD, DETACHABLE, ID_APPLICATION, ID_DATASTORE, ID_NONDURABLE, VALIDATE_ALL, VALIDATE_NONE, VALIDATE_NORESOLVE, VALIDATE_RUNTIME, VALIDATE_UNENHANCED |
| Constructor Summary | |
HorizontalClassMapping(ClassMetaData cmd)
|
|
| Method Summary | |
protected FieldMapping |
createDefaultFieldMapping(FieldMetaData fmd)
Create a default FieldMapping instance for this
mapping type. |
void |
delete(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize flushing this mapping. |
void |
delete(KodoStateManager sm,
RowManager rm)
Set the where values appropriately to delete the proper instance, and set all relations on non-secondary tables as updates. |
void |
fromMappingInfo(MappingInfo info,
boolean adapt)
The default implementation will raise warnings for any mapping attributes that are declared but not in the list of the valid attributes for this mapping. |
ClassIndicator |
getClassIndicator()
Return the class indicator for this class. |
Object |
getDataStoreValue(Object obj,
Column[] cols)
Return the given column value(s) for the given object. |
FieldMapping |
getEmbeddingMapping()
If this is an embedded mapping, return the owning field. |
JoinableMapping |
getJoinableMapping(Column col)
Return the joinable mapping for the given column. |
String |
getMappingType()
Return the abbreviated name of this mapping, or the full class name if it is a custom mapping. |
Object |
getObjectId(Result res,
ForeignKey fk)
Return the oid value stored in the result. |
Column[] |
getPrimaryKeyColumns()
Return the columns this mapping uses to uniquely identify an object. |
int |
getRefDeleteAction()
The reference foreign key action. |
Table |
getTable()
Horizontal mappings have no table. |
VersionIndicator |
getVersionIndicator()
Return the version indicator for this class. |
void |
insert(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize flushing this mapping. |
void |
insert(KodoStateManager sm,
RowManager rm)
Set values for the mapping into the proper rows. |
boolean |
isAutoIncrement()
True if this class uses an auto-increment datastore primary key. |
boolean |
isPrimaryKeyObjectId(boolean hasAll)
Return true if the this class' primary key columns correspond to the base class' primary key columns used to construct oid values. |
boolean |
isRefDeleteActionDeferred()
The reference foreign key action. |
boolean |
isVirtualMapping()
Returns true, since horizontal mappings do not have their own table. |
void |
joinSuperclass(Joins joins)
Join the mapping to its superclass table. |
boolean |
load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result result)
Override this method to customize loading a result into an instance. |
boolean |
load(KodoStateManager sm,
JDBCStoreManager store,
JDOState state,
JDBCFetchConfiguration fetch)
Override this method to load the state of a given object, returning true if this method handles the load. |
boolean |
map()
Map a new instance of this mapping type. |
void |
refSchemaComponents()
Increment the reference count of all used schema components. |
void |
resolve()
For implementation use. |
void |
reverseMap(SchemaGroup schema,
ReverseMappingTool tool)
Create mappings from the schema, using the given tool. |
void |
setAutoIncrementValue(KodoStateManager sm,
Column col,
Connection conn)
Set the next auto increment value for the given column into the given instance. |
void |
setClassIndicator(ClassIndicator cls)
Class indicators are ignored for horizontal mappings. |
void |
setVersionIndicator(VersionIndicator version)
Version indicators are ignored for horizontal mappings. |
void |
toMappingInfo(MappingInfo info)
Serialize this mapping to a simple MappingInfo instance
for transfer to XML or some other format. |
void |
update(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize flushing this mapping. |
void |
update(KodoStateManager sm,
RowManager rm)
Set values for the mapping into the proper rows. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Field Detail |
public static final String TYPE
| Constructor Detail |
public HorizontalClassMapping(ClassMetaData cmd)
| Method Detail |
public boolean isVirtualMapping()
public void resolve()
ClassMetaDataresolve in class AbstractClassMappingprotected FieldMapping createDefaultFieldMapping(FieldMetaData fmd)
AbstractClassMappingFieldMapping instance for this
mapping type. This will override any mapping the repository
claims for the class mapping.createDefaultFieldMapping in class AbstractClassMapping
public boolean load(KodoStateManager sm,
JDBCStoreManager store,
JDOState state,
JDBCFetchConfiguration fetch)
throws SQLException,
ClassNotFoundException
ClassMappingload in class AbstractClassMappingkodo.jdbc.meta.ClassMappingstate - if non-null, then you must initialize the state
and persistent object of the given state manager
(after determining the actual class of the object
from the database, if there are possible persistent
subclasses); initialization looks like this:
sm.initialize (ImplHelper.getJDOHelper ().newInstance
(pcClass, sm, sm.getObjectId (false, false)), state);
, where the ImplHelper class is in the
kodo.util package
public boolean load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result result)
throws SQLException
ClassMappingload in class AbstractClassMappingpublic VersionIndicator getVersionIndicator()
ClassMappingpublic void setVersionIndicator(VersionIndicator version)
public ClassIndicator getClassIndicator()
ClassMappingpublic void setClassIndicator(ClassIndicator cls)
public FieldMapping getEmbeddingMapping()
ClassMappinggetEmbeddingMapping in class AbstractClassMappingpublic JoinableMapping getJoinableMapping(Column col)
ClassMappinggetJoinableMapping in class AbstractClassMappingpublic Column[] getPrimaryKeyColumns()
ClassMappingpublic boolean isPrimaryKeyObjectId(boolean hasAll)
ClassMappingkodo.jdbc.meta.ClassMappinghasAll - if true, there must be a primary key column for every
base class primary key column; if false the primary key
must only match a subset of the base class primary key
columns
public Object getObjectId(Result res,
ForeignKey fk)
throws SQLException
ClassMappinggetObjectId in class AbstractClassMappingkodo.jdbc.meta.ClassMappingfk - if non-null, use the local columns of the given foreign
key in place of this class' primary key columnsClassMapping.isPrimaryKeyObjectId(boolean)
public void setAutoIncrementValue(KodoStateManager sm,
Column col,
Connection conn)
throws SQLException
ClassMappingsetAutoIncrementValue in class AbstractClassMapping
public Object getDataStoreValue(Object obj,
Column[] cols)
ClassMappinggetDataStoreValue in class AbstractClassMappingpublic void joinSuperclass(Joins joins)
ClassMappingpublic int getRefDeleteAction()
ClassMappinggetRefDeleteAction in class AbstractClassMappingpublic boolean isRefDeleteActionDeferred()
ClassMappingisRefDeleteActionDeferred in class AbstractClassMappingpublic boolean isAutoIncrement()
ClassMappingisAutoIncrement in class AbstractClassMappingpublic String getMappingType()
Mappingpublic boolean map()
Mapping
public void delete(KodoStateManager sm,
JDBCStoreManager store)
throws SQLException
Mappingdelete in class AbstractClassMapping
public void delete(KodoStateManager sm,
RowManager rm)
throws SQLException
Mappingkodo.jdbc.meta.MappingMapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)
public void insert(KodoStateManager sm,
RowManager rm)
throws SQLException
Mapping
public void insert(KodoStateManager sm,
JDBCStoreManager store)
throws SQLException
Mappinginsert in class AbstractClassMapping
public void update(KodoStateManager sm,
JDBCStoreManager store)
throws SQLException
Mappingupdate in class AbstractClassMapping
public void update(KodoStateManager sm,
RowManager rm)
throws SQLException
Mappingkodo.jdbc.meta.MappingMapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)public void toMappingInfo(MappingInfo info)
MappingMappingInfo instance
for transfer to XML or some other format.
public void fromMappingInfo(MappingInfo info,
boolean adapt)
AbstractClassMappingfromMappingInfo in class AbstractClassMappingkodo.jdbc.meta.AbstractClassMappingAbstractClassMapping.addMappingInfoAttributes(java.util.Collection)
public void reverseMap(SchemaGroup schema,
ReverseMappingTool tool)
MappingreverseMap in class AbstractClassMappingpublic Table getTable()
public void refSchemaComponents()
Mapping
|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||