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
Class PCData

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

All Implemented Interfaces:
  java.io.Serializable

public class PCData
extends java.lang.Object
implements java.io.Serializable

Holds data about a single persistence capable instance. This class is used in the caching framework, and may also be used by simple store manager back-ends to hold persistent state.

See Also:
  Serialized Form

Field Summary
`java.lang.Object` | `oid`
`java.lang.Class` | `type`

Constructor Summary
`PCData(java.lang.Object oid, com.solarmetric.rd.kodo.meta.ClassMetaData meta)` Constructor.

Method Summary
`java.lang.Object` | `getData(int index)` Returns the stored data value for the field at `index`.
`boolean` | `getLoaded(int index)` Returns `true` if the field at `index` is loaded; else returns `false`.
`java.lang.Object` | `getVersion()` Returns the current version object that this data was loaded from.
`boolean` | `load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, int field, java.lang.Object conn)` Loads some or all of the marked fields from the cache into the given state manager.
`void` | `load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, java.lang.Object conn)` Loads all fields that are currently stored in the cache into the given state manager.
`protected java.lang.Object` | `lookup(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, java.lang.Object conn, java.lang.Object oid)` Find the PC corresponding to `oid` in the cache, using `pm`.
`void` | `setData(int index, java.lang.Object val)` Sets the stored data value for the field at `index` to `val`.
`void` | `setLoaded(int index, boolean loaded)` Sets the `loaded` flag for the field at `index`.
`void` | `setVersion(java.lang.Object version)` Sets the current version object that this data was loaded from.
`void` | `store(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)` Store all loaded fields of the state manager.
`void` | `store(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, java.util.BitSet fields)` Store the given fields from the state manager.
`void` | `store(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, int field)` Store the given field from the state manager into the cache.

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

Field Detail

### oid

    public final java.lang.Object oid

### type

    public final java.lang.Class type

Constructor Detail

### PCData

    public PCData(java.lang.Object oid,
                  com.solarmetric.rd.kodo.meta.ClassMetaData meta)

  Constructor.

Method Detail

### getData

    public java.lang.Object getData(int index)

  Returns the stored data value for the field at `index`. `null` could mean that the field is unset or that the field is set to `null`, so you should use `getLoaded(int)` to check the loaded status of the field.

### setData

    public void setData(int index,
                        java.lang.Object val)

  Sets the stored data value for the field at `index` to `val`.

### getLoaded

    public boolean getLoaded(int index)

  Returns `true` if the field at `index` is loaded; else returns `false`.

### setLoaded

    public void setLoaded(int index,
                          boolean loaded)

  Sets the `loaded` flag for the field at `index`.

### getVersion

    public java.lang.Object getVersion()

  Returns the current version object that this data was loaded from.

### setVersion

    public void setVersion(java.lang.Object version)

  Sets the current version object that this data was loaded from.

### load

    public void load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                     java.lang.Object conn)

  Loads all fields that are currently stored in the cache into the given state manager.

  Parameters:
    `sm` - the state manager to load
    `conn` - current connection information

### load

    public boolean load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                        int field,
                        java.lang.Object conn)

  Loads some or all of the marked fields from the cache into the given state manager.

  Parameters:
    `sm` - the state manager to load
    `field` - the field to load
    `conn` - current connection information
  Returns:
    true if the load was performed, false otherwise

### store

    public void store(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)

  Store all loaded fields of the state manager.

### store

    public void store(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                      java.util.BitSet fields)

  Store the given fields from the state manager.

### store

    public void store(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                      int field)

  Store the given field from the state manager into the cache.

### lookup

    protected java.lang.Object lookup(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                                      java.lang.Object conn,
                                      java.lang.Object oid)

  Find the PC corresponding to `oid` in the cache, using `pm`.

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.