|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.kernel.TransferFieldManager org.apache.openjpa.kernel.AttachStrategy
abstract class AttachStrategy
Strategy for attaching objects.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.kernel.TransferFieldManager |
---|
dblval, field, longval, objval |
Constructor Summary | |
---|---|
AttachStrategy()
|
Method Summary | |
---|---|
abstract Object |
attach(AttachManager manager,
Object toAttach,
ClassMetaData meta,
PersistenceCapable into,
OpenJPAStateManager owner,
ValueMetaData ownerMeta,
boolean explicit)
Attach. |
protected Collection |
attachCollection(AttachManager manager,
Collection orig,
OpenJPAStateManager sm,
FieldMetaData fmd)
Return a new collection with the attached contents of the given one. |
protected boolean |
attachField(AttachManager manager,
Object toAttach,
StateManagerImpl sm,
FieldMetaData fmd,
boolean nullLoaded)
Attach the given field into the given instance. |
protected Map |
attachMap(AttachManager manager,
Map orig,
OpenJPAStateManager sm,
FieldMetaData fmd)
Make sure all the values in the given map are attached. |
protected abstract Object |
getDetachedObjectId(AttachManager manager,
Object toAttach)
Return the identity of the given detached instance. |
protected Object |
getReference(AttachManager manager,
Object toAttach,
OpenJPAStateManager sm,
ValueMetaData vmd)
Return a managed, possibly hollow reference for the given detached object. |
protected StateManagerImpl |
persist(AttachManager manager,
PersistenceCapable pc,
ClassMetaData meta,
Object appId,
boolean explicit)
Return a PNew/PNewProvisional managed object for the given detached instance. |
protected abstract void |
provideField(Object toAttach,
StateManagerImpl sm,
int field)
Provide the given field into this field manager. |
Methods inherited from class org.apache.openjpa.kernel.TransferFieldManager |
---|
clear, fetchBooleanField, fetchByteField, fetchCharField, fetchDoubleField, fetchFloatField, fetchIntField, fetchLongField, fetchObjectField, fetchShortField, fetchStringField, storeBooleanField, storeByteField, storeCharField, storeDoubleField, storeFloatField, storeIntField, storeLongField, storeObjectField, storeShortField, storeStringField |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
AttachStrategy()
Method Detail |
---|
public abstract Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta, boolean explicit)
manager
- manager holding cache of attached instancestoAttach
- detached instancemeta
- metadata for the instance being attachedinto
- instance we're attaching intoowner
- state manager for into
ownerMeta
- field we traversed to find toAttach
explicit
- whether to make new instances explicitly persistentprotected abstract Object getDetachedObjectId(AttachManager manager, Object toAttach)
protected abstract void provideField(Object toAttach, StateManagerImpl sm, int field)
protected StateManagerImpl persist(AttachManager manager, PersistenceCapable pc, ClassMetaData meta, Object appId, boolean explicit)
protected boolean attachField(AttachManager manager, Object toAttach, StateManagerImpl sm, FieldMetaData fmd, boolean nullLoaded)
toAttach
- the detached persistent instancesm
- state manager for the managed instance we're copying
into; toAttach
also uses this state managerfmd
- metadata on the field we're copyingnullLoaded
- if false, nulls will be considered unloaded and will
not be attachedprotected Object getReference(AttachManager manager, Object toAttach, OpenJPAStateManager sm, ValueMetaData vmd)
protected Collection attachCollection(AttachManager manager, Collection orig, OpenJPAStateManager sm, FieldMetaData fmd)
protected Map attachMap(AttachManager manager, Map orig, OpenJPAStateManager sm, FieldMetaData fmd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |