Package org.apache.openjpa.kernel
Class PCDataImpl
java.lang.Object
org.apache.openjpa.kernel.AbstractPCData
org.apache.openjpa.kernel.PCDataImpl
- All Implemented Interfaces:
Serializable
,PCData
- Direct Known Subclasses:
DataCachePCDataImpl
Default
PCData
implementation.- Author:
- Patrick Linskey, Abe White
- See Also:
-
Field Summary
Fields inherited from class org.apache.openjpa.kernel.AbstractPCData
NULL
-
Constructor Summary
ConstructorDescriptionPCDataImpl
(Object oid, ClassMetaData meta) PCDataImpl
(Object oid, ClassMetaData meta, String name) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearData
(int index) getCache()
Get the name of the cache where this data is stored.getData
(int index) Return the data stored in the given field index.getId()
Return the id of this instance.Returns the instance-level impl data, or null if none.getImplData
(int index) getIntermediate
(int index) Return the loaded field mask.Class<?>
getType()
Return the type of this instance.Returns the current version object that this data was loaded from.boolean
isLoaded
(int index) Whether the given field index has stored data.void
load
(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch, Object context) Loads some or all of the marked fields from the cache into the given state manager.void
load
(OpenJPAStateManager sm, FetchConfiguration fetch, Object context) Loads all fields that are currently stored in the cache into the given state manager.protected void
loadField
(OpenJPAStateManager sm, FieldMetaData fmd, FetchConfiguration fetch, Object context) Set field-level information into the given state manager.protected void
Set impl data information into the given state manager.protected void
loadImplData
(OpenJPAStateManager sm, FieldMetaData fmd) Set field-level impl data into the given state manager.protected void
Set intermediate information for the given field into the state manager.protected void
Set version information into the given state manager.Return a newPCData
implementation of the right type for embedded instances.void
void
setImplData
(int index, Object val) void
setImplData
(Object val) Sets the stored instance-level impl data.void
setIntermediate
(int index, Object val) void
setLoaded
(int index, boolean loaded) void
setVersion
(Object version) Sets the current version object that this data was loaded from.void
Store all loaded fields of the state manager.void
store
(OpenJPAStateManager sm, BitSet fields) Store the given fields from the state manager.protected void
storeField
(OpenJPAStateManager sm, FieldMetaData fmd) Store field-level information from the given state manager.protected void
Store impl data from the given state manager.protected void
storeImplData
(OpenJPAStateManager sm, FieldMetaData fmd, boolean fieldLoaded) Store impl data for the given field.protected void
Store the intermediate field value for the given field.protected void
Store version information from the given state manager.Methods inherited from class org.apache.openjpa.kernel.AbstractPCData
toData, toEmbeddedData, toEmbeddedField, toField, toNestedData, toNestedField, toNestedFields, toRelationData, toRelationField, toRelationFields
-
Constructor Details
-
PCDataImpl
-
PCDataImpl
Constructor.
-
-
Method Details
-
getId
Description copied from interface:PCData
Return the id of this instance. -
getType
Description copied from interface:PCData
Return the type of this instance. -
getLoaded
Description copied from class:AbstractPCData
Return the loaded field mask.- Specified by:
getLoaded
in classAbstractPCData
-
getData
Description copied from interface:PCData
Return the data stored in the given field index. -
setData
-
clearData
public void clearData(int index) -
getImplData
Description copied from interface:PCData
Returns the instance-level impl data, or null if none. -
setImplData
Description copied from interface:PCData
Sets the stored instance-level impl data. -
getImplData
-
setImplData
-
getIntermediate
-
setIntermediate
-
isLoaded
public boolean isLoaded(int index) Description copied from interface:PCData
Whether the given field index has stored data.- Specified by:
isLoaded
in interfacePCData
- Overrides:
isLoaded
in classAbstractPCData
-
setLoaded
public void setLoaded(int index, boolean loaded) -
getVersion
Description copied from interface:PCData
Returns the current version object that this data was loaded from. -
setVersion
Description copied from interface:PCData
Sets the current version object that this data was loaded from. -
load
Description copied from interface:PCData
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
Description copied from interface:PCData
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
-
loadVersion
Set version information into the given state manager. -
loadImplData
Set impl data information into the given state manager. -
loadField
protected void loadField(OpenJPAStateManager sm, FieldMetaData fmd, FetchConfiguration fetch, Object context) Set field-level information into the given state manager. -
loadImplData
Set field-level impl data into the given state manager. -
loadIntermediate
Set intermediate information for the given field into the state manager. -
store
Description copied from interface:PCData
Store all loaded fields of the state manager. -
store
Description copied from interface:PCData
Store the given fields from the state manager. -
storeVersion
Store version information from the given state manager. -
storeImplData
Store impl data from the given state manager. -
storeField
Store field-level information from the given state manager. -
storeIntermediate
Store the intermediate field value for the given field. -
storeImplData
Store impl data for the given field. -
newEmbeddedPCData
Return a newPCData
implementation of the right type for embedded instances. Returns aPCDataImpl
by default.- Specified by:
newEmbeddedPCData
in classAbstractPCData
-
getCache
Description copied from interface:PCData
Get the name of the cache where this data is stored.
-