net.sf.mmm.util.pojo.path.base
Class AbstractMapPojoPathFunction<VALUE>
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.pojo.path.base.AbstractPojoPathFunction<Map<String,Object>,VALUE>
net.sf.mmm.util.pojo.path.base.AbstractMapPojoPathFunction<VALUE>
- Type Parameters:
VALUE - is the value this function traverses to starting from the
actual POJO.
- All Implemented Interfaces:
- PojoPathFunction<Map<String,Object>,VALUE>
public abstract class AbstractMapPojoPathFunction<VALUE>
- extends AbstractPojoPathFunction<Map<String,Object>,VALUE>
This is the abstract base implementation for a
PojoPathFunction that operates on a
Map.
- Since:
- 1.1.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
AbstractMapPojoPathFunction
public AbstractMapPojoPathFunction()
get
public VALUE get(Map<String,Object> current,
String functionName,
PojoPathContext context)
- This method gets the value of this function. It is invoked by
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.
- Specified by:
get in interface PojoPathFunction<Map<String,Object>,VALUE>- Overrides:
get in class AbstractPojoPathFunction<Map<String,Object>,VALUE>
- Parameters:
current - 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.
- Returns:
- the value of this function or
null if NOT available.
set
public VALUE set(Map<String,Object> current,
String functionName,
VALUE value,
PojoPathContext context)
- This method sets the given
value for the given
actual Pojo.
After this method has been successfully invoked, the method
get should return the same
value for identical arguments.
- Specified by:
set in interface PojoPathFunction<Map<String,Object>,VALUE>- Overrides:
set in class AbstractPojoPathFunction<Map<String,Object>,VALUE>
- Parameters:
current - 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.
- Returns:
- the previous value that has been replaced or
null.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.