|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dozer.DozerConverter<A,B>
public abstract class DozerConverter<A,B>
This class should be extended in order to implement new Custom Converters for value transformation.
| Constructor Summary | |
|---|---|
DozerConverter(Class<A> prototypeA,
Class<B> prototypeB)
Defines two types, which will take part transformation. |
|
| Method Summary | |
|---|---|
Object |
convert(Object existingDestinationFieldValue,
Object sourceFieldValue,
Class<?> destinationClass,
Class<?> sourceClass)
|
A |
convertFrom(B source)
Converts the source field to the destination field and return the resulting destination value |
abstract A |
convertFrom(B source,
A destination)
Converts the source field to the destination field and return the resulting destination value |
B |
convertTo(A source)
Converts the source field to the destination field and return the resulting destination value. |
abstract B |
convertTo(A source,
B destination)
Converts the source field to the destination field and return the resulting destination value. |
String |
getParameter()
Retrieves the static parameter configured for this particular converter instance. |
void |
setParameter(String parameter)
Sets the configured parameter value for this converter instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DozerConverter(Class<A> prototypeA,
Class<B> prototypeB)
prototypeA - type oneprototypeB - type two| Method Detail |
|---|
public Object convert(Object existingDestinationFieldValue,
Object sourceFieldValue,
Class<?> destinationClass,
Class<?> sourceClass)
convert in interface CustomConverter
public abstract B convertTo(A source,
B destination)
source - the value of the source fielddestination - the current value of the desitinatino field (or null)
public B convertTo(A source)
source - the value of the source field
public abstract A convertFrom(B source,
A destination)
source - the value of the source fielddestination - the current value of the desitinatino field (or null)
public A convertFrom(B source)
source - the value of the source field
public void setParameter(String parameter)
setParameter in interface ConfigurableCustomConverterparameter - configured parameter valuepublic String getParameter()
IllegalStateException - if parameter has not been set yet.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||