|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.betwixt.strategy.IdStoringStrategy
org.apache.commons.betwixt.strategy.DefaultIdStoringStrategy
Stores every ID that given to it into an internal HashMap and
returns it on request.
| Field Summary | |
private java.util.Map |
beanByIdMap
|
private java.util.Map |
idByBeanMap
|
| Fields inherited from class org.apache.commons.betwixt.strategy.IdStoringStrategy |
DEFAULT |
| Constructor Summary | |
DefaultIdStoringStrategy()
Constructs a IdStoringStrategyusing a HashMap for
storage. |
|
| Method Summary | |
java.lang.Object |
getReferenced(Context context,
java.lang.String id)
Gets an object matching the given reference. |
java.lang.String |
getReferenceFor(Context context,
java.lang.Object bean)
Returns a String id for the given bean if it has been stored previously. |
void |
reset()
Clears all beans. |
void |
setReference(Context context,
java.lang.Object bean,
java.lang.String id)
Stores an ID for the given instance and context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.Map idByBeanMap
private java.util.Map beanByIdMap
| Constructor Detail |
public DefaultIdStoringStrategy()
IdStoringStrategyusing a HashMap for
storage.
| Method Detail |
public java.lang.String getReferenceFor(Context context,
java.lang.Object bean)
getReferenceFor in class IdStoringStrategycontext - current context, not nullbean - the instance, not null
IdStoringStrategy.getReferenceFor(org.apache.commons.betwixt.expression.Context,
java.lang.Object)
public void setReference(Context context,
java.lang.Object bean,
java.lang.String id)
setReference in class IdStoringStrategycontext - current context, not nullbean - current instance, not nullid - the ID to storeIdStoringStrategy.setReference(org.apache.commons.betwixt.expression.Context,
java.lang.Object, java.lang.String)
public java.lang.Object getReferenced(Context context,
java.lang.String id)
getReferenced in class IdStoringStrategycontext - Context, not nullid - the reference id
public void reset()
reset in class IdStoringStrategy
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||