org.apache.openjpa.xmlstore
Class ObjectData

java.lang.Object
  extended by org.apache.openjpa.xmlstore.ObjectData
All Implemented Interfaces:
Cloneable

public final class ObjectData
extends Object
implements Cloneable

In-memory form of data in datastore backing a single persistent object.


Constructor Summary
ObjectData(Object oid, ClassMetaData meta)
          Create the object without underlying data.
 
Method Summary
 Object clone()
          Clone this data.
 Object getField(int num)
          Get the data for the field with the given index.
 Object getId()
          Getter for oid.
 ClassMetaData getMetaData()
          Get the metadata associated with the type of persistent object for which this data applies.
 Long getVersion()
          Get the version number of the object.
 void load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch)
          Load the data and version information for this object into the given state manager.
 void load(OpenJPAStateManager sm, FetchConfiguration fetch)
          Load the data and version information for this object into the given state manager.
 void setField(int num, Object val)
          Set the data for the field with the given index.
 void setVersion(Long version)
          Set the version number of the object.
 void store(OpenJPAStateManager sm)
          Store the data and version information for this object from the given state manager.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectData

public ObjectData(Object oid,
                  ClassMetaData meta)
Create the object without underlying data. Just pass in type specific metadata and the oid.

Method Detail

getId

public Object getId()
Getter for oid.


getField

public Object getField(int num)
Get the data for the field with the given index.


setField

public void setField(int num,
                     Object val)
Set the data for the field with the given index.


setVersion

public void setVersion(Long version)
Set the version number of the object.


getVersion

public Long getVersion()
Get the version number of the object.


getMetaData

public ClassMetaData getMetaData()
Get the metadata associated with the type of persistent object for which this data applies.


load

public void load(OpenJPAStateManager sm,
                 FetchConfiguration fetch)
Load the data and version information for this object into the given state manager. Only fields in the given fetch configuration are loaded.


load

public void load(OpenJPAStateManager sm,
                 BitSet fields,
                 FetchConfiguration fetch)
Load the data and version information for this object into the given state manager. Only fields in the given bit set will be loaded.


store

public void store(OpenJPAStateManager sm)
Store the data and version information for this object from the given state manager. Only dirty fields will be stored.


clone

public Object clone()
Clone this data.

Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.