public static class PropertyValueConverter.FunctionPropertyValueConverter<DV,SV,P extends PersistentProperty<P>> extends Object implements PropertyValueConverter<DV,SV,ValueConversionContext<P>>
PropertyValueConverter that delegates conversion to the given BiFunctions.PropertyValueConverter.FunctionPropertyValueConverter<DV,SV,P extends PersistentProperty<P>>, PropertyValueConverter.ObjectToObjectPropertyValueConverter| Constructor and Description |
|---|
FunctionPropertyValueConverter(BiFunction<DV,ValueConversionContext<P>,SV> writer,
BiFunction<SV,ValueConversionContext<P>,DV> reader) |
| Modifier and Type | Method and Description |
|---|---|
DV |
read(SV value,
ValueConversionContext<P> context)
Convert the given store specific value into it's domain value representation.
|
SV |
write(DV value,
ValueConversionContext<P> context)
Convert the given domain-specific value into it's native store representation.
|
public FunctionPropertyValueConverter(BiFunction<DV,ValueConversionContext<P>,SV> writer, BiFunction<SV,ValueConversionContext<P>,DV> reader)
@Nullable public SV write(@Nullable DV value, ValueConversionContext<P> context)
PropertyValueConverterwrite in interface PropertyValueConverter<DV,SV,ValueConversionContext<P extends PersistentProperty<P>>>value - can be null.context - never null.@Nullable public DV read(@Nullable SV value, ValueConversionContext<P> context)
PropertyValueConverterread in interface PropertyValueConverter<DV,SV,ValueConversionContext<P extends PersistentProperty<P>>>value - can be null.context - never null.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.