SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.runtime.objectprovider
Interface CustomResultObjectProvider

All Known Implementing Classes:
ColumnAliasResultObjectProvider, CustomResultObjectProviderImpl

public interface CustomResultObjectProvider

Variant of ResultObjectProvider that populates a StateManagerImpl object in an application-defined manner.

Implementations of this interface can be used to load data via non-SQL means such as via stored procedures.


Inner Class Summary
static class CustomResultObjectProvider.ResultObjectProviderAdapter
          Adapter class that allows a CustomResultObjectProvider to be used in situations that require a ResultObjectProvider.
static class CustomResultObjectProvider.ROPInfo
          Data structure that holds information about the object currently being loaded, and a reference to the CustomResultObjectProvider that should be used to load the information into a StateManagerImpl.
 
Method Summary
 boolean advance(Object input)
          Advance the input source input to the next position.
 void free(Object input)
          Optionally free the resources associated with this provider.
 Object getObjectId(Object input, ClassMetaData meta)
          Determine the id of the current data in input.
 PersistenceManagerImpl getPersistenceManager()
          Return the PersistenceManagerImpl that objects loaded by this provider should be loaded into.
 CustomResultObjectProvider.ROPInfo getROPInfo(Object input, Object oid, ClassMetaData meta)
          Create a CustomResultObjectProvider.ROPInfo object that will be suitable for use in a subsequent load(com.solarmetric.kodo.runtime.StateManagerImpl, java.util.Set, boolean, com.solarmetric.kodo.runtime.objectprovider.CustomResultObjectProvider.ROPInfo) or initialize(com.solarmetric.kodo.runtime.StateManagerImpl, java.util.Set, com.solarmetric.kodo.runtime.JDOState, com.solarmetric.kodo.runtime.objectprovider.CustomResultObjectProvider.ROPInfo) call.
 Class getType(Object input)
          Determine which concrete class the current data in input represents.
 void initialize(StateManagerImpl sm, Set fields, JDOState state, CustomResultObjectProvider.ROPInfo info)
          Initializes sm with the data in info, transitioning its JDO state to state.
 void load(StateManagerImpl sm, Set fields, boolean setVersion, CustomResultObjectProvider.ROPInfo info)
          Loads fields into sm.
 boolean open(Object input)
          Open the input source input.
 

Method Detail

initialize

public void initialize(StateManagerImpl sm,
                       Set fields,
                       JDOState state,
                       CustomResultObjectProvider.ROPInfo info)
Initializes sm with the data in info, transitioning its JDO state to state.

load

public void load(StateManagerImpl sm,
                 Set fields,
                 boolean setVersion,
                 CustomResultObjectProvider.ROPInfo info)
Loads fields into sm. Also load the version information if setVersion is true.

getType

public Class getType(Object input)
              throws Exception

Determine which concrete class the current data in input represents.


getObjectId

public Object getObjectId(Object input,
                          ClassMetaData meta)
                   throws Exception

Determine the id of the current data in input.


getROPInfo

public CustomResultObjectProvider.ROPInfo getROPInfo(Object input,
                                                     Object oid,
                                                     ClassMetaData meta)
                                              throws Exception

Create a CustomResultObjectProvider.ROPInfo object that will be suitable for use in a subsequent load(com.solarmetric.kodo.runtime.StateManagerImpl, java.util.Set, boolean, com.solarmetric.kodo.runtime.objectprovider.CustomResultObjectProvider.ROPInfo) or initialize(com.solarmetric.kodo.runtime.StateManagerImpl, java.util.Set, com.solarmetric.kodo.runtime.JDOState, com.solarmetric.kodo.runtime.objectprovider.CustomResultObjectProvider.ROPInfo) call.


open

public boolean open(Object input)
             throws Exception
Open the input source input. This is invoked before any data is loaded from the input. Return true if there is data in the input; otherwise false.

advance

public boolean advance(Object input)
                throws Exception
Advance the input source input to the next position. Return true if there is more data; otherwise false. This is invoked between each invokation of CustomResultObjectProvider.ResultObjectProviderAdapter.getResultObject(java.lang.Object).

free

public void free(Object input)
          throws Exception
Optionally free the resources associated with this provider. For example, the source Connection might be released once the statement has been completed, or an InputStream might be closed.

getPersistenceManager

public PersistenceManagerImpl getPersistenceManager()
Return the PersistenceManagerImpl that objects loaded by this provider should be loaded into.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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