|
SolarMetric Kodo JDO 3.2.4 generated on January 7 2005 | ||||||||
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 |
AUDITABLE, DATA_CACHE, DATA_CACHE_TIMEOUT, DETACH_FALSE, DETACH_OID_FIELD, DETACH_SERIALIZE, DETACH_STATE_FIELD, DETACH_TRUE, DETACHABLE, ID_APPLICATION, ID_DATASTORE, ID_NONDURABLE, 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)
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()
ClassMetaData
resolve
in class AbstractClassMapping
protected FieldMapping createDefaultFieldMapping(FieldMetaData fmd)
AbstractClassMapping
FieldMapping
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
ClassMapping
Override 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 AbstractClassMapping
kodo.jdbc.meta.ClassMapping
state
- 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 packagepublic boolean load(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result result) throws SQLException
ClassMapping
Override 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 AbstractClassMapping
public VersionIndicator getVersionIndicator()
ClassMapping
public void setVersionIndicator(VersionIndicator version)
public ClassIndicator getClassIndicator()
ClassMapping
public void setClassIndicator(ClassIndicator cls)
public FieldMapping getEmbeddingMapping()
ClassMapping
getEmbeddingMapping
in class AbstractClassMapping
public JoinableMapping getJoinableMapping(Column col)
ClassMapping
getJoinableMapping
in class AbstractClassMapping
public Column[] getPrimaryKeyColumns()
ClassMapping
public boolean isPrimaryKeyObjectId(boolean hasAll)
ClassMapping
kodo.jdbc.meta.ClassMapping
hasAll
- 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
columnspublic Object getObjectId(JDBCStoreManager store, Result res, ForeignKey fk) throws SQLException
public void setAutoIncrementValue(KodoStateManager sm, Column col, Connection conn) throws SQLException
ClassMapping
setAutoIncrementValue
in class AbstractClassMapping
public Object getDataStoreValue(Object obj, Column[] cols)
ClassMapping
getDataStoreValue
in class AbstractClassMapping
public Joins joinSuperclass(Joins joins, boolean toThis)
ClassMapping
kodo.jdbc.meta.ClassMapping
toThis
- if false, inner join to the superclass table; if
true, outer join from the superclass table to this
tablepublic int getRefDeleteAction()
ClassMapping
getRefDeleteAction
in class AbstractClassMapping
public boolean isRefDeleteActionDeferred()
ClassMapping
isRefDeleteActionDeferred
in class AbstractClassMapping
public boolean isAutoIncrement()
ClassMapping
isAutoIncrement
in class AbstractClassMapping
public String getMappingType()
Mapping
public boolean map()
Mapping
public void delete(KodoStateManager sm, JDBCStoreManager store) throws SQLException
Mapping
delete
in class AbstractClassMapping
public void delete(KodoStateManager sm, RowManager rm) throws SQLException
Mapping
kodo.jdbc.meta.Mapping
Mapping.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
Mapping
insert
in class AbstractClassMapping
public void update(KodoStateManager sm, JDBCStoreManager store) throws SQLException
Mapping
update
in class AbstractClassMapping
public void update(KodoStateManager sm, RowManager rm) throws SQLException
Mapping
kodo.jdbc.meta.Mapping
Mapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)
public void toMappingInfo(MappingInfo info)
Mapping
MappingInfo
instance
for transfer to XML or some other format.public void fromMappingInfo(MappingInfo info, boolean adapt)
AbstractClassMapping
fromMappingInfo
in class AbstractClassMapping
kodo.jdbc.meta.AbstractClassMapping
AbstractClassMapping.addMappingInfoAttributes(java.util.Collection)
public void reverseMap(SchemaGroup schema, ReverseMappingTool tool)
Mapping
reverseMap
in class AbstractClassMapping
public Table getTable()
public void refSchemaComponents()
Mapping
|
SolarMetric Kodo JDO 3.2.4 generated on January 7 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |