Package org.springframework.data.convert
Class PropertyValueConverter.FunctionPropertyValueConverter<DV,SV,P extends PersistentProperty<P>>  
java.lang.Object
org.springframework.data.convert.PropertyValueConverter.FunctionPropertyValueConverter<DV,SV,P>  
- All Implemented Interfaces:
- PropertyValueConverter<DV,- SV, - ValueConversionContext<P>> 
- Enclosing interface:
- PropertyValueConverter<DV,SV, C extends ValueConversionContext<? extends PersistentProperty<?>>> 
public static class PropertyValueConverter.FunctionPropertyValueConverter<DV,SV,P extends PersistentProperty<P>>  
extends Object
implements PropertyValueConverter<DV,SV,ValueConversionContext<P>>  
A 
PropertyValueConverter that delegates conversion to the given BiFunctions.- Author:
- Oliver Drotbohm
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.data.convert.PropertyValueConverterPropertyValueConverter.FunctionPropertyValueConverter<DV,SV, P extends PersistentProperty<P>>, PropertyValueConverter.ObjectToObjectPropertyValueConverter 
- 
Constructor SummaryConstructorsConstructorDescriptionFunctionPropertyValueConverter(BiFunction<DV, ValueConversionContext<P>, SV> writer, BiFunction<SV, ValueConversionContext<P>, DV> reader) 
- 
Method SummaryModifier and TypeMethodDescriptionread(SV value, ValueConversionContext<P> context) Convert the given store specific value into it's domain value representation.readNull(ValueConversionContext<P> context) Convert the givennullvalue from the store into its domain value representation.write(DV value, ValueConversionContext<P> context) Convert the given domain-specific value into it's native store representation.writeNull(ValueConversionContext<P> context) Convert the givennullvalue from the domain model into it's native store representation.
- 
Constructor Details- 
FunctionPropertyValueConverterpublic FunctionPropertyValueConverter(BiFunction<DV, ValueConversionContext<P>, SV> writer, BiFunction<SV, ValueConversionContext<P>, DV> reader) 
 
- 
- 
Method Details- 
writeDescription copied from interface:PropertyValueConverterConvert the given domain-specific value into it's native store representation. Typically, a write operation.- Specified by:
- writein interface- PropertyValueConverter<DV,- SV, - P extends PersistentProperty<P>> 
- Parameters:
- value- value to write; can be null.
- context-- ValueConversionContextcontaining store-specific metadata used in the value conversion; never null.
- Returns:
- the converted value. Can be null.
 
- 
writeNullDescription copied from interface:PropertyValueConverterConvert the givennullvalue from the domain model into it's native store representation. Typically, a write operation. Returnsnullby default.- Specified by:
- writeNullin interface- PropertyValueConverter<DV,- SV, - P extends PersistentProperty<P>> 
- Parameters:
- context-- ValueConversionContextcontaining store-specific metadata used in the value conversion; never null.
- Returns:
- the converted value. Can be null.
 
- 
readDescription copied from interface:PropertyValueConverterConvert the given store specific value into it's domain value representation. Typically, a read operation.- Specified by:
- readin interface- PropertyValueConverter<DV,- SV, - P extends PersistentProperty<P>> 
- Parameters:
- value- value to read.
- context-- ValueConversionContextcontaining store-specific metadata used in the value conversion; never null.
- Returns:
- the converted value. Can be null.
 
- 
readNullDescription copied from interface:PropertyValueConverterConvert the givennullvalue from the store into its domain value representation. Typically, a read operation. Returnsnullby default.- Specified by:
- readNullin interface- PropertyValueConverter<DV,- SV, - P extends PersistentProperty<P>> 
- Parameters:
- context-- ValueConversionContextcontaining store-specific metadata used in the value conversion; never null.
- Returns:
- the converted value. Can be null.
 
 
-