Package org.springframework.data.convert
Interface ValueConversionContext<P extends PersistentProperty<P>>
public interface ValueConversionContext<P extends PersistentProperty<P>>
The 
ValueConversionContext provides access to the store-specific PersistentProperty and allows to
 call the store-default conversion through the read/write methods.
 
 Store implementations should provide their own flavor of ValueConversionContext enhancing the existing API,
 implementing delegates for read(Object, TypeInformation), write(Object, TypeInformation).
- Author:
 - Christoph Strobl, Oliver Drotbohm
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionReturn thePersistentPropertyto be handled.default @Nullable ObjectReads the value as an instance of theproperty type.default <T> @Nullable TReads the value as an instance oftype.default <T> @Nullable Tread(@Nullable Object value, TypeInformation<T> target) Reads the value as an instance oftype.default @Nullable ObjectWrite the value as an instance of theproperty type.default <T> @Nullable TWrite the value as an instance oftype.default <T> @Nullable Twrite(@Nullable Object value, TypeInformation<T> target) Write the value as an instance oftype. 
- 
Method Details
- 
getProperty
P getProperty()Return thePersistentPropertyto be handled.- Returns:
 - will never be null.
 - See Also:
 
 - 
write
Write the value as an instance of theproperty type.- Parameters:
 value-valueto write; can be null.- Returns:
 - can be null.
 - Throws:
 IllegalStateException- if value cannot be written as an instance of theproperty type.- See Also:
 
 - 
write
Write the value as an instance oftype.- Parameters:
 value-valueto write; can be null.target-typeof value to be written; must not be null.- Returns:
 - can be null.
 - Throws:
 IllegalStateException- if value cannot be written as an instance oftype.- See Also:
 
 - 
write
Write the value as an instance oftype.- Parameters:
 value-valueto write; can be null.target-typeof value to be written; must not be null.- Returns:
 - can be null.
 - Throws:
 IllegalStateException- if value cannot be written as an instance oftype.- See Also:
 
 - 
read
Reads the value as an instance of theproperty type.- Parameters:
 value-valueto be read; can be null.- Returns:
 - can be null.
 - Throws:
 IllegalStateException- if value cannot be read as an instance of theproperty type.- See Also:
 
 - 
read
Reads the value as an instance oftype.- Parameters:
 value-valueto be read; can be null.target-typeof value to be read; must not be null.- Returns:
 - can be null.
 - Throws:
 IllegalStateException- if value cannot be read as an instance oftype.- See Also:
 
 - 
read
Reads the value as an instance oftype.- Parameters:
 value-valueto be read; can be null.target-typeof value to be read; must not be null.- Returns:
 - can be null.
 - Throws:
 IllegalStateException- if value cannot be read as an instance oftype.- See Also:
 
 
 -