public interface DataMapper
ma.glasnost.orika.MapperFacade and adds property filtering.| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_PREFIX
Field prefix added to destination object field name
|
static String |
FIELD_SET_NAME
Field set name used in mapping context
|
static String |
MAP_NULLS
Flag used in mapping context.
|
| Modifier and Type | Method and Description |
|---|---|
<S,D> D |
map(S sourceObject,
Class<D> destinationClass)
Create and return a new instance of type D mapped with the properties of
sourceObject. |
<S,D> D |
map(S sourceObject,
Class<D> destinationClass,
Set<String> fields)
Create and return a new instance of type D mapped with the specified
fields of
sourceObject. |
<S,D> D |
map(S sourceObject,
Class<D> destinationClass,
String fields)
Create and return a new instance of type D mapped with the specified
fields of
sourceObject. |
<S,D> void |
map(S sourceObject,
D destinationObject)
Maps the properties of
sourceObject onto destinationObject. |
<S,D> void |
map(S sourceObject,
D destinationObject,
boolean mapNulls)
Maps the properties of
sourceObject onto destinationObject. |
<S,D> void |
map(S sourceObject,
D destinationObject,
String fields)
Maps the properties of
sourceObject onto destinationObject. |
<S,D> void |
map(S sourceObject,
D destinationObject,
String fields,
boolean mapNulls)
Maps the properties of
sourceObject onto destinationObject. |
<S,D> void |
mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass,
String fields)
Map an iterable onto an existing collection
|
<S,D> List<D> |
mapAsList(Iterable<S> source,
Class<D> destinationClass,
String fields)
Maps the source Iterable into a new List parameterized by
destinationClass. |
<S,D> Set<D> |
mapAsSet(Iterable<S> source,
Class<D> destinationClass,
String fields)
Maps the source iterable into a new Set parameterized by
destinationClass. |
<S,D> void |
mapGeneric(S sourceObject,
D destObject,
Type[] sourceActualTypeArguments,
Type[] destActualTypeArguments,
String fields,
Map<String,Class> destTypeVariableMap)
Maps the properties of
sourceObject onto destinationObject, using
sourceActualTypeArguments and destActualTypeArguments to specify the arguments of
parameterized types of the source and destination object. |
static final String FIELD_SET_NAME
static final String MAP_NULLS
static final String FIELD_PREFIX
<S,D> D map(S sourceObject,
Class<D> destinationClass)
sourceObject.sourceObject - the object to map fromdestinationClass - the type of the new object to returnsourceObject<S,D> D map(S sourceObject,
Class<D> destinationClass,
String fields)
fields of
sourceObject.sourceObject - the object to map fromdestinationClass - the type of the new object to returnfields - comma-separated fields to mapfields of sourceObject<S,D> D map(S sourceObject,
Class<D> destinationClass,
Set<String> fields)
fields of
sourceObject.sourceObject - the object to map fromdestinationClass - the type of the new object to returnfields - set of fully qualified field names to mapfields of sourceObject<S,D> void map(S sourceObject,
D destinationObject)
sourceObject onto destinationObject.sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mapped<S,D> void map(S sourceObject,
D destinationObject,
boolean mapNulls)
sourceObject onto destinationObject.sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedmapNulls - controls whether nulls are mapped or ignored<S,D> void map(S sourceObject,
D destinationObject,
String fields)
sourceObject onto destinationObject.sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedfields - comma-separated fields to map<S,D> void map(S sourceObject,
D destinationObject,
String fields,
boolean mapNulls)
sourceObject onto destinationObject.sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedfields - comma-separated fields to mapmapNulls - controls whether nulls are mapped or ignored<S,D> Set<D> mapAsSet(Iterable<S> source, Class<D> destinationClass, String fields)
destinationClass.source - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.fields - comma-separated fields to mapdestinationClass mapped from the elements of
source.<S,D> List<D> mapAsList(Iterable<S> source, Class<D> destinationClass, String fields)
destinationClass.source - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.fields - comma-separated fields to mapdestinationClass mapped from the elements of
source.<S,D> void mapAsCollection(Iterable<S> source, Collection<D> destination, Class<D> destinationClass, String fields)
source - the source iterabledestination - the destination collectiondestinationClass - the type of elements in the destinationfields - comma-separated fields to map<S,D> void mapGeneric(S sourceObject,
D destObject,
Type[] sourceActualTypeArguments,
Type[] destActualTypeArguments,
String fields,
Map<String,Class> destTypeVariableMap)
sourceObject onto destinationObject, using
sourceActualTypeArguments and destActualTypeArguments to specify the arguments of
parameterized types of the source and destination object.sourceObject - the object from which to read the propertiesdestObject - the object onto which the properties should be mappedsourceActualTypeArguments - arguments of source typedestActualTypeArguments - arguments of dest typefields - comma-separated fields to mapdestTypeVariableMap - - map containing information about types used in generic class Copyright © 2017 SAP SE. All Rights Reserved.