SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
        |
        +--com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
              |
              +--com.solarmetric.kodo.impl.jdbc.ormapping.OneToOneMapping
                    |
                    +--com.solarmetric.kodo.impl.jdbc.ormapping.InterfaceMapping
All Implemented Interfaces:
LoadPrimary, LoadSecondary, PrimaryTable, Relation, StorePrimary

public class InterfaceMapping
extends OneToOneMapping

A mapping for fields of interface types. Since the concrete subclass is unknown, the column will be a String that stores a wrapper of the object id's toString() result.

Since:
2.4

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.Relation
INVERSE, READ_ONLY
 
Constructor Summary
InterfaceMapping()
           
 
Method Summary
protected  boolean canMap(FieldMetaData fmd, ClassResolver resolver)
          Return true if this mapping type can handle the given field, false otherwise.
 void delete(Delete del, StateManagerImpl sm, int field)
          Delete the field from the primary table for this mapping.
 Object getDataStoreValue(Object val, PersistenceManagerImpl pm)
          Translate the given field value to its datastore equivalent.
 void insert(Insert insert, StateManagerImpl sm, int field)
          Insert the given field into the primary table for this mapping.
protected  void installOneToOneMapping(FieldMetaData fmd, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)
           
 boolean isInverse()
           
 void join(Joins joins, PersistenceManagerImpl pm)
          Join this value to the class table.
 void joinRelation(Joins joins, PersistenceManagerImpl pm)
          Join this value's table to the table for the related first class object type, if any.
 void load(StateManagerImpl sm, int field, ResultSet rs, int startColumn)
          Load the value of this mapping from the ResultSet produced by the Select passed to the select(com.solarmetric.kodo.impl.jdbc.sql.Select) method.
 void load(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
          Load the value of this mapping for the given instance.
 void select(QuerySelect sel)
          Select this mapping.
 void select(Select sel)
          Select the value of this mapping.
 void update(Update update, StateManagerImpl sm, int field)
          Update the given field into the primary table for this mapping.
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.OneToOneMapping
appendIsEmpty, appendIsNotNull, appendIsNull, getColumns, getInverse, getKeyColumns, getPKColumns, getRelationPKColumns, getRelationType, install, isValidInverse, join, joinKey, joinKeyRelation, setPKColumns, setRelationPKColumns
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
addColumn, addPKColumns, compareToNull, 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

InterfaceMapping

public InterfaceMapping()
Method Detail

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 OneToOneMapping

installOneToOneMapping

protected void installOneToOneMapping(FieldMetaData fmd,
                                      JDBCConfiguration conf,
                                      ClassResolver resolver,
                                      DBDictionary dict)
Overrides:
installOneToOneMapping in class OneToOneMapping

isInverse

public boolean isInverse()
Overrides:
isInverse in class OneToOneMapping

select

public void select(Select sel)
Description copied from interface: LoadPrimary
Select the value of this mapping.
Overrides:
select in class OneToOneMapping

load

public void load(StateManagerImpl sm,
                 int field,
                 ResultSet rs,
                 int startColumn)
          throws SQLException
Description copied from interface: LoadPrimary
Load the value of this mapping from the ResultSet produced by the Select passed to the LoadPrimary.select(com.solarmetric.kodo.impl.jdbc.sql.Select) method.
Overrides:
load in class OneToOneMapping

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.
Overrides:
load in class OneToOneMapping
Following copied from interface: com.solarmetric.kodo.impl.jdbc.ormapping.LoadSecondary
Parameters:
stmnt - The caller is responsible for closing the statement.

insert

public void insert(Insert insert,
                   StateManagerImpl sm,
                   int field)
            throws SQLException
Description copied from interface: StorePrimary
Insert the given field into the primary table for this mapping.
Overrides:
insert in class OneToOneMapping

update

public void update(Update update,
                   StateManagerImpl sm,
                   int field)
            throws SQLException
Description copied from interface: StorePrimary
Update the given field into the primary table for this mapping.
Overrides:
update in class OneToOneMapping

delete

public void delete(Delete del,
                   StateManagerImpl sm,
                   int field)
            throws SQLException
Description copied from interface: StorePrimary
Delete the field from the primary table for this mapping.
Overrides:
delete in class OneToOneMapping

getDataStoreValue

public Object getDataStoreValue(Object val,
                                PersistenceManagerImpl pm)
Description copied from class: FieldMapping
Translate the given field value to its datastore equivalent. If the mapping occupies multiple columns in the datastore, return an object array, else return a single object. Simply returns the given object by default.
Overrides:
getDataStoreValue in class OneToOneMapping

select

public void select(QuerySelect sel)
Description copied from class: FieldMapping
Select this mapping.
Overrides:
select in class OneToOneMapping

join

public void join(Joins joins,
                 PersistenceManagerImpl pm)
Description copied from class: FieldMapping
Join this value to the class table.
Overrides:
join in class OneToOneMapping

joinRelation

public void joinRelation(Joins joins,
                         PersistenceManagerImpl pm)
Description copied from class: FieldMapping
Join this value's table to the table for the related first class object type, if any.
Overrides:
joinRelation in class OneToOneMapping

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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