SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
        |
        +--com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
              |
              +--com.solarmetric.kodo.impl.jdbc.ormapping.AbstractCollectionMapping
Direct Known Subclasses:
CollectionMapping, ManyToManyMapping, OneToManyMapping

public abstract class AbstractCollectionMapping
extends FieldMapping

Represents a collection of values. Should be overridden by concrete Collection types.


Field Summary
static String REF_COL
          Metadata extension key used to mark the name of the reference column for this collection.
 
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
AbstractCollectionMapping()
           
 
Method Summary
 void compareToNull(ObjectSelect sel, boolean isNull)
          Compare this column to null.
 void delete(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
           
 Collection fromArray(Object array)
          Helper method to convert the given array to a collection.
 Column[] getPKColumns()
          Return the primary key columns of the owning class.
 Column[] getRefColumns()
          Return the columns of the table this Collection is stored in which hold the PK values of the owning object.
 void insert(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
           
 void setPKColumns(Column[] val)
          Set the primary key columns of the owning class.
 void setRefColumns(Column[] val)
          Set the columns of the table this Collection is stored in which hold the PK values of the owning object.
 Object toArray(Collection vals)
          Helper method to convert the given collection to an array of the proper component type.
 void update(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
           
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
getDataColumns, getInstance, getInstance, getMetaData, join, 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
 

Field Detail

REF_COL

public static final String REF_COL
Metadata extension key used to mark the name of the reference column for this collection.
Constructor Detail

AbstractCollectionMapping

public AbstractCollectionMapping()
Method Detail

getRefColumns

public Column[] getRefColumns()
Return the columns of the table this Collection is stored in which hold the PK values of the owning object.

setRefColumns

public void setRefColumns(Column[] val)
Set the columns of the table this Collection is stored in which hold the PK values of the owning object.

getPKColumns

public Column[] getPKColumns()
Return the primary key columns of the owning class.

setPKColumns

public void setPKColumns(Column[] val)
Set the primary key columns of the owning class.

compareToNull

public void compareToNull(ObjectSelect sel,
                          boolean isNull)
Description copied from class: FieldMapping
Compare this column to null. For basic primary table mappings, the default definition of this method will suffice. More complex mappings should override this method.
Overrides:
compareToNull in class FieldMapping

insert

public void insert(StateManagerImpl sm,
                   Object[] pks,
                   int field,
                   SQLExecutionManager sqlem)
            throws SQLException

update

public void update(StateManagerImpl sm,
                   Object[] pks,
                   int field,
                   SQLExecutionManager sqlem)
            throws SQLException

delete

public void delete(StateManagerImpl sm,
                   Object[] pks,
                   int field,
                   SQLExecutionManager sqlem)
            throws SQLException

toArray

public Object toArray(Collection vals)
Helper method to convert the given collection to an array of the proper component type.

fromArray

public Collection fromArray(Object array)
Helper method to convert the given array to a collection.

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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