org.riotfamily.common.beans
Class MapWrapper
java.lang.Object
org.springframework.beans.PropertyEditorRegistrySupport
org.springframework.beans.AbstractPropertyAccessor
org.riotfamily.common.beans.MapWrapper
- All Implemented Interfaces:
- ObjectWrapper, ConfigurablePropertyAccessor, PropertyAccessor, PropertyEditorRegistry, TypeConverter
public class MapWrapper
- extends AbstractPropertyAccessor
- implements ObjectWrapper
PropertyAccessor implementation that works on maps.
Methods inherited from class org.springframework.beans.PropertyEditorRegistrySupport |
copyCustomEditorsTo, copyDefaultEditorsTo, findCustomEditor, getDefaultEditor, guessPropertyTypeFromEditors, hasCustomEditorForElement, isSharedEditor, registerCustomEditor, registerCustomEditor, registerDefaultEditors, registerSharedEditor, useConfigValueEditors |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapWrapper
public MapWrapper(Map<?,?> map)
MapWrapper
public MapWrapper(Class<?> mapClass)
setMapClass
public void setMapClass(Class<?> mapClass)
setValueClass
public void setValueClass(Class<?> valueClass)
isReadableProperty
public boolean isReadableProperty(String propertyName)
- Specified by:
isReadableProperty
in interface PropertyAccessor
isWritableProperty
public boolean isWritableProperty(String propertyName)
- Specified by:
isWritableProperty
in interface PropertyAccessor
getPropertyType
public Class<?> getPropertyType(String propertyName)
- Specified by:
getPropertyType
in interface PropertyAccessor
- Overrides:
getPropertyType
in class AbstractPropertyAccessor
setObject
public void setObject(Object object)
- Specified by:
setObject
in interface ObjectWrapper
getObject
public Object getObject()
- Specified by:
getObject
in interface ObjectWrapper
getObjectClass
public Class<?> getObjectClass()
- Specified by:
getObjectClass
in interface ObjectWrapper
getMap
protected Map getMap()
getPropertyValue
public Object getPropertyValue(String propertyName)
- Specified by:
getPropertyValue
in interface PropertyAccessor
- Specified by:
getPropertyValue
in class AbstractPropertyAccessor
setPropertyValue
public void setPropertyValue(String propertyName,
Object value)
- Specified by:
setPropertyValue
in interface PropertyAccessor
- Specified by:
setPropertyValue
in class AbstractPropertyAccessor
setPropertyValue
public void setPropertyValue(PropertyValue pv)
- Specified by:
setPropertyValue
in interface PropertyAccessor
- Overrides:
setPropertyValue
in class AbstractPropertyAccessor
setPropertyValues
public void setPropertyValues(PropertyValues pvs,
boolean ignoreUnknown,
boolean ignoreInvalid)
throws BeansException
- Specified by:
setPropertyValues
in interface PropertyAccessor
- Overrides:
setPropertyValues
in class AbstractPropertyAccessor
- Throws:
BeansException
setPropertyValues
public void setPropertyValues(PropertyValues pvs)
- Specified by:
setPropertyValues
in interface PropertyAccessor
- Overrides:
setPropertyValues
in class AbstractPropertyAccessor
setPropertyValues
public void setPropertyValues(PropertyValues pvs,
boolean ignoreUnknown)
- Specified by:
setPropertyValues
in interface PropertyAccessor
- Overrides:
setPropertyValues
in class AbstractPropertyAccessor
convertIfNecessary
public Object convertIfNecessary(Object value,
Class requiredType,
MethodParameter methodParam)
throws TypeMismatchException
- Specified by:
convertIfNecessary
in interface TypeConverter
- Throws:
TypeMismatchException