com.solarmetric.kodo.impl.jdbc.ormapping
Class OrderedManyToManyMapping
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
|
+--com.solarmetric.kodo.impl.jdbc.ormapping.OrderedManyToManyMapping
- All Implemented Interfaces:
- LoadSecondary, Ordered, Relation, SecondaryTable, StoreSecondary
- public class OrderedManyToManyMapping
- extends ManyToManyMapping
- implements Ordered
Represents an ordered M-M mapping with a persistent object type.
Ordered M-M mappings are stored in a separate table from the primary values
of the owning class. Each row of the table holds three values: a single
PK value of the related object collection in the data column, the PK
value of the owning object in the ref column, and the order of the value
in the order column. All ordered M-M mappings are one-sided.
|
Method Summary |
protected boolean |
canMap(FieldMetaData fmd,
ClassResolver resolver)
|
Column |
getOrderColumn()
Return the column of the table this Collection is stored in which
holds the ordering of the value of the Collection. |
protected void |
insert(Insert insert,
Object value,
int index,
StateManagerImpl sm,
Object[] pks,
int field)
|
protected void |
install(FieldMetaData fmd,
JDBCConfiguration conf,
ClassResolver resolver,
DBDictionary dict)
|
boolean |
isReadOnly()
Ordered M-M mappings are never read-only. |
protected void |
select(ObjectSelect sel,
StateManagerImpl sm,
Object[] pks,
int field)
|
void |
setOrderColumn(Column val)
Set the column of the table this Collection is stored in which
holds the order of this value in the Collection. |
void |
setReadOnly(boolean ro)
Ordered M-M mappings are never read-only. |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.ManyToManyMapping |
addValueMatchCondition, delete, getRelationPKColumns, getRelationType, getSecondaryTable, insert, isReadOnly, join, load, setRelationPKColumns, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderedManyToManyMapping
public OrderedManyToManyMapping()
getOrderColumn
public Column getOrderColumn()
- Return the column of the table this Collection is stored in which
holds the ordering of the value of the Collection.
setOrderColumn
public void setOrderColumn(Column val)
- Set the column of the table this Collection is stored in which
holds the order of this value in the Collection.
isReadOnly
public boolean isReadOnly()
- Ordered M-M mappings are never read-only.
- Overrides:
isReadOnly in class ManyToManyMapping
setReadOnly
public void setReadOnly(boolean ro)
- Ordered M-M mappings are never read-only.
- Overrides:
setReadOnly in class ManyToManyMapping
select
protected void select(ObjectSelect sel,
StateManagerImpl sm,
Object[] pks,
int field)
- Overrides:
select in class ManyToManyMapping
insert
protected void insert(Insert insert,
Object value,
int index,
StateManagerImpl sm,
Object[] pks,
int field)
- Overrides:
insert in class ManyToManyMapping
canMap
protected boolean canMap(FieldMetaData fmd,
ClassResolver resolver)
- Overrides:
canMap in class ManyToManyMapping
install
protected void install(FieldMetaData fmd,
JDBCConfiguration conf,
ClassResolver resolver,
DBDictionary dict)
- Overrides:
install in class ManyToManyMapping
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.