SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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

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.OneToManyMapping
All Implemented Interfaces:
LoadSecondary, Relation

public class OneToManyMapping
extends AbstractCollectionMapping
implements Relation, LoadSecondary

Represents a 1-M relation with a persistent object type, where the related persistent type has a 1-1 relation back to the owning type of this FieldMapping. Thus, a 1-M mapping does not store any data itself, and instead relies on the columns of the related type.


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
 
Fields inherited from interface com.solarmetric.kodo.impl.jdbc.ormapping.Relation
INVERSE, READ_ONLY
 
Constructor Summary
OneToManyMapping()
           
 
Method Summary
protected  boolean canMap(FieldMetaData fmd, ClassResolver resolver)
           
 Column[] getRelationPKColumns()
          Return the primary key column(s) of the related object.
 Class getRelationType()
          Return the type the mapping relates to.
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.
 void setRelationPKColumns(Column[] val)
           
 
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.Relation
getConfiguration
 

Constructor Detail

OneToManyMapping

public OneToManyMapping()
Method Detail

getRelationType

public Class getRelationType()
Description copied from interface: Relation
Return the type the mapping relates to.
Specified by:
getRelationType in interface Relation

getRelationPKColumns

public Column[] getRelationPKColumns()
Description copied from interface: Relation
Return the primary key column(s) of the related object.
Specified by:
getRelationPKColumns in interface Relation

setRelationPKColumns

public void setRelationPKColumns(Column[] val)

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.

canMap

protected boolean canMap(FieldMetaData fmd,
                         ClassResolver resolver)

install

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

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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