public class DozerBeanMapper extends Object implements Mapper, MapperModelContext
It is technically possible to have multiple DozerBeanMapper instances initialized, but it will hinder internal performance optimizations such as caching.
| Modifier and Type | Method and Description |
|---|---|
List<CustomConverter> |
getCustomConverters()
Returns a list of registered
CustomConverter |
Map<String,CustomConverter> |
getCustomConvertersWithId()
Returns a list of registered
CustomConverter which can be referenced in mapping by provided ID. |
CustomFieldMapper |
getCustomFieldMapper()
Returns a list of registered
CustomFieldMapper |
List<? extends EventListener> |
getEventListeners()
Returns a list of registered
EventListener |
MapperModelContext |
getMapperModelContext()
Returns
MapperModelContext which allows readonly access to the Mapper model |
List<String> |
getMappingFiles()
Returns list of provided mapping file URLs
|
MappingMetadata |
getMappingMetadata()
The
MappingMetadata interface can be used to query information about the current
mapping definitions. |
protected Mapper |
getMappingProcessor() |
<T> T |
map(Object source,
Class<T> destinationClass)
Constructs new instance of destinationClass and performs mapping between from source
|
<T> T |
map(Object source,
Class<T> destinationClass,
String mapId)
Constructs new instance of destinationClass and performs mapping between from source
|
void |
map(Object source,
Object destination)
Performs mapping between source and destination objects
|
void |
map(Object source,
Object destination,
String mapId)
Performs mapping between source and destination objects
|
public void map(Object source, Object destination, String mapId) throws MappingException
map in interface Mappersource - object to convert fromdestination - object to convert tomapId - id in configuration for mappingMappingException - mapping failurepublic <T> T map(Object source, Class<T> destinationClass, String mapId) throws MappingException
map in interface MapperT - type to convert tosource - object to convert fromdestinationClass - type to convert tomapId - id in configuration for mappingMappingException - mapping failurepublic <T> T map(Object source, Class<T> destinationClass) throws MappingException
map in interface MapperT - type to convert tosource - object to convert fromdestinationClass - type to convert toMappingException - mapping failurepublic void map(Object source, Object destination) throws MappingException
map in interface Mappersource - object to convert fromdestination - object to convert toMappingException - mapping failureprotected Mapper getMappingProcessor()
public MappingMetadata getMappingMetadata()
MappingMetadata interface can be used to query information about the current
mapping definitions. It provides read only access to all important classes and field
mapping properties. When first called, initializes all mappings if map() has not yet been called.getMappingMetadata in interface MapperMappingMetadata which serves starting point
for querying mapping information.public MapperModelContext getMapperModelContext()
MapperModelContext which allows readonly access to the Mapper modelgetMapperModelContext in interface MapperMapperModelContextpublic List<String> getMappingFiles()
getMappingFiles in interface MapperModelContextpublic List<CustomConverter> getCustomConverters()
CustomConvertergetCustomConverters in interface MapperModelContextpublic Map<String,CustomConverter> getCustomConvertersWithId()
CustomConverter which can be referenced in mapping by provided ID.getCustomConvertersWithId in interface MapperModelContextpublic List<? extends EventListener> getEventListeners()
EventListenergetEventListeners in interface MapperModelContextpublic CustomFieldMapper getCustomFieldMapper()
CustomFieldMappergetCustomFieldMapper in interface MapperModelContextCopyright © 2005–2021 dozer. All rights reserved.