|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectma.glasnost.orika.impl.MapperFacadeImpl
public class MapperFacadeImpl
MapperFacadeImpl is the base implementation of MapperFacade
| Constructor Summary | |
|---|---|
MapperFacadeImpl(MapperFactory mapperFactory,
MappingContextFactory contextFactory,
UnenhanceStrategy unenhanceStrategy)
Constructs a new MapperFacadeImpl |
|
| 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 |
|
protected Class<?> |
getClass(Object object)
Get the class for the specified object, accounting for unwrapping |
|
|
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> destinationClass)
|
|
|
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> destinationClass)
Map an array onto an existing collection |
|
|
mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationClass,
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 sourceObject,
Type<? extends D> destinationType,
MappingContext context)
Create new instance of a destination class. |
|
|
resolveMappingStrategy(S sourceObject,
Type initialSourceType,
Type initialDestinationType,
boolean mapInPlace,
MappingContext context)
Resolves a reusable MappingStrategy for the given set of inputs. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapperFacadeImpl(MapperFactory mapperFactory,
MappingContextFactory contextFactory,
UnenhanceStrategy unenhanceStrategy)
mapperFactory - contextFactory - unenhanceStrategy - | Method Detail |
|---|
public <S,D> D map(S sourceObject,
Type<S> sourceType,
Type<D> destinationClass)
map in interface MapperFacadeprotected Class<?> getClass(Object object)
object -
public <S,D> MappingStrategy resolveMappingStrategy(S sourceObject,
Type initialSourceType,
Type initialDestinationType,
boolean mapInPlace,
MappingContext context)
resolveMappingStrategy in interface MapperFacadesourceObject - rawAType - rawBType - context -
public <S,D> D map(S sourceObject,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
map in interface MapperFacade
public <S,D> void map(S sourceObject,
D destinationObject,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
MapperFacadesourceObject onto
destinationObject, using sourceType and
destinationType to specify the parameterized types of the
source and destination object.
map in interface MapperFacadesourceObject - 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
public <S,D> void map(S sourceObject,
D destinationObject,
Type<S> sourceType,
Type<D> destinationType)
MapperFacadesourceObject onto
destinationObject, using sourceType and
destinationType to specify the parameterized types of the
source and destination object.
map in interface MapperFacadesourceObject - 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
public <S,D> void map(S sourceObject,
D destinationObject,
MappingContext context)
MapperFacadesourceObject onto
destinationObject.
map in interface MapperFacadesourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mappedcontext - the context from the current mapping request
public <S,D> void map(S sourceObject,
D destinationObject)
MapperFacadesourceObject onto
destinationObject.
map in interface MapperFacadesourceObject - the object from which to read the propertiesdestinationObject - the object onto which the properties should be mapped
public final <S,D> Set<D> mapAsSet(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
mapAsSet in interface MapperFacade
public final <S,D> Set<D> mapAsSet(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsSet in interface MapperFacade
public final <S,D> List<D> mapAsList(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
mapAsList in interface MapperFacade
public final <S,D> List<D> mapAsList(Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsList in interface MapperFacade
public <S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType)
mapAsArray in interface MapperFacade
public <S,D> D[] mapAsArray(D[] destination,
S[] source,
Type<S> sourceType,
Type<D> destinationType)
mapAsArray in interface MapperFacade
public <S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsArray in interface MapperFacade
public <S,D> D[] mapAsArray(D[] destination,
S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsArray in interface MapperFacade
public <S,D> List<D> mapAsList(S[] source,
Type<S> sourceType,
Type<D> destinationType)
mapAsList in interface MapperFacade
public <S,D> List<D> mapAsList(S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsList in interface MapperFacade
public <S,D> Set<D> mapAsSet(S[] source,
Type<S> sourceType,
Type<D> destinationType)
mapAsSet in interface MapperFacade
public <S,D> Set<D> mapAsSet(S[] source,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsSet in interface MapperFacade
public <S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsCollection in interface MapperFacadesource - the source iterabledestination - the destination into which the results will be mappedsourceType - the type ofdestinationType - context -
public <S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsCollection in interface MapperFacadesource - destination - sourceType - destinationType - context -
public <S,D> D newObject(S sourceObject,
Type<? extends D> destinationType,
MappingContext context)
MapperFacade
newObject in interface MapperFacadedestinationClass
public <S,D> D convert(S source,
Type<S> sourceType,
Type<D> destinationType,
String converterId)
MapperFacade
convert in interface MapperFacadesource - 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
public <S,D> D map(S sourceObject,
Class<D> destinationClass)
MapperFacadesourceObject.
map in interface MapperFacadesourceObject - the object to map fromdestinationClass - the type of the new object to return
sourceObject
public <S,D> D map(S sourceObject,
Class<D> destinationClass,
MappingContext context)
MapperFacadesourceObject.
map in interface MapperFacadesourceObject - the object to map fromdestinationClass - the type of the new object to returncontext - the context from the current mapping request
sourceObject
public <S,D> Set<D> mapAsSet(Iterable<S> source,
Class<D> destinationClass)
MapperFacadedestinationClass.
mapAsSet in interface MapperFacadesource - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
public <S,D> Set<D> mapAsSet(Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
MapperFacadedestinationClass.
mapAsSet in interface MapperFacadesource - 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.
public <S,D> Set<D> mapAsSet(S[] source,
Class<D> destinationClass)
MapperFacadedestinationClass.
mapAsSet in interface MapperFacadesource - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
public <S,D> Set<D> mapAsSet(S[] source,
Class<D> destinationClass,
MappingContext context)
MapperFacadedestinationClass.
mapAsSet in interface MapperFacadesource - 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.
public <S,D> List<D> mapAsList(Iterable<S> source,
Class<D> destinationClass)
MapperFacadedestinationClass.
mapAsList in interface MapperFacadesource - the Iterable from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
public <S,D> List<D> mapAsList(Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
MapperFacadedestinationClass.
mapAsList in interface MapperFacadesource - 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.
public <S,D> List<D> mapAsList(S[] source,
Class<D> destinationClass)
MapperFacadedestinationClass.
mapAsList in interface MapperFacadesource - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
public <S,D> List<D> mapAsList(S[] source,
Class<D> destinationClass,
MappingContext context)
MapperFacadedestinationClass.
mapAsList in interface MapperFacadesource - 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.
public <S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Class<D> destinationClass)
MapperFacadeD.
mapAsArray in interface MapperFacadesource - the Array from which to mapdestinationClass - the type of elements to be contained in the returned Set.
destinationClass mapped from the elements of
source.
public <S,D> D[] mapAsArray(D[] destination,
S[] source,
Class<D> destinationClass)
mapAsArray in interface MapperFacade
public <S,D> D[] mapAsArray(D[] destination,
Iterable<S> source,
Class<D> destinationClass,
MappingContext context)
mapAsArray in interface MapperFacade
public <S,D> D[] mapAsArray(D[] destination,
S[] source,
Class<D> destinationClass,
MappingContext context)
mapAsArray in interface MapperFacade
public <S,D> D convert(S source,
Class<D> destinationClass,
String converterId)
convert in interface MapperFacade
public <Sk,Sv,Dk,Dv> Map<Dk,Dv> mapAsMap(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
MapperFacade
mapAsMap in interface MapperFacadesource - the source MapsourceType - the parameterized type of the source Map objectdestinationType - the parameterized type of the destination Map object
public <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)
MapperFacade
mapAsMap in interface MapperFacadecontext - context the context from the current mapping request
public <S,Dk,Dv> Map<Dk,Dv> mapAsMap(Iterable<S> source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
mapAsMap in interface MapperFacade
public <S,Dk,Dv> Map<Dk,Dv> mapAsMap(Iterable<S> source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
mapAsMap in interface MapperFacade
public <S,Dk,Dv> Map<Dk,Dv> mapAsMap(S[] source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType)
mapAsMap in interface MapperFacade
public <S,Dk,Dv> Map<Dk,Dv> mapAsMap(S[] source,
Type<S> sourceType,
Type<? extends Map<Dk,Dv>> destinationType,
MappingContext context)
mapAsMap in interface MapperFacade
public <Sk,Sv,D> List<D> mapAsList(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
mapAsList in interface MapperFacade
public <Sk,Sv,D> List<D> mapAsList(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsList in interface MapperFacade
public <Sk,Sv,D> Set<D> mapAsSet(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
mapAsSet in interface MapperFacade
public <Sk,Sv,D> Set<D> mapAsSet(Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsSet in interface MapperFacade
public <Sk,Sv,D> D[] mapAsArray(D[] destination,
Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType)
mapAsArray in interface MapperFacade
public <Sk,Sv,D> D[] mapAsArray(D[] destination,
Map<Sk,Sv> source,
Type<? extends Map<Sk,Sv>> sourceType,
Type<D> destinationType,
MappingContext context)
mapAsArray in interface MapperFacade
public <S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass)
MapperFacade
mapAsCollection in interface MapperFacadesource - the source iterabledestination - the destination collectiondestinationClass - the type of elements in the destination
public <S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Class<D> destinationClass,
MappingContext context)
MapperFacade
mapAsCollection in interface MapperFacadesource - the source iterabledestination - the destination collectiondestinationClass - the type of elements in the destinationcontext - the current mapping context
public <S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationClass)
MapperFacade
mapAsCollection in interface MapperFacadesource - the source arraydestination - the destination collection
public <S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Class<D> destinationClass,
MappingContext context)
MapperFacade
mapAsCollection in interface MapperFacadesource - the source arraydestination - the destination collectioncontext - the current mapping context
public <S,D> void mapAsCollection(Iterable<S> source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType)
MapperFacade
mapAsCollection in interface MapperFacadesource - the source iterabledestination - the destination collectionsourceType - the type of elements in the sourcedestinationType - the type of elements in the destination
public <S,D> void mapAsCollection(S[] source,
Collection<D> destination,
Type<S> sourceType,
Type<D> destinationType)
MapperFacade
mapAsCollection in interface MapperFacadesource - the source arraydestination - the destination collectionsourceType - the type of elements in the sourcedestinationType - the type of elements in the destination
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||