|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
|
+--com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
|
+--com.solarmetric.kodo.impl.jdbc.ormapping.AbstractCollectionMapping
|
+--com.solarmetric.kodo.impl.jdbc.ormapping.ManyToManyMapping
Represents a M-M mapping with a persistent object type. M-M mappings are stored in a separate table from the primary values of the owning class. Each row of the table holds two values: a single PK value of the related object collection in the data column, and the PK value of the owning object in the ref column.
| Fields inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.AbstractCollectionMapping |
REF_COL |
| Fields inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping |
COL_INDEX, COL_LENGTH, DATA_COL, EMPTY_COLUMNS |
| Fields inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.Mapping |
_loc, _log, CUSTOM_MAPPING, dict, MAPPING, TABLE |
| Fields inherited from interface com.solarmetric.kodo.impl.jdbc.ormapping.Relation |
INVERSE, READ_ONLY |
| Constructor Summary | |
ManyToManyMapping()
|
|
| Method Summary | |
protected void |
addValueMatchCondition(SQLStatement sql,
Object value,
ClassResolver resolver)
Add a WHERE [data cols] = [value] for the given object value to the given sql statement. |
protected boolean |
canMap(FieldMetaData fmd,
ClassResolver resolver)
Return true if this mapping type can handle the given field, false otherwise. |
void |
delete(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
Delete the field from the secondary table for this mapping. |
Object |
getDataStoreValue(Object val,
PersistenceManagerImpl pm)
Translate the given field value to its datastore equivalent. |
Column[] |
getRelationPKColumns()
Return the primary key column(s) of the related object. |
Class |
getRelationType()
Return the type the mapping relates to. |
Table |
getSecondaryTable()
Return the secondary table used by this mapping. |
protected void |
insert(Insert insert,
Object value,
int index,
StateManagerImpl sm,
Object[] pks,
int field)
Prepare the insert for storage. |
void |
insert(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
Insert the given field into the secondary table for this mapping. |
protected void |
install(FieldMetaData fmd,
JDBCConfiguration conf,
ClassResolver resolver,
DBDictionary dict)
Setup this FieldMapping using the given metadata. |
boolean |
isReadOnly()
Return true if this mapping has been set read only, and will not insert, update, or delete values. |
protected static boolean |
isReadOnly(FieldMetaData fmd,
FieldMetaData imd)
|
void |
join(ObjectSelect sel)
Join this mapping to the given select statement. |
void |
joinRelation(Joins joins,
PersistenceManagerImpl pm)
Join this value's table to the table for the related first class object type, if any. |
void |
load(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
Load the value of this mapping for the given instance. |
protected void |
select(ObjectSelect sel,
StateManagerImpl sm,
Object[] pks,
int field)
|
void |
setReadOnly(boolean ro)
Set this mapping to be read-only. |
void |
setRelationPKColumns(Column[] val)
|
void |
update(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
Update the given field into the secondary table for this mapping. |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.AbstractCollectionMapping |
appendIsEmpty, appendIsNotNull, appendIsNull, compareToNull, fromArray, getInverse, getKeyColumns, getPKColumns, getRefColumns, join, joinKey, joinKeyRelation, select, setPKColumns, setRefColumns, toArray |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping |
addColumn, addPKColumns, getDataColumns, getInstance, getInstance, getKeyDataStoreValue, getMetaData, setDataColumns |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.Mapping |
checkExtension, createMapping, createMapping, createMappings, createMappings, getClassName, getConfiguration, getDictionary, getFieldMapping, getInstance, getTable, install |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface com.solarmetric.kodo.impl.jdbc.ormapping.Relation |
getConfiguration |
| Constructor Detail |
public ManyToManyMapping()
| Method Detail |
public Class getRelationType()
RelationgetRelationType in interface Relationpublic Column[] getRelationPKColumns()
RelationgetRelationPKColumns in interface Relationpublic void setRelationPKColumns(Column[] val)
public boolean isReadOnly()
public void setReadOnly(boolean ro)
public void join(ObjectSelect sel)
FieldMappingjoin in class FieldMapping
public void insert(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
throws SQLException
StoreSecondaryinsert in interface StoreSecondaryinsert in class AbstractCollectionMapping
public void update(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
throws SQLException
StoreSecondaryupdate in interface StoreSecondaryupdate in class AbstractCollectionMapping
public void delete(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
throws SQLException
StoreSecondarydelete in interface StoreSecondarydelete in class AbstractCollectionMapping
public void load(StateManagerImpl sm,
Object[] pks,
int field,
SQLExecutionManager sqlem)
throws SQLException
LoadSecondaryload in interface LoadSecondarycom.solarmetric.kodo.impl.jdbc.ormapping.LoadSecondarystmnt - The caller is responsible for closing the statement.
protected void select(ObjectSelect sel,
StateManagerImpl sm,
Object[] pks,
int field)
protected void insert(Insert insert,
Object value,
int index,
StateManagerImpl sm,
Object[] pks,
int field)
AbstractCollectionMappinginsert in class AbstractCollectionMapping
protected void addValueMatchCondition(SQLStatement sql,
Object value,
ClassResolver resolver)
AbstractCollectionMappingaddValueMatchCondition in class AbstractCollectionMapping
protected boolean canMap(FieldMetaData fmd,
ClassResolver resolver)
FieldMappingcanMap in class AbstractCollectionMapping
protected void install(FieldMetaData fmd,
JDBCConfiguration conf,
ClassResolver resolver,
DBDictionary dict)
FieldMappinginstall in class AbstractCollectionMapping
protected static boolean isReadOnly(FieldMetaData fmd,
FieldMetaData imd)
public Table getSecondaryTable()
SecondaryTablegetSecondaryTable in interface SecondaryTable
public Object getDataStoreValue(Object val,
PersistenceManagerImpl pm)
FieldMappinggetDataStoreValue in class FieldMapping
public void joinRelation(Joins joins,
PersistenceManagerImpl pm)
FieldMappingjoinRelation in class FieldMapping
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||