public class BeanUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT
The date format recognized for parsing/formattig dates.
|
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
getProperties(Object bean)
Gets the properties from a Java Bean and returns them in a Map of String
name/value pairs.
|
static PropertyDescriptor[] |
getPropertyDescriptors(Class beanClass)
Returns the PropertyDescriptor array for the specified Java Bean Class.
|
static void |
setProperties(Object bean,
javax.servlet.http.HttpServletRequest request)
Sets the properties of a Java Bean based on the request's properties.
|
static void |
setProperties(Object bean,
Map<String,String> properties)
Sets the properties of a Java Bean based on the String name/value pairs in
the specifieed Map.
|
public static final String DATE_FORMAT
public static void setProperties(Object bean, Map<String,String> properties)
If key/value pairs exist in the Map that don't correspond to properties of the bean, they will be ignored.
bean
- the JavaBean to set properties on.properties
- String name/value pairs of the properties to set.public static void setProperties(Object bean, javax.servlet.http.HttpServletRequest request)
If key/value pairs exist in the Map that don't correspond to properties of the bean, they will be ignored.
bean
- the JavaBean to set properties on.request
- the HTTP request.public static Map<String,String> getProperties(Object bean)
bean
- a Java Bean to get properties from.public static PropertyDescriptor[] getPropertyDescriptors(Class beanClass) throws IntrospectionException
beanClass
- the Class of the JavaBean.IntrospectionException
Copyright © 2003–2019 Ignite Realtime. All rights reserved.