public class ReadOnlyDomainListTypeConverter extends AbstractListTypeConverter
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 |
---|
ReadOnlyDomainListTypeConverter(String name,
Class<?> toType)
Construct type converter for converting a list, assign given name and use given transfer object type.
|
Modifier and Type | Method and Description |
---|---|
Object |
doConvertOne(JTransfo jTransfo,
Object toObject,
Class<?> domainObjectType,
String... tags)
Do the actual conversion of one object.
|
canConvert, convert, doReverseOne, getName, reverse, setAlwaysNewList, setEmptyListSupplier, setJTransfo, setKeepNullList, setSortList
public ReadOnlyDomainListTypeConverter(String name, Class<?> toType)
name
- name for type converter, for use in MappedBy.typeConverter()
toType
- transfer object typepublic Object doConvertOne(JTransfo jTransfo, Object toObject, Class<?> domainObjectType, String... tags) throws JTransfoException
AbstractListTypeConverter
doConvertOne
in class AbstractListTypeConverter
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.