|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.beanutils.BeanUtils
org.omnaest.utils.beans.BeanUtil
BeanUtils instead
@Deprecated public class BeanUtil
Simple utility class, which extends the Apache Common BeanUtils class.
| Nested Class Summary | |
|---|---|
static class |
BeanUtil.BeanProperty
Deprecated. Holds information about a beans property |
static interface |
BeanUtil.CopyableProperty
Deprecated. Marker annotation. |
static class |
BeanUtil.PropertyCriterion
Deprecated. Defines a interface for a criterion to retrieve property names of an object. |
static class |
BeanUtil.PropertyCriterionAnnotationname
Deprecated. Matches the name of an annotation of a property method, or the property with the same name as its property method, using regular expression. |
static class |
BeanUtil.PropertyCriterionConjunction
Deprecated. Base class for other cunjunction criteria. |
static class |
BeanUtil.PropertyCriterionConjunctionAND
Deprecated. Conjunction of sub criteria. |
static class |
BeanUtil.PropertyCriterionConjunctionOR
Deprecated. Conjunction of sub criteria. |
static class |
BeanUtil.PropertyCriterionHasGetterSetter
Deprecated. Test a method if it is a getter or / and a setter of a property. |
static class |
BeanUtil.PropertyCriterionMethodname
Deprecated. Matches the name of a method using regular expression. |
| Constructor Summary | |
|---|---|
BeanUtil()
Deprecated. |
|
| Method Summary | ||
|---|---|---|
static List<Exception> |
copyProperties(Collection<Object> targetBeanCollection,
Collection<Object> sourceBeanCollection)
Deprecated. Copies the properties from a collection of JavaBeans to another collection of JavaBeans. |
|
static List<Exception> |
copyProperties(Collection<Object> targetBeanCollection,
Collection<Object> sourceBeanCollection,
String... propertyNames)
Deprecated. Copies the properties of a collection of JavaBeans to another collection of JavaBeans. |
|
static List<Exception> |
copyProperties(Object targetBean,
Object sourceBean,
String... propertyNames)
Deprecated. Copies the properties of the given list from the source to the target bean using their getter and setter methods. |
|
static void |
copyPropertiesCopyable(Object targetBeanObject,
Object sourceBeanObject)
Deprecated. Copies all properties of a target java bean object, which are marked with the CopyableProperty annotation in the source bean class. |
|
static boolean |
copyPropertiesWherePossible(Object targetBean,
Object sourceBean)
Deprecated. Copies all properties with the same signature. |
|
static BeanUtil.BeanProperty[] |
determineBeanProperties(Class<?> beanClass)
Deprecated. |
|
static String[] |
determineBeanProperties(Class<?> beanClass,
BeanUtil.PropertyCriterion... propertyCriteria)
Deprecated. Determines the property names of a java bean object class. |
|
static BeanUtil.BeanProperty[] |
determineBeanProperties(Object beanObject)
Deprecated. |
|
static String[] |
determineBeanProperties(Object beanObject,
BeanUtil.PropertyCriterion... propertyCriteria)
Deprecated. |
|
static String[] |
determineBeanPropertiesForAnnotations(Class<?> beanClass,
Class<? extends Annotation>... annotationClasses)
Deprecated. Determines the property names of all properties which are declared with the given annotation. |
|
static String[] |
determineBeanPropertiesForAnnotations(Class<?> beanClass,
String... annotationNames)
Deprecated. |
|
static
|
determineBeanPropertyNameToValueMap(Element beanObject,
String... propertyNames)
Deprecated. Returns a map with the values of the given bean object. |
|
protected static String |
determinePropertyNameForMethodname(String methodName)
Deprecated. Determines the property name of a getter, setter or isGetter method name. |
|
static
|
injectPropertyToValueMapIntoBean(Element beanObject,
Map<String,Value> propertyToValueMap)
Deprecated. Injects the values for the given property name keys of the map into the bean. |
|
static
|
injectValueOfPropertyIntoBean(Element beanObject,
String propertyName,
Value value)
Deprecated. The value must not be null, otherwise null is returned. |
|
static
|
injectValueOfPropertyIntoBean(Element beanObject,
String propertyName,
Value value,
Class<? extends Value> valueClass)
Deprecated. Puts the given value into the property of the given bean object. |
|
static
|
invokeJavaBeanPropertyMethod(Object javaBeanObject,
String methodName,
P parameter)
Deprecated. Executes the method of the given javaBean object that has the given name. |
|
| Methods inherited from class org.apache.commons.beanutils.BeanUtils |
|---|
cloneBean, copyProperties, copyProperty, createCache, describe, getArrayProperty, getCacheFast, getDebug, getIndexedProperty, getIndexedProperty, getMappedProperty, getMappedProperty, getNestedProperty, getProperty, getSimpleProperty, initCause, populate, setCacheFast, setDebug, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanUtil()
| Method Detail |
|---|
public static <Value,Element> Map<String,Value> determineBeanPropertyNameToValueMap(Element beanObject,
String... propertyNames)
beanObject - propertyNames -
public static <Value,Element> Element injectValueOfPropertyIntoBean(Element beanObject,
String propertyName,
Value value)
injectValueOfPropertyIntoBean(Object, String, Object, Class)
public static <Value,Element> Element injectPropertyToValueMapIntoBean(Element beanObject,
Map<String,Value> propertyToValueMap)
beanObject - propertyToValueMap -
public static <Value,Element> Element injectValueOfPropertyIntoBean(Element beanObject,
String propertyName,
Value value,
Class<? extends Value> valueClass)
beanObject - propertyName - value - : != null
public static List<Exception> copyProperties(Object targetBean,
Object sourceBean,
String... propertyNames)
targetBean - sourceBean - propertyNames -
public static boolean copyPropertiesWherePossible(Object targetBean,
Object sourceBean)
targetBean - sourceBean -
BeanUtils.copyProperties(Object, Object)
public static List<Exception> copyProperties(Collection<Object> targetBeanCollection,
Collection<Object> sourceBeanCollection,
String... propertyNames)
targetBeanCollection - sourceBeanCollection - propertyNames - indicates all names of properties, which are to be copied (other properties will be ignored)
public static List<Exception> copyProperties(Collection<Object> targetBeanCollection,
Collection<Object> sourceBeanCollection)
targetBeanCollection - sourceBeanCollection -
public static String[] determineBeanPropertiesForAnnotations(Class<?> beanClass,
Class<? extends Annotation>... annotationClasses)
beanClass - annotationClass -
determineBeanPropertiesForAnnotations(Class, String...)
public static String[] determineBeanPropertiesForAnnotations(Class<?> beanClass,
String... annotationNames)
beanClass - annotationName -
#determineBeanPropertiesForAnnotations(Class, Class)
public static String[] determineBeanProperties(Object beanObject,
BeanUtil.PropertyCriterion... propertyCriteria)
beanObject - propertyCriteria -
determineBeanProperties(Class, PropertyCriterion...)
public static String[] determineBeanProperties(Class<?> beanClass,
BeanUtil.PropertyCriterion... propertyCriteria)
BeanUtil.PropertyCriterionprotected static String determinePropertyNameForMethodname(String methodName)
methodName -
public static BeanUtil.BeanProperty[] determineBeanProperties(Object beanObject)
public static BeanUtil.BeanProperty[] determineBeanProperties(Class<?> beanClass)
public static <P> P invokeJavaBeanPropertyMethod(Object javaBeanObject,
String methodName,
P parameter)
P - javaBeanObject - methodName - parameter - null: no parameter is assumed for the method, not null: parameter like for setter method
public static void copyPropertiesCopyable(Object targetBeanObject,
Object sourceBeanObject)
targetBeanObject - sourceBeanObject - BeanUtil.CopyableProperty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||