public class MyBeanUtils
extends org.apache.commons.beanutils.PropertyUtilsBean
Title:
Description:
| 构造器和说明 |
|---|
MyBeanUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
copyBean2Bean(Object dest,
Object orig)
把orig和dest相同属性的value复制到dest中
|
static void |
copyBean2Map(Map map,
Object bean) |
static void |
copyBeanNotNull2Bean(Object databean,
Object tobean)
对象拷贝
数据对象空值不拷贝到目标对象
|
static void |
copyMap2Bean_Nobig(Object bean,
Map properties)
自动转Map key值大写
将Map内的key与Bean中属性相同的内容复制到BEAN中
|
static void |
copyMap2Bean(Object bean,
Map properties)
将Map内的key与Bean中属性相同的内容复制到BEAN中
|
static void |
copyMap2Bean(Object bean,
Map properties,
String defaultValue)
Map内的key与Bean中属性相同的内容复制到BEAN中
对于存在空值的取默认值
|
addBeanIntrospector, clearDescriptors, copyProperties, describe, getIndexedProperty, getIndexedProperty, getInstance, getMappedProperty, getMappedProperty, getMappedPropertyDescriptors, getMappedPropertyDescriptors, getNestedProperty, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyDescriptors, getPropertyEditorClass, getPropertyOfMapBean, getPropertyType, getReadMethod, getResolver, getSimpleProperty, getWriteMethod, getWriteMethod, isReadable, isWriteable, removeBeanIntrospector, resetBeanIntrospectors, setIndexedProperty, setIndexedProperty, setMappedProperty, setMappedProperty, setNestedProperty, setProperty, setPropertyOfMapBean, setResolver, setSimplePropertypublic static void copyBeanNotNull2Bean(Object databean, Object tobean) throws Exception
dataObject - toObject - NoSuchMethodException - copyExceptionpublic static void copyBean2Bean(Object dest, Object orig) throws Exception
dest - orig - IllegalAccessExceptionInvocationTargetExceptionExceptionpublic static void copyMap2Bean(Object bean, Map properties) throws IllegalAccessException, InvocationTargetException
bean - Objectproperties - MapIllegalAccessExceptionInvocationTargetExceptionpublic static void copyMap2Bean_Nobig(Object bean, Map properties) throws IllegalAccessException, InvocationTargetException
bean - Objectproperties - MapIllegalAccessExceptionInvocationTargetExceptionpublic static void copyMap2Bean(Object bean, Map properties, String defaultValue) throws IllegalAccessException, InvocationTargetException
bean - Objectproperties - MapdefaultValue - StringIllegalAccessExceptionInvocationTargetExceptionCopyright © 2022. All rights reserved.