public class MapPropertyGetter extends Object implements PropertyGetter
PropertyGetter on a Map type entityPropertyGetter.NullValuePolicy| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
keyType |
protected PropertyGetter.NullValuePolicy |
nullValuePolicy |
protected Osgl.Function<Class<?>,Object> |
objectFactory |
protected Osgl.Func2<String,Class<?>,?> |
stringValueResolver |
protected Class<?> |
valType |
| Constructor and Description |
|---|
MapPropertyGetter(Class<?> keyType,
Class<?> valType) |
MapPropertyGetter(Osgl.Function<Class<?>,Object> objectFactory,
Osgl.Func2<String,Class<?>,?> stringValueResolver,
Class<?> keyType,
Class<?> valType) |
MapPropertyGetter(Osgl.Function<Class<?>,Object> objectFactory,
Osgl.Func2<String,Class<?>,?> stringValueResolver,
PropertyGetter.NullValuePolicy nullValuePolicy,
Class<?> keyType,
Class<?> valType) |
MapPropertyGetter(PropertyGetter.NullValuePolicy nullValuePolicy,
Class<?> keyType,
Class<?> valType) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Object entity,
Object index)
Get the property value from an entity
|
protected Object |
keyFrom(Object index) |
void |
setNullValuePolicy(PropertyGetter.NullValuePolicy nvp) |
void |
setObjectFactory(Osgl.Function<Class<?>,Object> factory) |
void |
setStringValueResolver(Osgl.Func2<String,Class<?>,?> stringValueResolver) |
PropertySetter |
setter()
Returns the corresponding setter
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetNullValuePolicysetObjectFactory, setStringValueResolverprotected final Class<?> keyType
protected final Class<?> valType
protected Osgl.Function<Class<?>,Object> objectFactory
protected Osgl.Func2<String,Class<?>,?> stringValueResolver
protected PropertyGetter.NullValuePolicy nullValuePolicy
public MapPropertyGetter(PropertyGetter.NullValuePolicy nullValuePolicy, Class<?> keyType, Class<?> valType)
public MapPropertyGetter(Osgl.Function<Class<?>,Object> objectFactory, Osgl.Func2<String,Class<?>,?> stringValueResolver, Class<?> keyType, Class<?> valType)
public MapPropertyGetter(Osgl.Function<Class<?>,Object> objectFactory, Osgl.Func2<String,Class<?>,?> stringValueResolver, PropertyGetter.NullValuePolicy nullValuePolicy, Class<?> keyType, Class<?> valType)
public Object get(Object entity, Object index)
PropertyGetterget in interface PropertyGetterentity - the entity objectindex - optional index, used when the property is a List or Mappublic PropertySetter setter()
PropertyGettersetter in interface PropertyGetterpublic void setObjectFactory(Osgl.Function<Class<?>,Object> factory)
setObjectFactory in interface PropertyHandlerpublic void setStringValueResolver(Osgl.Func2<String,Class<?>,?> stringValueResolver)
setStringValueResolver in interface PropertyHandlerpublic void setNullValuePolicy(PropertyGetter.NullValuePolicy nvp)
Copyright © 2017. All Rights Reserved.