com.agapple.mapping
类 BeanMapping
java.lang.Object
com.agapple.mapping.BeanMapping
public class BeanMapping
- extends Object
Bean Mapping操作的处理单元
使用例子:
BeanMapping beanMapping = BeanMapping.create(srcClass,targetClass);
beanMapping.mapping(src,target);// 将src的属性mapping到target
注意:srcClass/targetClass的映射关系必须实现通过BeanMappingConfigHelper的registerConfig方法注册mapping配置
- 作者:
- jianghang 2011-6-8 上午11:10:24
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanMapping
public BeanMapping(BeanMappingBuilder builder)
create
public static BeanMapping create(Class srcClass,
Class targetClass)
- 创建srcClass和targetClass之间的BeanMapping操作
mapping
public void mapping(Object src,
Object target)
throws BeanMappingException
- 根据定义的bean-mapping配置进行对象属性的mapping拷贝 , 允许自定义ValueProcess SetValueProcess
- 参数:
src - target -
- 抛出:
BeanMappingException
Copyright © 2011. All Rights Reserved.