Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.rd.kodo.runtime.rop
Class AbstractPCResultObjectProvider

    java.lang.Object
      |
      +--com.solarmetric.rd.kodo.runtime.rop.AbstractPCResultObjectProvider

All Implemented Interfaces:
  PCResultObjectProvider, ResultObjectProvider

public abstract class AbstractPCResultObjectProvider
extends java.lang.Object
implements PCResultObjectProvider

Abstract implementation of `PCResultObjectProvider` that implements `ResultObjectProvider.getResultObject(java.lang.Object)` by assembling the necessary information about the object to be loaded.

Field Summary
`protected java.lang.Object` | `input` The input source; this will be set on `com.solarmetric.rop.ResultObjectProvider#open`.
`protected com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl` | `pm` The `PersistenceManagerImpl` that this result object provider will load objects into.

Constructor Summary
`AbstractPCResultObjectProvider(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)` Create a new provider for loading PC objects from the input into `pm`.

Method Summary
`protected abstract java.lang.Class` | `getClass(java.lang.Object input)` Implement this method to extract the type of the pc stored in the current record of the input.
`java.lang.Object` | `getInput()` Return the input being used.
`protected abstract java.lang.Object` | `getObjectId(java.lang.Object input, com.solarmetric.rd.kodo.meta.ClassMetaData meta)` Implement this method to extract the object id value from the current record of the input.
`com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl` | `getPersistenceManager()` Return the persistence manager this provider was constructed with.
`com.solarmetric.rd.rop.ResultList` | `getResultList(java.lang.Object input)` Return a result list using this provider.
`com.solarmetric.rd.rop.ResultList` | `getResultList(java.lang.Object input, int fetchThreshold, int fetchBatchSize)` Return a result list using this provider.
`java.lang.Object` | `getResultObject(java.lang.Object input)` Instantiate the desired object from the current data in `input`.
`void` | `initialize(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.runtime.JDOState state)` Initializes `sm` with the data in `info`, transitioning its JDO state to `state`.
`protected abstract void` | `load(java.lang.Object input, com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)` Load data from the current input record into the given state manager.
`boolean` | `open(java.lang.Object input)` Subclasses must override this method to open the input, but must be sure to call `super.open (input);`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.solarmetric.rd.rop.ResultObjectProvider
`absolute, advance, free, setFetchBatchSize, size, supportsRandomAccess`

Field Detail

### pm

    protected final com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm

  The `PersistenceManagerImpl` that this result object provider will load objects into.

### input

    protected java.lang.Object input

  The input source; this will be set on `com.solarmetric.rop.ResultObjectProvider#open`.

Constructor Detail

### AbstractPCResultObjectProvider

    public AbstractPCResultObjectProvider(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)

  Create a new provider for loading PC objects from the input into `pm`.

Method Detail

### getPersistenceManager

    public com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl getPersistenceManager()

  Return the persistence manager this provider was constructed with.

### getInput

    public java.lang.Object getInput()

  Return the input being used.

### getResultList

    public com.solarmetric.rd.rop.ResultList getResultList(java.lang.Object input)

  Return a result list using this provider.

### getResultList

    public com.solarmetric.rd.rop.ResultList getResultList(java.lang.Object input,
                                                           int fetchThreshold,
                                                           int fetchBatchSize)

  Return a result list using this provider. If the given fetch threshold or batch size is set to -1, it will default to the value in your configuration.

### initialize

    public void initialize(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                           com.solarmetric.rd.kodo.runtime.JDOState state)

  Description copied from interface: `PCResultObjectProvider`
  Initializes `sm` with the data in `info`, transitioning its JDO state to `state`.

  Specified by:
    `initialize` in interface `PCResultObjectProvider`

### getResultObject

    public java.lang.Object getResultObject(java.lang.Object input)

  Description copied from interface: `ResultObjectProvider`
  Instantiate the desired object from the current data in `input`.

  Specified by:
    `getResultObject` in interface `ResultObjectProvider`

### open

    public boolean open(java.lang.Object input)

  Subclasses must override this method to open the input, but must be sure to call `super.open (input);`.

  Specified by:
    `open` in interface `ResultObjectProvider`

### getObjectId

    protected abstract java.lang.Object getObjectId(java.lang.Object input,
                                                    com.solarmetric.rd.kodo.meta.ClassMetaData meta)

  Implement this method to extract the object id value from the current record of the input.

### getClass

    protected abstract java.lang.Class getClass(java.lang.Object input)

  Implement this method to extract the type of the pc stored in the current record of the input.

### load

    protected abstract void load(java.lang.Object input,
                                 com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)

  Load data from the current input record into the given state manager. Remember to call `StateManagerImpl.setVersion(java.lang.Object)` to set the optimistic versioning information, if it has any.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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