Package org.apache.openjpa.kernel
Interface PCData
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
DataCachePCData
,PCDataGenerator.DynamicPCData
- All Known Implementing Classes:
AbstractPCData
,DataCachePCDataImpl
,PCDataImpl
public interface PCData extends java.io.Serializable
Holds data about a single persistence capable instance. This interface is used in the caching framework, and may also be used by simple store manager back-ends to hold persistent state.- Author:
- Patrick Linskey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getCache()
Get the name of the cache where this data is stored.java.lang.Object
getData(int i)
Return the data stored in the given field index.java.lang.Object
getId()
Return the id of this instance.java.lang.Object
getImplData()
Returns the instance-level impl data, or null if none.java.lang.Class
getType()
Return the type of this instance.java.lang.Object
getVersion()
Returns the current version object that this data was loaded from.boolean
isLoaded(int i)
Whether the given field index has stored data.void
load(OpenJPAStateManager sm, java.util.BitSet fields, FetchConfiguration fetch, java.lang.Object context)
Loads some or all of the marked fields from the cache into the given state manager.void
load(OpenJPAStateManager sm, FetchConfiguration fetch, java.lang.Object context)
Loads all fields that are currently stored in the cache into the given state manager.void
setImplData(java.lang.Object val)
Sets the stored instance-level impl data.void
setVersion(java.lang.Object version)
Sets the current version object that this data was loaded from.void
store(OpenJPAStateManager sm)
Store all loaded fields of the state manager.void
store(OpenJPAStateManager sm, java.util.BitSet fields)
Store the given fields from the state manager.
-
-
-
Method Detail
-
getId
java.lang.Object getId()
Return the id of this instance.
-
getType
java.lang.Class getType()
Return the type of this instance.
-
getImplData
java.lang.Object getImplData()
Returns the instance-level impl data, or null if none.
-
setImplData
void setImplData(java.lang.Object val)
Sets the stored instance-level impl data.
-
getVersion
java.lang.Object getVersion()
Returns the current version object that this data was loaded from.
-
setVersion
void setVersion(java.lang.Object version)
Sets the current version object that this data was loaded from.
-
load
void load(OpenJPAStateManager sm, FetchConfiguration fetch, java.lang.Object context)
Loads all fields that are currently stored in the cache into the given state manager.- Parameters:
sm
- the state manager to loadfetch
- the fetch configuration to use for loading related objectscontext
- current context information
-
load
void load(OpenJPAStateManager sm, java.util.BitSet fields, FetchConfiguration fetch, java.lang.Object context)
Loads some or all of the marked fields from the cache into the given state manager.- Parameters:
sm
- the state manager to loadfields
- the fields to load; clear the bits for the fields that are successfully loadedfetch
- the fetch configuration to use for loading related objectscontext
- current context information
-
store
void store(OpenJPAStateManager sm)
Store all loaded fields of the state manager.
-
store
void store(OpenJPAStateManager sm, java.util.BitSet fields)
Store the given fields from the state manager.
-
getData
java.lang.Object getData(int i)
Return the data stored in the given field index.
-
isLoaded
boolean isLoaded(int i)
Whether the given field index has stored data.
-
getCache
java.lang.String getCache()
Get the name of the cache where this data is stored.
-
-