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.
|
doReverseOne
convert, getName, reverse, setAlwaysNewList, setEmptyListSupplier, setJTransfo, setKeepNullList, setSortList
public ReadOnlyDomainAutomaticListTypeConverter()
public ReadOnlyDomainAutomaticListTypeConverter(String name)
name
- namepublic boolean canConvert(Type realToType, Type realDomainType)
TypeConverter
canConvert
in interface TypeConverter<List,List>
canConvert
in class AutomaticListTypeConverter
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
AutomaticListTypeConverter
doConvertOne
in class AutomaticListTypeConverter
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.