public class ReadOnlyDomainAutomaticSetTypeConverter extends AutomaticSetTypeConverter
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 |
|---|
ReadOnlyDomainAutomaticSetTypeConverter()
No-arguments constructor, jTransfo instance needs to be injected explicitly.
|
ReadOnlyDomainAutomaticSetTypeConverter(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, setAlwaysNewSet, setEmptySetSupplier, setJTransfo, setKeepNullSetpublic ReadOnlyDomainAutomaticSetTypeConverter()
public ReadOnlyDomainAutomaticSetTypeConverter(String name)
name - namepublic boolean canConvert(Type realToType, Type realDomainType)
TypeConvertercanConvert in interface TypeConverter<Set,Set>canConvert in class AutomaticSetTypeConverterrealToType - 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
AutomaticSetTypeConverterdoConvertOne in class AutomaticSetTypeConverterjTransfo - 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 © 2019. All rights reserved.