public class AutomaticListTypeConverter extends AbstractListTypeConverter
Constructor and Description |
---|
AutomaticListTypeConverter()
No-arguments constructor, jTransfo instance needs to be injected explicitly.
|
AutomaticListTypeConverter(JTransfo jTransfo)
Constructor which injects jTransfo instance.
|
AutomaticListTypeConverter(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.
|
Object |
doReverseOne(JTransfo jTransfo,
Object domainObject,
SyntheticField toField,
Class<?> toType,
String... tags)
Do the actual reverse conversion of one object.
|
convert, getName, reverse, setAlwaysNewList, setEmptyListSupplier, setJTransfo, setKeepNullList, setSortList
public AutomaticListTypeConverter()
public AutomaticListTypeConverter(String name)
name
- namepublic AutomaticListTypeConverter(JTransfo jTransfo)
jTransfo
- jTransfo instance for nested conversionspublic boolean canConvert(Type realToType, Type realDomainType)
TypeConverter
canConvert
in interface TypeConverter<List,List>
canConvert
in class AbstractListTypeConverter
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
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 convertpublic Object doReverseOne(JTransfo jTransfo, Object domainObject, SyntheticField toField, Class<?> toType, String... tags) throws JTransfoException
AbstractListTypeConverter
doReverseOne
in class AbstractListTypeConverter
jTransfo
- jTransfo instance in usedomainObject
- domain objecttoField
- field definition on the transfer objecttoType
- configured to type for listtags
- tags which indicate which fields can be converted based on MapOnly
annotations.JTransfoException
- oops, cannot convertCopyright © 2022. All rights reserved.