public class ReadOnlyDomainAutomaticListTypeConverter extends AutomaticListTypeConverter
Similar to ReadOnlyDomainTypeConverter this does a full conversion from domain to transfer object but will
only find the objects and not update the fields when converting to the domain object. This way list membership is
updated, but the domain objects remain unmodified.
| Constructor and Description |
|---|
ReadOnlyDomainAutomaticListTypeConverter()
No-arguments constructor, jTransfo instance needs to be injected explicitly.
|
ReadOnlyDomainAutomaticListTypeConverter(String name)
Constructor which defined custom name.
|
| 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 |
doConvertOne(JTransfo jTransfo,
Object toObject,
Class<?> domainObjectType,
String... tags)
Do the actual conversion of one object.
|
doReverseOneconvert, getName, reverse, setAlwaysNewList, setEmptyListSupplier, setJTransfo, setKeepNullList, setSortListpublic ReadOnlyDomainAutomaticListTypeConverter()
public ReadOnlyDomainAutomaticListTypeConverter(String name)
name - namepublic boolean canConvert(Type realToType, Type realDomainType)
TypeConvertercanConvert in interface TypeConverter<List,List>canConvert in class AutomaticListTypeConverterrealToType - real class for the type in the transfer objectrealDomainType - real class for the type in the domain objectpublic Object doConvertOne(JTransfo jTransfo, Object toObject, Class<?> domainObjectType, String... tags) throws JTransfoException
AutomaticListTypeConverterdoConvertOne in class AutomaticListTypeConverterjTransfo - jTransfo instance in usetoObject - transfer objectdomainObjectType - domain object typetags - tags which indicate which fields can be converted based on MapOnly annotations.JTransfoException - oops, cannot convertCopyright © 2017. All rights reserved.