|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MapperFacade
The main runtime interface between a Java application and Orika. This is the
central interface abstracting the service of a Java bean mapping.
The main operation of MapperFacade is map() that
copy from a deeply structured one object to an other.
MapperFacade manages the state of a mapping operation through MappingContext.
The operation of mapping may include :
newObject()convert()map()Entity(entity
) to DTO class:... DTO newDTO = mapperFacade.map(entity, DTO.class); ...
| Method Summary | ||
|---|---|---|
|
convert(S source,
Class<D> destinationClass,
String converterId)
|
|
|
convert(S source,
Type<S> sourceType,
Type<D> destinationType,
String converterId)
Convert the source object into the appropriate destination type |
|
|
map(S sourceObject,
Class<D> destinationClass)
Create and return a new instance of type D mapped with the properties of sourceObject. |
|
|
map(S sourceObject,
Class<D> destinationClass,
MappingContext context)
Create and return a new instance of type D mapped with the properties of sourceObject. |
|
|
map(S sourceObject,
D destinationObject)
Maps the properties of sourceObject onto
destinationObject. |
|
|
map(S sourceObject,
D destinationObject,
MappingContext context)
Maps the properties of sourceObject onto
destinationObject. |
|
|
map(S sourceObject,
D destinationObject,
Type<S> sourceType,
Type<D> destinationType)
Maps the properties of sourceObject onto
destinationObject, using sourceType and
destinationType to specify the parameterized types of the
source and destination object. |
|
|
map(S sourceObject,
D destinationObject,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
Maps the properties of sourceObject onto
destinationObject, using sourceType and
destinationType to specify the parameterized types of the
source and destination object. |
|
|
map(S sourceObject,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
map(S sourceObject,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsArray(D[] destination,
Iterable<S> source,
Class<D> destinationClass)
Maps the source Array into a new Array of type D. |
|
|
mapAsArray(D[] destination,
Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
|
|
|
mapAsArray(D[] destination,
Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
mapAsArray(D[] destination,
Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsArray(D[] destination,
Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
|
|
|
mapAsArray(D[] destination,
Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsArray(D[] destination,
S[] source,
Class<D> destinationClass)
|
|
|
mapAsArray(D[] destination,
S[] source,
Class<D> destinationClass,
MappingContext context)
|
|
|
mapAsArray(D[] destination,
S[] source,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
mapAsArray(D[] destination,
S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass)
Map an iterable onto an existing collection |
|
|
mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass,
MappingContext context)
Map an iterable onto an existing collection |
|
|
mapAsCollection(Iterable<S> source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType)
Map an iterable onto an existing collection |
|
|
mapAsCollection(Iterable<S> source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
Map an iterable onto an existing collection |
|
|
mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationCollection)
Map an array onto an existing collection |
|
|
mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationCollection,
MappingContext context)
Map an array onto an existing collection |
|
|
mapAsCollection(S[] source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType)
Map an array onto an existing collection |
|
|
mapAsCollection(S[] source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
Map an array onto an existing collection |
|
|
mapAsList(Iterable<S> source,
Class<D> destinationClass)
Maps the source Iterable into a new List parameterized by destinationClass. |
|
|
mapAsList(Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
Maps the source Iterable into a new List parameterized by destinationClass. |
|
|
mapAsList(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
mapAsList(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsList(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
|
|
|
mapAsList(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsList(S[] source,
Class<D> destinationClass)
Maps the source Array into a new List parameterized by destinationClass. |
|
|
mapAsList(S[] source,
Class<D> destinationClass,
MappingContext context)
Maps the source Array into a new List parameterized by destinationClass. |
|
|
mapAsList(S[] source,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
mapAsList(S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsMap(Iterable<S> source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
|
|
|
mapAsMap(Iterable<S> source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
|
|
|
mapAsMap(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
Map from one instance of java.util.Map to another. |
|
|
mapAsMap(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
Map from one instance of java.util.Map to another. |
|
|
mapAsMap(S[] source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
|
|
|
mapAsMap(S[] source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
|
|
|
mapAsSet(Iterable<S> source,
Class<D> destinationClass)
Maps the source iterable into a new Set parameterized by destinationClass. |
|
|
mapAsSet(Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
Maps the source iterable into a new Set parameterized by destinationClass. |
|
|
mapAsSet(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
mapAsSet(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsSet(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
|
|
|
mapAsSet(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
mapAsSet(S[] source,
Class<D> destinationClass)
Maps the source Array into a new Set parameterized by destinationClass. |
|
|
mapAsSet(S[] source,
Class<D> destinationClass,
MappingContext context)
Maps the source Array into a new Set parameterized by destinationClass. |
|
|
mapAsSet(S[] source,
Type<S> sourceType,
Type<D> destinationType)
|
|
|
mapAsSet(S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
|
|
|
newObject(S source,
Type<? extends D> destinationClass,
MappingContext context)
Create new instance of a destination class. |
|
|
resolveMappingStrategy(S sourceObject,
Type rawAType,
Type rawBType,
boolean mapInPlace,
MappingContext context)
Resolves a reusable MappingStrategy for the given set of inputs. |
|
| Method Detail |
|---|
<S,D> D map(S sourceObject,
Class<D> destinationClass)
sourceObject.
sourceObject - the object to map fromdestinationClass - the type of the new object to return
sourceObject
<S,D> D map(S sourceObject,
Class<D> destinationClass,
MappingContext context)
sourceObject.
sourceObject - the object to map fromdestinationClass - the type of the new object to returncontext - the context from the current mapping request
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,
MappingContext context)
sourceObject onto
destinationObject.
sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedcontext - the context from the current mapping request
<S,D> void map(S sourceObject,
D destinationObject,
Type<S> sourceType,
Type<D> destinationType)
sourceObject onto
destinationObject, using sourceType and
destinationType to specify the parameterized types of the
source and destination object.
sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedsourceType - the parameterized type of the source objectdestinationType - the parameterized type of the destination object
<S,D> void map(S sourceObject,
D destinationObject,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
sourceObject onto
destinationObject, using sourceType and
destinationType to specify the parameterized types of the
source and destination object.
sourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedsourceType - the parameterized type of the source objectdestinationType - the parameterized type of the destination objectcontext - the context from the current mapping request
<S,D> Set<D> mapAsSet(Iterable<S> source,
Class<D> destinationClass)
destinationClass.
source - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
<S,D> Set<D> mapAsSet(Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
destinationClass.
source - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.context - the context from the current mapping request
destinationClass mapped from the elements of
source.
<S,D> Set<D> mapAsSet(S[] source,
Class<D> destinationClass)
destinationClass.
source - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
<S,D> Set<D> mapAsSet(S[] source,
Class<D> destinationClass,
MappingContext context)
destinationClass.
source - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.context - the context from the current mapping request
destinationClass mapped from the elements of
source.
<S,D> List<D> mapAsList(Iterable<S> source,
Class<D> destinationClass)
destinationClass.
source - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
<S,D> List<D> mapAsList(Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
destinationClass.
source - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.context - the context from the current mapping request
destinationClass mapped from the elements of
source.
<S,D> List<D> mapAsList(S[] source,
Class<D> destinationClass)
destinationClass.
source - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
<S,D> List<D> mapAsList(S[] source,
Class<D> destinationClass,
MappingContext context)
destinationClass.
source - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.context - the context from the current mapping request
destinationClass mapped from the elements of
source.
<S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Class<D> destinationClass)
D.
source - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.context - the context from the current mapping request
destinationClass mapped from the elements of
source.
<S,D> D[] mapAsArray(D[] destination,
S[] source,
Class<D> destinationClass)
<S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
<S,D> D[] mapAsArray(D[] destination,
S[] source,
Class<D> destinationClass,
MappingContext context)
<S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass)
source - the source iterabledestination - the destination collectiondestinationClass - the type of elements in the destination
<S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass,
MappingContext context)
source - the source iterabledestination - the destination collectiondestinationClass - the type of elements in the destinationcontext - the current mapping context
<S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationCollection)
source - the source arraydestination - the destination collectiondestinationClass - the type of elements in the destination
<S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationCollection,
MappingContext context)
source - the source arraydestination - the destination collectiondestinationClass - the type of elements in the destinationcontext - the current mapping context
<S,D> D map(S sourceObject,
Type<S> sourceType,
Type<D> destinationType)
<S,D> D map(S sourceObject,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> Set<D> mapAsSet(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
<S,D> Set<D> mapAsSet(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> Set<D> mapAsSet(S[] source,
Type<S> sourceType,
Type<D> destinationType)
<S,D> Set<D> mapAsSet(S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> List<D> mapAsList(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
<S,D> List<D> mapAsList(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> List<D> mapAsList(S[] source,
Type<S> sourceType,
Type<D> destinationType)
<S,D> List<D> mapAsList(S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
<S,D> D[] mapAsArray(D[] destination,
S[] source,
Type<S> sourceType,
Type<D> destinationType)
<S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> D[] mapAsArray(D[] destination,
S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType)
source - the source iterabledestination - the destination collectionsourceType - the type of elements in the sourcedestinationType - the type of elements in the destination
<S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
source - the source iterabledestination - the destination collectionsourceType - the type of elements in the sourcedestinationType - the type of elements in the destinationcontext - the current mapping context
<S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType)
source - the source arraydestination - the destination collectionsourceType - the type of elements in the sourcedestinationType - the type of elements in the destination
<S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
source - the source arraydestination - the destination collectionsourceType - the type of elements in the sourcedestinationType - the type of elements in the destinationcontext - the current mapping context
<S,D> D convert(S source,
Type<S> sourceType,
Type<D> destinationType,
String converterId)
source - the source object to mapsourceType - the type of the source objectdestinationType - the type of the destination object to produceconverterId - the specific converter to use; if null, the first compatible
global converter is used
<Sk,Sv,Dk,Dv> Map<Dk,Dv> mapAsMap(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
source - the source MapsourceType - the parameterized type of the source Map objectdestinationType - the parameterized type of the destination Map object
<Sk,Sv,Dk,Dv> Map<Dk,Dv> mapAsMap(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
source - sourceType - destinationType - context - context the context from the current mapping request
<S,Dk,Dv> Map<Dk,Dv> mapAsMap(Iterable<S> source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
<S,Dk,Dv> Map<Dk,Dv> mapAsMap(Iterable<S> source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
<S,Dk,Dv> Map<Dk,Dv> mapAsMap(S[] source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
<S,Dk,Dv> Map<Dk,Dv> mapAsMap(S[] source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
<Sk,Sv,D> List<D> mapAsList(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
<Sk,Sv,D> List<D> mapAsList(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
<Sk,Sv,D> Set<D> mapAsSet(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
<Sk,Sv,D> Set<D> mapAsSet(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
<Sk,Sv,D> D[] mapAsArray(D[] destination,
Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
<Sk,Sv,D> D[] mapAsArray(D[] destination,
Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
<S,D> D convert(S source,
Class<D> destinationClass,
String converterId)
<S,D> D newObject(S source,
Type<? extends D> destinationClass,
MappingContext context)
source - destinationClass -
destinationClass
<S,D> MappingStrategy resolveMappingStrategy(S sourceObject,
Type rawAType,
Type rawBType,
boolean mapInPlace,
MappingContext context)
sourceObject - the source object to maprawAType - the source typerawBType - the destination typecontext - the current MappingContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||