org.apache.openjpa.enhance
Class ReflectingPersistenceCapable

java.lang.Object
  extended by org.apache.openjpa.enhance.ReflectingPersistenceCapable
All Implemented Interfaces:
ManagedInstanceProvider, PersistenceCapable

public class ReflectingPersistenceCapable
extends Object
implements PersistenceCapable, ManagedInstanceProvider

Implementation of the PersistenceCapable interface that can handle the persistence-capable contract for instances that were not enhanced before class load time.

Since:
1.0.0

Field Summary
 
Fields inherited from interface org.apache.openjpa.enhance.PersistenceCapable
CHECK_READ, CHECK_WRITE, DESERIALIZED, LOAD_REQUIRED, MEDIATE_READ, MEDIATE_WRITE, READ_OK, READ_WRITE_OK, SERIALIZABLE
 
Constructor Summary
ReflectingPersistenceCapable(Object o, OpenJPAConfiguration conf)
           
 
Method Summary
 Object getManagedInstance()
           
 void pcCopyField(Object fromObject, int i)
           
 void pcCopyFields(Object fromObject, int[] fieldIndices)
           
 void pcCopyKeyFieldsFromObjectId(FieldConsumer consumer, Object obj)
           
 void pcCopyKeyFieldsToObjectId(FieldSupplier supplier, Object obj)
           
 void pcCopyKeyFieldsToObjectId(Object oid)
           
 void pcDirty(String fieldName)
           
 Object pcFetchObjectId()
           
 Object pcGetDetachedState()
           
 int pcGetEnhancementContractVersion()
           
 Object pcGetGenericContext()
           
 StateManager pcGetStateManager()
           
 Object pcGetVersion()
           
 boolean pcIsDeleted()
           
 Boolean pcIsDetached()
           
 boolean pcIsDirty()
           
 boolean pcIsNew()
           
 boolean pcIsPersistent()
           
 boolean pcIsTransactional()
           
 PersistenceCapable pcNewInstance(StateManager sm, boolean clear)
           
 PersistenceCapable pcNewInstance(StateManager sm, Object oid, boolean clear)
           
 Object pcNewObjectIdInstance()
           
 Object pcNewObjectIdInstance(Object oid)
           
 void pcProvideField(int i)
           
 void pcProvideFields(int[] fieldIndices)
           
 void pcReplaceField(int i)
           
 void pcReplaceFields(int[] fieldIndices)
           
 void pcReplaceStateManager(StateManager sm)
           
 void pcSetDetachedState(Object state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectingPersistenceCapable

public ReflectingPersistenceCapable(Object o,
                                    OpenJPAConfiguration conf)
Method Detail

pcGetEnhancementContractVersion

public int pcGetEnhancementContractVersion()
Specified by:
pcGetEnhancementContractVersion in interface PersistenceCapable

pcGetGenericContext

public Object pcGetGenericContext()
Specified by:
pcGetGenericContext in interface PersistenceCapable

pcGetStateManager

public StateManager pcGetStateManager()
Specified by:
pcGetStateManager in interface PersistenceCapable

pcReplaceStateManager

public void pcReplaceStateManager(StateManager sm)
Specified by:
pcReplaceStateManager in interface PersistenceCapable

pcProvideField

public void pcProvideField(int i)
Specified by:
pcProvideField in interface PersistenceCapable

pcProvideFields

public void pcProvideFields(int[] fieldIndices)
Specified by:
pcProvideFields in interface PersistenceCapable

pcReplaceField

public void pcReplaceField(int i)
Specified by:
pcReplaceField in interface PersistenceCapable

pcReplaceFields

public void pcReplaceFields(int[] fieldIndices)
Specified by:
pcReplaceFields in interface PersistenceCapable

pcCopyField

public void pcCopyField(Object fromObject,
                        int i)

pcCopyFields

public void pcCopyFields(Object fromObject,
                         int[] fieldIndices)
Specified by:
pcCopyFields in interface PersistenceCapable

pcDirty

public void pcDirty(String fieldName)
Specified by:
pcDirty in interface PersistenceCapable

pcFetchObjectId

public Object pcFetchObjectId()
Specified by:
pcFetchObjectId in interface PersistenceCapable

pcGetVersion

public Object pcGetVersion()
Specified by:
pcGetVersion in interface PersistenceCapable

pcIsDirty

public boolean pcIsDirty()
Specified by:
pcIsDirty in interface PersistenceCapable

pcIsTransactional

public boolean pcIsTransactional()
Specified by:
pcIsTransactional in interface PersistenceCapable

pcIsPersistent

public boolean pcIsPersistent()
Specified by:
pcIsPersistent in interface PersistenceCapable

pcIsNew

public boolean pcIsNew()
Specified by:
pcIsNew in interface PersistenceCapable

pcIsDeleted

public boolean pcIsDeleted()
Specified by:
pcIsDeleted in interface PersistenceCapable

pcIsDetached

public Boolean pcIsDetached()
Specified by:
pcIsDetached in interface PersistenceCapable

pcNewInstance

public PersistenceCapable pcNewInstance(StateManager sm,
                                        boolean clear)
Specified by:
pcNewInstance in interface PersistenceCapable

pcNewInstance

public PersistenceCapable pcNewInstance(StateManager sm,
                                        Object oid,
                                        boolean clear)
Specified by:
pcNewInstance in interface PersistenceCapable

pcNewObjectIdInstance

public Object pcNewObjectIdInstance()
Specified by:
pcNewObjectIdInstance in interface PersistenceCapable

pcNewObjectIdInstance

public Object pcNewObjectIdInstance(Object oid)
Specified by:
pcNewObjectIdInstance in interface PersistenceCapable

pcCopyKeyFieldsToObjectId

public void pcCopyKeyFieldsToObjectId(Object oid)
Specified by:
pcCopyKeyFieldsToObjectId in interface PersistenceCapable

pcCopyKeyFieldsToObjectId

public void pcCopyKeyFieldsToObjectId(FieldSupplier supplier,
                                      Object obj)
Specified by:
pcCopyKeyFieldsToObjectId in interface PersistenceCapable

pcCopyKeyFieldsFromObjectId

public void pcCopyKeyFieldsFromObjectId(FieldConsumer consumer,
                                        Object obj)
Specified by:
pcCopyKeyFieldsFromObjectId in interface PersistenceCapable

pcGetDetachedState

public Object pcGetDetachedState()
Specified by:
pcGetDetachedState in interface PersistenceCapable

pcSetDetachedState

public void pcSetDetachedState(Object state)
Specified by:
pcSetDetachedState in interface PersistenceCapable

getManagedInstance

public Object getManagedInstance()
Specified by:
getManagedInstance in interface ManagedInstanceProvider


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