|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.pojo.path.base.AbstractPojoPathFunction<IN,VALUE>
IN - is the generic input-type.VALUE - is the generic value-typepublic abstract class AbstractPojoPathFunction<IN,VALUE>
This is the abstract base implementation of the PojoPathFunction
interface.
| Field Summary |
|---|
| Fields inherited from interface net.sf.mmm.util.pojo.path.api.PojoPathFunction |
|---|
FUNCTION_NAME_PREFIX |
| Constructor Summary | |
|---|---|
AbstractPojoPathFunction()
The constructor. |
|
| Method Summary | |
|---|---|
VALUE |
create(IN actual,
String functionName,
PojoPathContext context)
This method creates an appropriate new value. |
VALUE |
get(IN actual,
String functionName,
PojoPathContext context)
This method gets the value of this function. |
protected String |
getFunctionDescription(String functionName)
This method gets a description of this function. |
boolean |
isDeterministic()
This method determines if this PojoPathFunction is deterministic. |
VALUE |
set(IN actual,
String functionName,
VALUE value,
PojoPathContext context)
This method sets the given value for the given
actual Pojo. |
String |
toString()
|
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent |
|---|
doInitialize, getLogger, setLogger |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent |
|---|
doInitialized, getInitializationState, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.mmm.util.pojo.path.api.PojoPathFunction |
|---|
getInputClass, getValueClass |
| Constructor Detail |
|---|
public AbstractPojoPathFunction()
| Method Detail |
|---|
public boolean isDeterministic()
PojoPathFunction is deterministic.
In this case it has to guarantee that repetitive calls of
get with the same
(unmodified) actual Pojo will produce the
same result.PojoPathFunction should be deterministic. However in
some cases the calculation of a PojoPathFunction may depend on the
current time or a random value and will therefore be indeterministic.PojoPathFunction is indeterministic, the
caching will disabled for its result and
further traversals.true. Override for
indeterministic implementations.
isDeterministic in interface PojoPathFunction<IN,VALUE>true if this function is deterministic,
false otherwise.protected String getFunctionDescription(String functionName)
functionName - is the name under which this function was invoked.
public VALUE create(IN actual,
String functionName,
PojoPathContext context)
PojoPathNavigator.
get if the mode is PojoPathMode.CREATE_IF_NULL after
get returned
null.pojo-factory. Further in most
cases the created value instance will be attached to the given
actual Pojo.
create in interface PojoPathFunction<IN,VALUE>actual - is the actual Pojo where this
function is invoked on. Typically the returned value should be
retrieved via this object.functionName - is the name under which this PojoPathFunction
was invoked via the PojoPathNavigator excluding the
PojoPathFunction.FUNCTION_NAME_PREFIX.context - is the PojoPathContext providing additional context
information. Objects traversed between actual and the
returned value should be
recognized
via the recognizer.
null if creation is NOT
possible. However returning null here will cause the
PojoPathNavigator to fail with an exception.
public VALUE get(IN actual,
String functionName,
PojoPathContext context)
PojoPathNavigator.
get independent of the PojoPathMode. A regular implementation
should only return what is already there. However in specific cases this
may NOT (initially) be available from the given
Pojo actual and therefore be
retrieved from somewhere else (e.g. a database using a primary key given
via a property of the given
context). Further it can be legal to modify the
actual Pojo e.g. by attaching
the externally retrieved result.
get in interface PojoPathFunction<IN,VALUE>actual - is the actual Pojo where this
function is invoked on. Typically the returned value should be
retrieved via this object.functionName - is the name under which this PojoPathFunction
was invoked via the PojoPathNavigator excluding the
PojoPathFunction.FUNCTION_NAME_PREFIX.context - is the PojoPathContext providing additional context
information. Objects traversed between actual and the
returned value should be
recognized
via the recognizer.
null if NOT available.
public VALUE set(IN actual,
String functionName,
VALUE value,
PojoPathContext context)
value for the given
actual Pojo.get should return the same
value for identical arguments.
set in interface PojoPathFunction<IN,VALUE>actual - is the actual Pojo where this
function is invoked on. Typically the given value
should be set in this object.functionName - is the name under which this PojoPathFunction
was invoked via the PojoPathNavigator excluding the
PojoPathFunction.FUNCTION_NAME_PREFIX.value - is the value to set.context - is the PojoPathContext providing additional context
information. Objects traversed between actual and the
returned value should be
recognized
via the recognizer.
null.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||