SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

com.solarmetric.kodo.impl.jdbc.ormapping
Class CollectionMapping

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.CollectionMapping
All Implemented Interfaces:
LoadSecondary, SecondaryTable, StoreSecondary
Direct Known Subclasses:
OrderedCollectionMapping

public class CollectionMapping
extends AbstractCollectionMapping
implements LoadSecondary, StoreSecondary, SecondaryTable

Represents a collection of simple values such as Integers, Strings, etc. CollectionMappings are stored in a separate table from the primary values of the owning class. Each row of the table holds two values: a single element of the 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
 
Fields inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
CUSTOM_MAPPING, dict, MAPPING, TABLE
 
Constructor Summary
CollectionMapping()
           
 
Method Summary
protected  void addValueMatchCondition(SQLStatement sql, Object value, ClassResolver resolver)
           
protected  boolean canMap(FieldMetaData fmd, ClassResolver resolver)
           
 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)
           
protected  void install(FieldMetaData fmd, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)
           
 void join(ObjectSelect sel)
          Join this mapping to the given select statement.
 void load(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
          Load the value of this mapping for the given instance.
protected  void select(Select sel, StateManagerImpl sm, Object[] pks, int field)
           
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.AbstractCollectionMapping
compareToNull, delete, fromArray, getPKColumns, getRefColumns, insert, setPKColumns, setRefColumns, toArray, update
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
getDataColumns, getInstance, getInstance, getMetaData, setDataColumns
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
createMappings, createMappings, getConfiguration, getDictionary, getInstance, getTable
 
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.StoreSecondary
delete, insert, update
 

Constructor Detail

CollectionMapping

public CollectionMapping()
Method Detail

join

public void join(ObjectSelect sel)
Description copied from class: FieldMapping
Join this mapping to the given select statement. For basic mappings, this no-op method implementation will suffice. Secondary table mappings should override this method to do the proper join.
Overrides:
join in class FieldMapping

load

public void load(StateManagerImpl sm,
                 Object[] pks,
                 int field,
                 SQLExecutionManager sqlem)
          throws SQLException
Description copied from interface: LoadSecondary
Load the value of this mapping for the given instance. Relations to other persistent types are loaded as PersistenceCapable instances.
Specified by:
load in interface LoadSecondary
Following copied from interface: com.solarmetric.kodo.impl.jdbc.ormapping.LoadSecondary
Parameters:
stmnt - The caller is responsible for closing the statement.

select

protected void select(Select sel,
                      StateManagerImpl sm,
                      Object[] pks,
                      int field)

insert

protected void insert(Insert insert,
                      Object value,
                      int index,
                      StateManagerImpl sm,
                      Object[] pks,
                      int field)

addValueMatchCondition

protected void addValueMatchCondition(SQLStatement sql,
                                      Object value,
                                      ClassResolver resolver)

canMap

protected boolean canMap(FieldMetaData fmd,
                         ClassResolver resolver)

install

protected void install(FieldMetaData fmd,
                       JDBCConfiguration conf,
                       ClassResolver resolver,
                       DBDictionary dict)

getSecondaryTable

public Table getSecondaryTable()
Description copied from interface: SecondaryTable
Return the secondary table used by this mapping.
Specified by:
getSecondaryTable in interface SecondaryTable

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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