|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AdapterManagerPersist
API used solely by the PersistenceSession.
| Method Summary | |
|---|---|
NakedObject |
recreateRootAdapter(Oid oid,
java.lang.Object pojo)
Either returns an existing adapter (as per #getAdapterFor(Object) or
#getAdapterFor(Oid)), otherwise re-creates an adapter with the specified (persistent)
Oid. |
void |
remapAsPersistent(NakedObject adapter)
Remaps the adapter and any associated aggregated (collection) adapters using a
new value for the Oid provided by the OidGenerator. |
| Method Detail |
|---|
void remapAsPersistent(NakedObject adapter)
adapter and any associated aggregated (collection) adapters using a
new value for the Oid provided by the OidGenerator.
The Oid of the supplied adapter should be in such a state that it can be
converted from transient to persistent. Note
that some Oid implementations require an initial state call to do this (eg to read from a
database identity or sequence value).
The adapter is remapped in the AdapterManager, and the previous is
set to its transient value). Similarly for any aggregated adapters. This is needed for client/server so that the client can remap a changed object.
AdapterManagerProxy.remapUpdated(Oid)
NakedObject recreateRootAdapter(Oid oid,
java.lang.Object pojo)
adapter (as per #getAdapterFor(Object) or
#getAdapterFor(Oid)), otherwise re-creates an adapter with the specified (persistent)
Oid.
Typically called when the Oid is already known, that is, when resolving an already-persisted
object. Is also available for Memento support however, so Oid could also represent a
transient object.
If the adapter is recreated, its ResolveState will be
ResolveState.GHOST if a persistent Oid, or ResolveState.TRANSIENT otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||