T - type parameter. Is used as a Predicate argument as well as in
convertModelToData and convertModelToData methods.public class BaseAttributeContentConverter<T> extends java.lang.Object implements AttributeContentConverter<T>
AttributeContentConverter.| Constructor and Description |
|---|
BaseAttributeContentConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertDataToModel(T attribute,
java.lang.Object source)
Converts a serializable representation to a property value in case that the predicate
defined is true for a given attribute descriptor.
|
java.lang.Object |
convertModelToData(T attribute,
java.lang.Object source)
Converts a property value to a serializable representation in case that the predicate
defined is true for a given attribute descriptor.
|
java.util.function.Predicate<T> |
getConstrainedBy()
Returns the predicate that constrains the converter.
|
protected Converter<java.lang.Object,java.lang.Object> |
getDataToModelConverter() |
protected Converter<java.lang.Object,java.lang.Object> |
getModelToDataConverter() |
void |
setConstrainedBy(java.util.function.Predicate<T> constrainedBy) |
void |
setDataToModelConverter(Converter<java.lang.Object,java.lang.Object> dataToModelConverter) |
void |
setModelToDataConverter(Converter<java.lang.Object,java.lang.Object> modelToDataConverter) |
public java.util.function.Predicate<T> getConstrainedBy()
AttributeContentConvertertrue, then it applies the conversion,getConstrainedBy in interface AttributeContentConverter<T>null.public void setConstrainedBy(java.util.function.Predicate<T> constrainedBy)
public java.lang.Object convertModelToData(T attribute, java.lang.Object source)
AttributeContentConverterconvertModelToData in interface AttributeContentConverter<T>attribute - the object describing the sourcesource - the persistent source described by the attribute that needs be converted to some serializable representationnull.public java.lang.Object convertDataToModel(T attribute, java.lang.Object source)
AttributeContentConverterconvertDataToModel in interface AttributeContentConverter<T>attribute - the object describing the sourcesource - the serializable representation described by the attribute that needs be converted to some persistent propertynull.protected Converter<java.lang.Object,java.lang.Object> getModelToDataConverter()
public void setModelToDataConverter(Converter<java.lang.Object,java.lang.Object> modelToDataConverter)
protected Converter<java.lang.Object,java.lang.Object> getDataToModelConverter()
public void setDataToModelConverter(Converter<java.lang.Object,java.lang.Object> dataToModelConverter)
Copyright © 2018 SAP SE. All Rights Reserved.