|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jbeanmapper.BeanMapper
Maps a JavaBean to another JavaBean. Mapping is not thread safe unless an "unmodifiable" view of the mapper is used
(see BeanMappers.unmodifiableBeanMapper).
| Constructor Summary | |
BeanMapper()
|
|
| Method Summary | |
void |
addBeanMapping(BeanMapping mapping)
Add a new BeanMapping rule. |
java.util.Map |
getBeanMappings()
Get all the registered bean mappings. |
Configurator |
getConfigurator()
Get the configurator for this mapper. |
java.lang.Object |
map(java.lang.Object sourceBean)
Map the sourceBean to a destination bean. |
java.lang.Object |
map(java.lang.Object sourceBean,
java.lang.Class targetClass)
Register that the sourceBean class should be mapped to targetClass, then map the source bean. |
void |
registerBeanMapping(java.lang.Class srcClass,
java.lang.Class targetClass)
Register that srcClass should be mapped to targetClass. |
void |
registerBeanMappings(org.xml.sax.InputSource inputSource)
Register the bean mappings specified in the mapping domcument in the InputSource. |
void |
setConfigurator(Configurator configurator)
Set the configurator for this mapper. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BeanMapper()
| Method Detail |
public void registerBeanMapping(java.lang.Class srcClass,
java.lang.Class targetClass)
throws BeanMappingException
srcClass - the class to be mapped.targetClass - the class to be mapped to.
BeanMappingException - if registration of the mapping fails.
public void registerBeanMappings(org.xml.sax.InputSource inputSource)
throws BeanMappingException
inputSource - the source of the mapping document. Not null.
BeanMappingException - if registration fails.
public java.lang.Object map(java.lang.Object sourceBean)
throws BeanMappingException
sourceBean - the bean to be mapped.
BeanMappingException - if mapping fails.
public java.lang.Object map(java.lang.Object sourceBean,
java.lang.Class targetClass)
throws BeanMappingException
sourceBean - bean to be mapped.targetClass - bean to be mapped to.
BeanMappingException - if the mapping fails.public java.util.Map getBeanMappings()
public void addBeanMapping(BeanMapping mapping)
mapping - the BeanMapping to be added.public Configurator getConfigurator()
public void setConfigurator(Configurator configurator)
configurator - The configurator for this mapper.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||