|
SolarMetric Kodo JDO 3.4.1 generated on May 30 2006 | ||||||||
| 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_FALSE, DETACH_OID_FIELD, DETACH_SERIALIZE, DETACH_STATE_FIELD, DETACH_TRUE, DETACHABLE, ID_APPLICATION, ID_DATASTORE, ID_NONDURABLE, LOCK_GROUPS, SUBCLASS_FETCH_MODE, 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(JDBCStoreManager store,
Result res,
ForeignKey fk)
|
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. |
Joins |
joinSuperclass(Joins joins,
boolean toThis)
Join the mapping and its superclass. |
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)
|
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 |
| Methods inherited from interface com.solarmetric.meta.SourceTracker |
getTrackedResourceName |
| Methods inherited from interface kodo.meta.Commentable |
getComments |
| 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
ClassMappingOverride this method to load the state of a given object, returning true if this method handles the load. If the object does not exist in the data store, simply take no action on it (but still return true). Returns false by default.
This method is invoked when Kodo has not performed any
query against the database yet. This means that you must go to
the database to fetch the needed data for this call. Contrast
with ClassMapping.load(KodoStateManager,JDBCStoreManager,JDBCFetchConfiguration,Result).
load 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 ()), state);
, where the ImplHelper class is in the
kodo.util package
public boolean load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result result)
throws SQLException
ClassMappingOverride this method to customize loading a Result
into an instance. Return true if this mapping handles the
load; false if normal loading should procede after calling
this method. Returns false by default.
This method is invoked when Kodo needs to load a record and
has already performed a query (via JDOQL, direct SQL, or via
some other mechanism by which Kodo can perform bulk
loads). You should attempt to load fields from
result before performing any additional selects
against the database.
load 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(JDBCStoreManager store,
Result res,
ForeignKey fk)
throws SQLException
public void setAutoIncrementValue(KodoStateManager sm,
Column col,
Connection conn)
throws SQLException
public Object getDataStoreValue(Object obj,
Column[] cols)
ClassMappinggetDataStoreValue in class AbstractClassMapping
public Joins joinSuperclass(Joins joins,
boolean toThis)
ClassMappingkodo.jdbc.meta.ClassMappingtoThis - if false, inner join to the superclass table; if
true, outer join from the superclass table to this
tablepublic 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.4.1 generated on May 30 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||