public interface ValueConverterRegistry<P extends PersistentProperty<P>>
property-specific
value converters
to convert only specific properties/values of an object.PropertyValueConverter
Modifier and Type | Method and Description |
---|---|
default boolean |
containsConverterFor(Class<?> type,
String path)
Check if a converter is registered for the given type, path combination.
|
<DV,SV> PropertyValueConverter<DV,SV,? extends ValueConversionContext<P>> |
getConverter(Class<?> type,
String path)
Obtain the
PropertyValueConverter registered for the given type, path combination or null
if none defined. |
boolean |
isEmpty()
Check if converters are registered.
|
void |
registerConverter(Class<?> type,
String path,
PropertyValueConverter<?,?,? extends ValueConversionContext<P>> converter)
Register the
PropertyValueConverter for the property of the given type. |
static <P extends PersistentProperty<P>> |
simple()
Obtain a simple
ValueConverterRegistry . |
void registerConverter(Class<?> type, String path, PropertyValueConverter<?,?,? extends ValueConversionContext<P>> converter)
PropertyValueConverter
for the property
of the given type.type
- the target type. Must not be null.path
- the property name. Must not be null.converter
- the converter to register. Must not be null.@Nullable <DV,SV> PropertyValueConverter<DV,SV,? extends ValueConversionContext<P>> getConverter(Class<?> type, String path)
PropertyValueConverter
registered for the given type, path combination or null
if none defined.DV
- domain-specific type.SV
- store-specific type.type
- the target type. Must not be null.path
- the property name. Must not be null.default boolean containsConverterFor(Class<?> type, String path)
type
- the target type. Must not be null.path
- the property name. Must not be null.boolean isEmpty()
static <P extends PersistentProperty<P>> ValueConverterRegistry<P> simple()
ValueConverterRegistry
.P
- PersistentProperty
type.ValueConverterRegistry
.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.