|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
S - D - public interface Converter<S,D>
Converter is used to provide direct conversion from one type to another,
useful for those scenarios where complete control over the mapping is
desired.
Note that an instance of the current MapperFacade is provided in the convert
method for cases where you only want to control a specific portion of the mapping,
but wish to delegate some or all of the mapping of the nested types.
See also CustomConverter for a base class which can be
extended to create your own custom converter instance.
| Method Summary | |
|---|---|
boolean |
canConvert(Type<?> sourceType,
Type<?> destinationType)
Answers whether this converter can be used to handle the conversion of sourceType
to destinationType. |
D |
convert(S source,
Type<? extends D> destinationType)
Perform the conversion of source into a new instance of
destinationType. |
void |
setMapperFacade(MapperFacade mapper)
Store an instance of the current MapperFacade which may be used in mapping of nested types. |
| Methods inherited from interface ma.glasnost.orika.MappedTypePair |
|---|
getAType, getBType |
| Method Detail |
|---|
boolean canConvert(Type<?> sourceType,
Type<?> destinationType)
sourceType
to destinationType.
sourceType - destinationType -
D convert(S source,
Type<? extends D> destinationType)
source into a new instance of
destinationType.
source - the source object to be converteddestinationType - the destination type to produce
destinationTypevoid setMapperFacade(MapperFacade mapper)
mapper - the current MapperFacade
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||