| java.lang.Object com.uwyn.rife.tools.BeanUtils
BeanUtils | abstract public class BeanUtils (Code) | | |
Inner Class :static class Accessors extends EnumClass | |
Method Summary | |
public static int | countProperties(Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix) | public static int | countProperties(Accessors accessors, Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix) | public static String | formatPropertyValue(Object propertyValue, ConstrainedProperty constrainedProperty) | public static BeanInfo | getBeanInfo(Class beanClass) | public static DateFormat | getConcisePreciseDateFormat() | public static Set<String> | getPropertyNames(Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix) | public static Set<String> | getPropertyNames(Accessors accessors, Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix) | public static Class | getPropertyType(Class beanClass, String name) | public static Map<String, Class> | getPropertyTypes(Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix) | public static Map<String, Class> | getPropertyTypes(Accessors accessors, Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix) | public static Object | getPropertyValue(Object bean, String name) | public static Map<String, Object> | getPropertyValues(Object bean, String[] includedProperties, String[] excludedProperties, String prefix) | public static Map<String, Object> | getPropertyValues(Accessors accessors, Object bean, String[] includedProperties, String[] excludedProperties, String prefix) | public static HashMap<String, PropertyDescriptor> | getUppercasedBeanProperties(Class beanClass) Retrieves a map of all the properties of a bean and their descriptors. | public Object | parseDate(String date, Format format) Parses the textual representation of the date using a custom format, or by
relying on the standard date formats. | public static void | processProperties(Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix, BeanPropertyProcessor processor) | public static void | processProperties(Accessors accessors, Class beanClass, String[] includedProperties, String[] excludedProperties, String prefix, BeanPropertyProcessor processor) | public static void | processPropertyValues(Object bean, String[] includedProperties, String[] excludedProperties, String prefix, BeanPropertyValueProcessor processor) | public static void | processPropertyValues(Accessors accessors, Object bean, String[] includedProperties, String[] excludedProperties, String prefix, BeanPropertyValueProcessor processor) | public static void | setPropertyValue(Object bean, String name, Object value) | public static void | setUppercasedBeanProperty(String propertyName, String[] propertyValues, String propertyNamePrefix, Map<String, PropertyDescriptor> beanProperties, Object beanInstance, Object emptyBean) Set the value of a bean property from an array of strings. | public static void | setUppercasedBeanProperty(String propertyName, UploadedFile propertyFile, String propertyNamePrefix, Map<String, PropertyDescriptor> beanProperties, Object beanInstance) Set the value of a bean property from an uploaded file. |
GETTERS | final public static Accessors GETTERS(Code) | | |
GETTERS_SETTERS | final public static Accessors GETTERS_SETTERS(Code) | | |
SETTERS | final public static Accessors SETTERS(Code) | | |
getConcisePreciseDateFormat | public static DateFormat getConcisePreciseDateFormat()(Code) | | |
getUppercasedBeanProperties | public static HashMap<String, PropertyDescriptor> getUppercasedBeanProperties(Class beanClass) throws BeanUtilsException(Code) | | Retrieves a map of all the properties of a bean and their descriptors.
The property names will be uppercased and an exception will be thrown
if two properties are equals case-insensitively.
Parameters: beanClass - the class of the bean exception: com.uwyn.rife.tools.exceptions.BeanUtilsException - when an erroroccurred while obtaining the bean properties the map of the bean properties See Also: BeanUtils.setUppercasedBeanProperty(String,String[],String,Map,Object,Object) See Also: BeanUtils.setUppercasedBeanProperty(String,UploadedFile,String,Map,Object) since: 1.4 |
parseDate | public Object parseDate(String date, Format format) throws ParseException(Code) | | Parses the textual representation of the date using a custom format, or by
relying on the standard date formats.
Parameters: date - the textual representation of the date Parameters: format - the custom format that should be used for parsing the stringrepresentation of the date; or null if the default formats shouldbe used the parsed date throws: ParseException - if an error occurred when the date was parsed since: 1.6 |
setUppercasedBeanProperty | public static void setUppercasedBeanProperty(String propertyName, String[] propertyValues, String propertyNamePrefix, Map<String, PropertyDescriptor> beanProperties, Object beanInstance, Object emptyBean) throws BeanUtilsException(Code) | | Set the value of a bean property from an array of strings.
Parameters: propertyName - the name of the property Parameters: propertyValues - the values that will be set, can be null Parameters: propertyNamePrefix - the prefix that the propertyName parametershould have, can be null Parameters: beanProperties - the map of the uppercased bean property names andtheir descriptors Parameters: beanInstance - the bean instance whose property should be updated Parameters: emptyBean - this bean instance will be used to set the value of theproperty in case the propertyValues parameter is empty or null, can benull exception: com.uwyn.rife.tools.exceptions.BeanUtilsException - when an erroroccurred while setting the bean property See Also: BeanUtils.getUppercasedBeanProperties(Class) See Also: BeanUtils.setUppercasedBeanProperty(String,UploadedFile,String,Map,Object) since: 1.4 |
setUppercasedBeanProperty | public static void setUppercasedBeanProperty(String propertyName, UploadedFile propertyFile, String propertyNamePrefix, Map<String, PropertyDescriptor> beanProperties, Object beanInstance) throws BeanUtilsException(Code) | | Set the value of a bean property from an uploaded file.
Parameters: propertyName - the name of the property Parameters: propertyFile - the file that will be set, can be null Parameters: propertyNamePrefix - the prefix that the propertyName parametershould have, can be null Parameters: beanProperties - the map of the uppercased bean property names andtheir descriptors Parameters: beanInstance - the bean instance whose property should be updated exception: com.uwyn.rife.tools.exceptions.BeanUtilsException - when an erroroccurred while setting the bean property See Also: BeanUtils.getUppercasedBeanProperties(Class) See Also: BeanUtils.setUppercasedBeanProperty(String,String[],String,Map,Object,Object) since: 1.4 |
|
|