public abstract class IdStoringStrategy extends Object
Modifier and Type | Field and Description |
---|---|
static IdStoringStrategy |
DEFAULT
Deprecated.
do not use this singleton since it
creates a static Map of all objects ever written.
Use
createDefault() instead |
Constructor and Description |
---|
IdStoringStrategy() |
Modifier and Type | Method and Description |
---|---|
static IdStoringStrategy |
createDefault()
Factory method creates the default
Betwixt implementation. |
abstract Object |
getReferenced(Context context,
String id)
Gets an object matching the given reference.
|
abstract String |
getReferenceFor(Context context,
Object bean)
Retrieves a reference for the given instance.
|
abstract void |
reset()
Reset to the initial state.
|
abstract void |
setReference(Context context,
Object bean,
String id)
Stores an instance reference for later retrieval.
|
public static IdStoringStrategy DEFAULT
createDefault()
insteadpublic static IdStoringStrategy createDefault()
Betwixt
implementation.
The implementation created may vary if the default implementation changes.IdStoringStrategy
used as defaultpublic abstract String getReferenceFor(Context context, Object bean)
IDGenerator
strategy to vary the values
written for a bean.context
- current context, not nullbean
- the instance, not nullpublic abstract void setReference(Context context, Object bean, String id)
context
- current context, not nullbean
- the instance, not nullid
- the id to usepublic abstract Object getReferenced(Context context, String id)
context
- Context
, not nullid
- the reference idpublic abstract void reset()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.