T
- type of the transfer objectD
- type of the domain objectpublic interface PreConverter<T,D>
This is called at the end of the interceptor pipeline, before convertion of the individual fields.
The preconverter is only used when it is declared on the transfer object using PreConvert
.
The preconverter should be re-entrant. A singleton is used for all convert invocations.
Modifier and Type | Interface and Description |
---|---|
static class |
PreConverter.Result
Possible results of the preconverter.
|
Modifier and Type | Method and Description |
---|---|
default PreConverter.Result |
preConvertToDomain(T source,
D target,
String... tags)
Do some work just before doing the actual conversion from transfer to domain object.
|
default PreConverter.Result |
preConvertToTo(D source,
T target,
String... tags)
Do some work just before doing the actual conversion from domain to transfer object.
|
default PreConverter.Result preConvertToTo(D source, T target, String... tags)
You can prevent the conversion of the actual object to happen by returning PreConverter.Result.SKIP
.
source
- source object. Should not be null.target
- target object. Should not be null.tags
- tags which indicate which fields can be converted based on MapOnly
annotations.
Tags are processed from left to right.default PreConverter.Result preConvertToDomain(T source, D target, String... tags)
You can prevent the conversion of the actual object to happen by returning PreConverter.Result.SKIP
.
source
- source object. Should not be null.target
- target object. Should not be null.tags
- tags which indicate which fields can be converted based on MapOnly
annotations.
Tags are processed from left to right.Copyright © 2022. All rights reserved.