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
|
Method Summary |
protected boolean |
canMap(FieldMetaData fmd,
ClassResolver resolver)
|
void |
delete(Delete del,
StateManagerImpl sm,
int field)
Delete the field from the primary table for this mapping. |
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 |
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(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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterfaceMapping
public InterfaceMapping()
canMap
protected boolean canMap(FieldMetaData fmd,
ClassResolver resolver)
- 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()
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
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.