X
- The entity value typeY
- The persisted value type@Indexed(value=AttributeConverter.class) public interface AttributeConverter<X,Y>
Modifier and Type | Method and Description |
---|---|
X |
convertToEntityValue(Y persistedValue,
io.micronaut.core.convert.ConversionContext context)
Converts the persisted value to the entity value.
|
Y |
convertToPersistedValue(X entityValue,
io.micronaut.core.convert.ConversionContext context)
Converts the entity value to the persisted value.
|
@Nullable Y convertToPersistedValue(@Nullable X entityValue, @NonNull io.micronaut.core.convert.ConversionContext context)
entityValue
- The entity valuecontext
- The conversion context.@Nullable X convertToEntityValue(@Nullable Y persistedValue, @NonNull io.micronaut.core.convert.ConversionContext context)
persistedValue
- The persisted valuecontext
- The conversion context.