Package org.apache.openjpa.kernel
Class AbstractPCData
java.lang.Object
org.apache.openjpa.kernel.AbstractPCData
- All Implemented Interfaces:
Serializable
,PCData
- Direct Known Subclasses:
PCDataImpl
Abstract base class which implements core PCData behavior.
- Author:
- Patrick Linskey, Abe White
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract BitSet
Return the loaded field mask.boolean
isLoaded
(int field) Whether the given field index has stored data.abstract AbstractPCData
Create a new pcdata for holding the state of an embedded instance.protected Object
toData
(FieldMetaData fmd, Object val, StoreContext ctx) Transform the given field value to a data value for caching.protected Object
toEmbeddedData
(Object val, StoreContext ctx) Return the value to cache for the given embedded PC.protected Object
toEmbeddedField
(OpenJPAStateManager sm, ValueMetaData vmd, Object data, FetchConfiguration fetch, Object context) Transform the given data into an embedded PC field value.protected Object
toField
(OpenJPAStateManager sm, FieldMetaData fmd, Object data, FetchConfiguration fetch, Object context) Transform the given data value into its field value.protected Object
toNestedData
(ValueMetaData vmd, Object val, StoreContext ctx) Transform the given nested value to a cachable value.protected Object
toNestedField
(OpenJPAStateManager sm, ValueMetaData vmd, Object data, FetchConfiguration fetch, Object context) Transform the given data value to its field value.protected Collection
toNestedFields
(OpenJPAStateManager sm, ValueMetaData vmd, Collection data, FetchConfiguration fetch, Object context) Transform the given data value to its field value.protected Object
toRelationData
(Object val, StoreContext ctx) Return the value to cache for the given object.protected Object
toRelationField
(OpenJPAStateManager sm, ValueMetaData vmd, Object data, FetchConfiguration fetch, Object context) Transform the given data into a relation field value.protected Object[]
toRelationFields
(OpenJPAStateManager sm, Object data, FetchConfiguration fetch) Transform the given data into relation field values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.openjpa.kernel.PCData
getCache, getData, getId, getImplData, getType, getVersion, load, load, setImplData, setVersion, store, store
-
Field Details
-
NULL
-
-
Constructor Details
-
AbstractPCData
public AbstractPCData()
-
-
Method Details
-
getLoaded
Return the loaded field mask. -
newEmbeddedPCData
Create a new pcdata for holding the state of an embedded instance. -
isLoaded
public boolean isLoaded(int field) Description copied from interface:PCData
Whether the given field index has stored data. -
toField
protected Object toField(OpenJPAStateManager sm, FieldMetaData fmd, Object data, FetchConfiguration fetch, Object context) Transform the given data value into its field value. -
toNestedField
protected Object toNestedField(OpenJPAStateManager sm, ValueMetaData vmd, Object data, FetchConfiguration fetch, Object context) Transform the given data value to its field value. The data value may be a key, value, or element of a map or collection. -
toNestedFields
protected Collection toNestedFields(OpenJPAStateManager sm, ValueMetaData vmd, Collection data, FetchConfiguration fetch, Object context) Transform the given data value to its field value. The data value may be a key, value, or element of a map or collection. -
toRelationField
protected Object toRelationField(OpenJPAStateManager sm, ValueMetaData vmd, Object data, FetchConfiguration fetch, Object context) Transform the given data into a relation field value. Default implementation assumes the data is an oid. -
toRelationFields
Transform the given data into relation field values. Default implementation assumes the data is an oid. -
toEmbeddedField
protected Object toEmbeddedField(OpenJPAStateManager sm, ValueMetaData vmd, Object data, FetchConfiguration fetch, Object context) Transform the given data into an embedded PC field value. Default implementation assumes the data is anAbstractPCData
. -
toData
Transform the given field value to a data value for caching. ReturnNULL
if unable to cache. -
toNestedData
Transform the given nested value to a cachable value. ReturnNULL
if the value cannot be cached. -
toRelationData
Return the value to cache for the given object. Caches its oid by default. -
toEmbeddedData
Return the value to cache for the given embedded PC. Caches aPCData
fromnewEmbeddedPCData(org.apache.openjpa.kernel.OpenJPAStateManager)
by default.
-