blob: 1d14f12f28719131d7d339cab0502845f5740f55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package org.onap.nbi.commons;
import org.apache.commons.beanutils.PropertyUtilsBean;
/**
*
*/
public class BeanUtils {
private static final PropertyUtilsBean PUB = new PropertyUtilsBean();
/**
*
* @param bean
* @param name
* @return
*/
public static Object getNestedProperty(Object bean, String name) {
try {
return BeanUtils.PUB.getNestedProperty(bean, name);
} catch (Exception e) {
return null;
}
}
/**
*
* @param bean
* @param name
* @param value
*/
public static void setNestedProperty(Object bean, String name, Object value) {
try {
BeanUtils.PUB.setNestedProperty(bean, name, value);
} catch (Exception ex) {
}
}
}
|