public class DataCachePCDataImpl extends PCDataImpl implements DataCachePCData
PCData
implementation for data caching. This
implementation is properly synchronized.NULL
Constructor and Description |
---|
DataCachePCDataImpl(Object oid,
ClassMetaData meta) |
DataCachePCDataImpl(Object oid,
ClassMetaData meta,
String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearData(int index) |
protected void |
clearInverseRelationCache(OpenJPAStateManager sm,
FieldMetaData fmd)
Check if this field is in use of "order by" by other field collections
in inverse relation.
|
Object |
getData(int index)
Return the data stored in the given field index.
|
Object |
getImplData()
Returns the instance-level impl data, or null if none.
|
Object |
getImplData(int index) |
Object |
getIntermediate(int index) |
long |
getTimeOut()
Gets the original timeout of this instance.
|
Object |
getVersion()
Returns the current version object that this data was loaded from.
|
boolean |
isLoaded(int index)
Whether the given field index has stored data.
|
boolean |
isTimedOut()
Whether this data is timed out.
|
AbstractPCData |
newEmbeddedPCData(OpenJPAStateManager sm)
Return a new
PCData implementation of the right type for
embedded instances. |
void |
setData(int index,
Object val) |
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(OpenJPAStateManager sm)
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 Object |
toData(FieldMetaData fmd,
Object val,
StoreContext ctx)
Transform the given field value to a data value for caching.
|
protected Object |
toNestedData(ValueMetaData vmd,
Object val,
StoreContext ctx)
Transform the given nested value to a cachable value.
|
getCache, getId, getLoaded, getType, load, load, loadField, loadImplData, loadImplData, loadIntermediate, loadVersion, storeImplData, storeImplData, storeIntermediate, storeVersion
toEmbeddedData, toEmbeddedField, toField, toNestedField, toNestedFields, toRelationData, toRelationField, toRelationFields
public DataCachePCDataImpl(Object oid, ClassMetaData meta)
public DataCachePCDataImpl(Object oid, ClassMetaData meta, String name)
public boolean isTimedOut()
DataCachePCData
isTimedOut
in interface DataCachePCData
public long getTimeOut()
DataCachePCData
getTimeOut
in interface DataCachePCData
public Object getData(int index)
PCData
getData
in interface PCData
getData
in class PCDataImpl
public void setData(int index, Object val)
setData
in class PCDataImpl
public void clearData(int index)
clearData
in class PCDataImpl
public Object getImplData()
PCData
getImplData
in interface PCData
getImplData
in class PCDataImpl
public void setImplData(Object val)
PCData
setImplData
in interface PCData
setImplData
in class PCDataImpl
public Object getImplData(int index)
getImplData
in class PCDataImpl
public void setImplData(int index, Object val)
setImplData
in class PCDataImpl
public Object getIntermediate(int index)
getIntermediate
in class PCDataImpl
public void setIntermediate(int index, Object val)
setIntermediate
in class PCDataImpl
public boolean isLoaded(int index)
PCData
isLoaded
in interface PCData
isLoaded
in class PCDataImpl
public void setLoaded(int index, boolean loaded)
setLoaded
in class PCDataImpl
public Object getVersion()
PCData
getVersion
in interface PCData
getVersion
in class PCDataImpl
public void setVersion(Object version)
PCData
setVersion
in interface PCData
setVersion
in class PCDataImpl
public void store(OpenJPAStateManager sm)
PCData
store
in interface PCData
store
in class PCDataImpl
public void store(OpenJPAStateManager sm, BitSet fields)
PCData
store
in interface PCData
store
in class PCDataImpl
protected void storeField(OpenJPAStateManager sm, FieldMetaData fmd)
storeField
in class PCDataImpl
protected void clearInverseRelationCache(OpenJPAStateManager sm, FieldMetaData fmd)
protected Object toData(FieldMetaData fmd, Object val, StoreContext ctx)
AbstractPCData
AbstractPCData.NULL
if unable to cache.toData
in class AbstractPCData
protected Object toNestedData(ValueMetaData vmd, Object val, StoreContext ctx)
AbstractPCData
AbstractPCData.NULL
if the value cannot be cached.toNestedData
in class AbstractPCData
public AbstractPCData newEmbeddedPCData(OpenJPAStateManager sm)
PCDataImpl
PCData
implementation of the right type for
embedded instances. Returns a PCDataImpl
by default.newEmbeddedPCData
in class PCDataImpl
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.