public interface DataMapper
ma.glasnost.orika.MapperFacade and adds property filtering.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELD_PREFIX
Field prefix added to destination object field name
|
static java.lang.String |
FIELD_SET_NAME
Field set name used in mapping context
|
static java.lang.String |
MAP_NULLS
Flag used in mapping context.
|
| Modifier and Type | Method and Description |
|---|---|
<S,D> D |
map(S sourceObject,
java.lang.Class<D> destinationClass)
Create and return a new instance of type D mapped with the properties of
sourceObject. |
<S,D> D |
map(S sourceObject,
java.lang.Class<D> destinationClass,
java.util.Set<java.lang.String> fields)
Create and return a new instance of type D mapped with the specified
fields of
sourceObject. |
<S,D> D |
map(S sourceObject,
java.lang.Class<D> destinationClass,
java.lang.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,
java.lang.String fields)
Maps the properties of
sourceObject onto destinationObject. |
<S,D> void |
map(S sourceObject,
D destinationObject,
java.lang.String fields,
boolean mapNulls)
Maps the properties of
sourceObject onto destinationObject. |
<S,D> void |
mapAsCollection(java.lang.Iterable<S> source,
java.util.Collection<D> destination,
java.lang.Class<D> destinationClass,
java.lang.String fields)
Map an iterable onto an existing collection
|
<S,D> java.util.List<D> |
mapAsList(java.lang.Iterable<S> source,
java.lang.Class<D> destinationClass,
java.lang.String fields)
Maps the source Iterable into a new List parameterized by
destinationClass. |
<S,D> java.util.Set<D> |
mapAsSet(java.lang.Iterable<S> source,
java.lang.Class<D> destinationClass,
java.lang.String fields)
Maps the source iterable into a new Set parameterized by
destinationClass. |
<S,D> void |
mapGeneric(S sourceObject,
D destObject,
java.lang.reflect.Type[] sourceActualTypeArguments,
java.lang.reflect.Type[] destActualTypeArguments,
java.lang.String fields,
java.util.Map<java.lang.String,java.lang.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 java.lang.String FIELD_SET_NAME
static final java.lang.String MAP_NULLS
static final java.lang.String FIELD_PREFIX
<S,D> D map(S sourceObject,
java.lang.Class<D> destinationClass)
sourceObject.sourceObject - the object to map fromdestinationClass - the type of the new object to returnsourceObject<S,D> D map(S sourceObject,
java.lang.Class<D> destinationClass,
java.lang.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,
java.lang.Class<D> destinationClass,
java.util.Set<java.lang.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,
java.lang.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,
java.lang.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> java.util.Set<D> mapAsSet(java.lang.Iterable<S> source,
java.lang.Class<D> destinationClass,
java.lang.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> java.util.List<D> mapAsList(java.lang.Iterable<S> source,
java.lang.Class<D> destinationClass,
java.lang.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(java.lang.Iterable<S> source,
java.util.Collection<D> destination,
java.lang.Class<D> destinationClass,
java.lang.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,
java.lang.reflect.Type[] sourceActualTypeArguments,
java.lang.reflect.Type[] destActualTypeArguments,
java.lang.String fields,
java.util.Map<java.lang.String,java.lang.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 © 2018 SAP SE. All Rights Reserved.