T1 - bean 1 typeT2 - bean 2 typepublic class BeanConverter<T1,T2>
extends java.lang.Object
Given any two beans and a map that establishes which properties in bean 1 correspond to properties in bean 2, this class can be used to automatically obtain bean 1 from an instance of bean 2 and vice-versa.
| Constructor and Description |
|---|
BeanConverter(java.lang.Class<T1> clazz1,
java.lang.Class<T2> clazz2,
java.util.Map<java.lang.String,java.lang.String> propertyBindingMap) |
| Modifier and Type | Method and Description |
|---|---|
T1 |
getBean1(T2 bean2)
Get bean 1 from an instance of bean 2
|
T2 |
getBean2(T1 bean1)
Get bean 2 from an instance of bean 1
|
public BeanConverter(java.lang.Class<T1> clazz1, java.lang.Class<T2> clazz2, java.util.Map<java.lang.String,java.lang.String> propertyBindingMap)
clazz1 - bean 1 classclazz2 - bean 2 classpropertyBindingMap - map that establishes which properties in bean 1 correspond to properties in bean 2Copyright © 2011-2014 Carlos Martins. All Rights Reserved.