public abstract class AbstractToDomainTypeConverter extends Object implements TypeConverter<Object,Object>, NeedsJTransfo
| Constructor and Description |
|---|
AbstractToDomainTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(Type realToType,
Type realDomainType)
Can this type converter handle conversions between the given transfer and domain object types?
|
Object |
convert(Object toObject,
SyntheticField domainField,
Object domainObject,
String... tags)
Convert a transfer object field value to the value for the domain object.
|
abstract Object |
doConvert(JTransfo jTransfo,
Object toObject,
SyntheticField domainField,
String... tags)
Do the actual conversion.
|
Object |
reverse(Object domainObject,
SyntheticField toField,
Object toObject,
String... tags)
Convert a domain object field value to the value for the transfer object.
|
void |
setJTransfo(JTransfo jTransfo)
Set jTransfo instance which can be used recursively.
|
public void setJTransfo(JTransfo jTransfo)
NeedsJTransfosetJTransfo in interface NeedsJTransfojTransfo - jTransfo instancepublic boolean canConvert(Type realToType, Type realDomainType)
TypeConvertercanConvert in interface TypeConverter<Object,Object>realToType - real class for the type in the transfer objectrealDomainType - real class for the type in the domain objectpublic abstract Object doConvert(JTransfo jTransfo, Object toObject, SyntheticField domainField, String... tags) throws JTransfoException
jTransfo - jTransfo instance in usetoObject - transfer objectdomainField - domain object fieldtags - tags which indicate which fields can be converted based on MapOnly annotations.JTransfoException - oops, cannot convertpublic Object convert(Object toObject, SyntheticField domainField, Object domainObject, String... tags) throws JTransfoException
TypeConverterconvert in interface TypeConverter<Object,Object>toObject - object to convertdomainField - target domain fielddomainObject - target domain objecttags - tags which indicate which fields can be converted based on MapOnly annotations.JTransfoException - problem during type conversionpublic Object reverse(Object domainObject, SyntheticField toField, Object toObject, String... tags) throws JTransfoException
TypeConverterreverse in interface TypeConverter<Object,Object>domainObject - object to converttoField - target transfer object fieldtoObject - target transfer objecttags - tags which indicate which fields can be converted based on MapOnly annotations.JTransfoException - problem during type conversionCopyright © 2017. All rights reserved.