Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.0.3 generated on February 20 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.runtime
Class AbstractPCResultObjectProvider

    java.lang.Object
      |
      +--kodo.runtime.AbstractPCResultObjectProvider

All Implemented Interfaces:
  com.solarmetric.util.Closeable, PCResultObjectProvider, ResultObjectProvider

public abstract class AbstractPCResultObjectProvider
extends Object
implements PCResultObjectProvider

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

Field Summary
`protected KodoPersistenceManager` | `pm` The `KodoPersistenceManager` that this result object provider will load objects into.

Constructor Summary
`AbstractPCResultObjectProvider(KodoPersistenceManager pm)` Create a new provider for loading PC objects from the input into `pm`.

Method Summary
`boolean` | `absolute(int pos)` Override if desired.
`void` | `close()` Override if desired.
`protected abstract Object` | `getObjectId(ClassMetaData meta)` Implement this method to extract the object id value from the current record of the input.
`protected abstract Class` | `getPCClass()` Implement this method to extract the type of the pc stored in the current record of the input.
`KodoPersistenceManager` | `getPersistenceManager()` Return the persistence manager this provider was constructed with.
`Object` | `getResultObject()` Instantiate the current result object.
`void` | `handleCheckedException(Exception e)` Throws a `javax.jdo.JDODataStoreException` by default.
`void` | `initialize(KodoStateManager sm, JDOState state, FetchConfiguration fetch)` Initializes the state manager.
`protected abstract void` | `load(KodoStateManager sm, FetchConfiguration fetch)` Load data from the current input record into the given state manager.
`abstract boolean` | `next()` Implement this method to advance the input.
`void` | `open()` Override if desired.
`void` | `reset()` Override if desired.
`int` | `size()` Override if desired.
`boolean` | `supportsRandomAccess()` Override if desired.

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

Field Detail

### pm

    protected final KodoPersistenceManager pm

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

Constructor Detail

### AbstractPCResultObjectProvider

    public AbstractPCResultObjectProvider(KodoPersistenceManager pm)

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

Method Detail

### getPersistenceManager

    public KodoPersistenceManager getPersistenceManager()

  Return the persistence manager this provider was constructed with.

### initialize

    public void initialize(KodoStateManager sm,
                           JDOState state,
                           FetchConfiguration fetch)
                    throws Exception

  Description copied from interface: `PCResultObjectProvider`
  Initializes the state manager.
  Specified by:
    `initialize` in interface `PCResultObjectProvider`
  Following copied from interface: `kodo.runtime.PCResultObjectProvider`
  See Also:
    `StoreManager.initialize(kodo.runtime.KodoStateManager, kodo.runtime.JDOState, kodo.runtime.FetchConfiguration, java.lang.Object)`

### getResultObject

    public Object getResultObject()
                           throws Exception

  Description copied from interface: `ResultObjectProvider`
  Instantiate the current result object. This method will only be called after `ResultObjectProvider.next()` or `ResultObjectProvider.absolute(int)`.
  Specified by:
    `getResultObject` in interface `ResultObjectProvider`

### getObjectId

    protected abstract Object getObjectId(ClassMetaData meta)
                                   throws Exception

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

### getPCClass

    protected abstract Class getPCClass()
                                 throws Exception

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

### load

    protected abstract void load(KodoStateManager sm,
                                 FetchConfiguration fetch)
                          throws Exception

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

### open

    public void open()
              throws Exception

  Override if desired. Does nothing by default.
  Specified by:
    `open` in interface `ResultObjectProvider`

### supportsRandomAccess

    public boolean supportsRandomAccess()

  Override if desired. Returns false by default.
  Specified by:
    `supportsRandomAccess` in interface `ResultObjectProvider`
  See Also:
    `ResultObjectProvider.supportsRandomAccess()`

### next

    public abstract boolean next()
                          throws Exception

  Implement this method to advance the input.
  Specified by:
    `next` in interface `ResultObjectProvider`
  See Also:
    `ResultObjectProvider#advance`

### absolute

    public boolean absolute(int pos)
                     throws Exception

  Override if desired. Throws an exception by default.
  Specified by:
    `absolute` in interface `ResultObjectProvider`
  See Also:
    `ResultObjectProvider.absolute(int)`

### size

    public int size()
             throws Exception

  Override if desired. Returns `Integer.MAX_VALUE` by default.
  Specified by:
    `size` in interface `ResultObjectProvider`
  See Also:
    `ResultObjectProvider.size()`

### reset

    public void reset()
               throws Exception

  Override if desired. Throws an exception by default.
  Specified by:
    `reset` in interface `ResultObjectProvider`
  See Also:
    `ResultObjectProvider.reset()`

### close

    public void close()
               throws Exception

  Override if desired. Does nothing by default.
  Specified by:
    `close` in interface `ResultObjectProvider`
  See Also:
    `ResultObjectProvider.close()`

### handleCheckedException

    public void handleCheckedException(Exception e)

  Throws a `javax.jdo.JDODataStoreException` by default.
  Specified by:
    `handleCheckedException` in interface `ResultObjectProvider`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.0.3 generated on February 20 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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