SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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.


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.Ordered
ORDER_COL, ORDERED
 
Fields inherited from interface com.solarmetric.kodo.impl.jdbc.ormapping.Relation
INVERSE, READ_ONLY
 
Constructor Summary
OrderedManyToManyMapping()
           
 
Method Summary
protected  boolean canMap(FieldMetaData fmd, ClassResolver resolver)
          Return true if this mapping type can handle the given field, false otherwise.
 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)
          Prepare the insert for storage.
protected  void install(FieldMetaData fmd, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)
          Setup this FieldMapping using the given metadata.
 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, getDataStoreValue, getRelationPKColumns, getRelationType, getSecondaryTable, insert, isReadOnly, join, joinRelation, load, setRelationPKColumns, update
 
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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.solarmetric.kodo.impl.jdbc.ormapping.Relation
getConfiguration
 

Constructor Detail

OrderedManyToManyMapping

public OrderedManyToManyMapping()
Method Detail

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)
Description copied from class: AbstractCollectionMapping
Prepare the insert for storage. Throws exception by default.
Overrides:
insert in class ManyToManyMapping

canMap

protected boolean canMap(FieldMetaData fmd,
                         ClassResolver resolver)
Description copied from class: FieldMapping
Return true if this mapping type can handle the given field, false otherwise. Note that this method cannot rely on the existance of other Mappings, as it is used in bootstrapping.
Overrides:
canMap in class ManyToManyMapping

install

protected void install(FieldMetaData fmd,
                       JDBCConfiguration conf,
                       ClassResolver resolver,
                       DBDictionary dict)
Description copied from class: FieldMapping
Setup this FieldMapping using the given metadata. Note that this method cannot rely on the existance of other Mappings, as it it is used in bootstrapping. This base implementation installs the proper extensions onto the metadata only; subclasses must override to properly map the type.
Overrides:
install in class ManyToManyMapping

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.