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.
|
doReverseOne
convert, getName, reverse, setAlwaysNewSet, setEmptySetSupplier, setJTransfo, setKeepNullSet
public ReadOnlyDomainAutomaticSetTypeConverter()
public ReadOnlyDomainAutomaticSetTypeConverter(String name)
name
- namepublic boolean canConvert(Type realToType, Type realDomainType)
TypeConverter
canConvert
in interface TypeConverter<Set,Set>
canConvert
in class AutomaticSetTypeConverter
realToType
- 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
AutomaticSetTypeConverter
doConvertOne
in class AutomaticSetTypeConverter
jTransfo
- 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 © 2022. All rights reserved.