|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.betwixt.strategy.IdStoringStrategy
Pluggable strategy for id storage management. It is possible to use this strategy for innovative active storage storage strategies as well as passive ones. For example, it is possible to have some beans map to references without ever being fully mapped.
Field Summary | |
static IdStoringStrategy |
DEFAULT
Default storage strategy |
Constructor Summary | |
IdStoringStrategy()
|
Method Summary | |
abstract java.lang.Object |
getReferenced(Context context,
java.lang.String id)
Gets an object matching the given reference. |
abstract java.lang.String |
getReferenceFor(Context context,
java.lang.Object bean)
Retrieves a reference for the given instance. |
abstract void |
reset()
Reset to the initial state. |
abstract void |
setReference(Context context,
java.lang.Object bean,
java.lang.String id)
Stores an instance reference for later retrieval. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static IdStoringStrategy DEFAULT
DefaultIdStoringStrategy
Constructor Detail |
public IdStoringStrategy()
Method Detail |
public abstract java.lang.String getReferenceFor(Context context, java.lang.Object bean)
IDGenerator
strategy to vary the values
written for a bean.
context
- current context, not nullbean
- the instance, not null
public abstract void setReference(Context context, java.lang.Object bean, java.lang.String id)
context
- current context, not nullbean
- the instance, not nullid
- the id to usepublic abstract java.lang.Object getReferenced(Context context, java.lang.String id)
context
- Context
, not nullid
- the reference id
public abstract void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |