SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
        |
        +--com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
              |
              +--com.solarmetric.kodo.impl.jdbc.ormapping.LobMapping
All Implemented Interfaces:
LoadSecondary, PrimaryTable, StorePrimary, StoreSecondary
Direct Known Subclasses:
BlobMapping, ClobMapping

public abstract class LobMapping
extends FieldMapping
implements LoadSecondary, StorePrimary, StoreSecondary, PrimaryTable

Represents the mapping of a locator object column in the owning class' primary table. Locator objects are loaded and stored as secondary mappings for efficiency and due to the special handling needed to deal with them.


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
LobMapping()
           
 
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 delete(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
          Delete the field from the secondary table for this mapping.
 Column[] getColumns()
          Return all columns of the primary table used only by this mapping.
protected  ResultSet getLoadResultSet(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
           
 Column[] getPKColumns()
          Return the primary key columns of the owning class.
protected abstract  int getSQLType()
          Returns the SQLType code for this concrete LOB implementation.
 void insert(Insert insert, StateManagerImpl sm, int field)
          Insert the given field into the primary table for this mapping.
 void insert(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
          Insert the given field into the secondary table for this mapping.
protected  void install(FieldMetaData fmd, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)
           
 void load(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
          Load the value of this mapping for the given instance.
 void setPKColumns(Column[] columns)
          Set the primary key columns of the owning class.
 void update(StateManagerImpl sm, Object[] pks, int field, SQLExecutionManager sqlem)
          Update the given field into the secondary table for 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.FieldMapping
compareToNull, 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
 

Constructor Detail

LobMapping

public LobMapping()
Method Detail

getSQLType

protected abstract int getSQLType()
Returns the SQLType code for this concrete LOB implementation.

getPKColumns

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

setPKColumns

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

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.

getLoadResultSet

protected ResultSet getLoadResultSet(StateManagerImpl sm,
                                     Object[] pks,
                                     int field,
                                     SQLExecutionManager sqlem)
                              throws SQLException

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.
Specified by:
insert in interface StorePrimary

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.
Specified by:
update in interface StorePrimary

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.
Specified by:
delete in interface StorePrimary

insert

public void insert(StateManagerImpl sm,
                   Object[] pks,
                   int field,
                   SQLExecutionManager sqlem)
            throws SQLException
Description copied from interface: StoreSecondary
Insert the given field into the secondary table for this mapping.
Specified by:
insert in interface StoreSecondary

update

public void update(StateManagerImpl sm,
                   Object[] pks,
                   int field,
                   SQLExecutionManager sqlem)
            throws SQLException
Description copied from interface: StoreSecondary
Update the given field into the secondary table for this mapping.
Specified by:
update in interface StoreSecondary

delete

public void delete(StateManagerImpl sm,
                   Object[] pks,
                   int field,
                   SQLExecutionManager sqlem)
            throws SQLException
Description copied from interface: StoreSecondary
Delete the field from the secondary table for this mapping.
Specified by:
delete in interface StoreSecondary

canMap

protected boolean canMap(FieldMetaData fmd,
                         ClassResolver resolver)

install

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

getColumns

public Column[] getColumns()
Description copied from interface: PrimaryTable
Return all columns of the primary table used only by this mapping.
Specified by:
getColumns in interface PrimaryTable

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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