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 SummaryModifier and TypeMethodDescriptionReturn thePersistentPropertyto be handled.default ObjectReads the value as an instance of theproperty type.default <T> TReads the value as an instance oftype.default <T> Tread(Object value, TypeInformation<T> target) Reads the value as an instance oftype.default ObjectWrite the value as an instance of theproperty type.default <T> TWrite the value as an instance oftype.default <T> Twrite(Object value, TypeInformation<T> target) Write the value as an instance oftype.
- 
Method Details- 
getPropertyP getProperty()Return thePersistentPropertyto be handled.- Returns:
- will never be null.
- See Also:
 
- 
writeWrite 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 the- property type.
- See Also:
 
- 
writeWrite 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 of- type.
- See Also:
 
- 
writeWrite 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 of- type.
- See Also:
 
- 
readReads 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 the- property type.
- See Also:
 
- 
readReads 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 of- type.
- See Also:
 
- 
readReads 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 of- type.
- See Also:
 
 
-