public class EnumAttributeContentConverter extends java.lang.Object implements AttributeContentConverter<AttributeDescriptorModel>
AttributeContentConverter that converts properties of type Enum| Constructor and Description |
|---|
EnumAttributeContentConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertDataToModel(AttributeDescriptorModel attributeDescriptor,
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(AttributeDescriptorModel 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.
|
protected AttributeDescriptorModelHelperService |
getAttributeDescriptorModelHelperService() |
java.util.function.Predicate<AttributeDescriptorModel> |
getConstrainedBy()
Returns the predicate that constrains the converter.
|
protected EnumTypeAttributePredicate |
getIsEnumPredicate() |
void |
setAttributeDescriptorModelHelperService(AttributeDescriptorModelHelperService attributeDescriptorModelHelperService) |
void |
setIsEnumPredicate(EnumTypeAttributePredicate isEnumPredicate) |
public java.util.function.Predicate<AttributeDescriptorModel> getConstrainedBy()
AttributeContentConvertertrue, then it applies the conversion,getConstrainedBy in interface AttributeContentConverter<AttributeDescriptorModel>null.public java.lang.Object convertModelToData(AttributeDescriptorModel attribute, java.lang.Object source)
AttributeContentConverterconvertModelToData in interface AttributeContentConverter<AttributeDescriptorModel>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(AttributeDescriptorModel attributeDescriptor, java.lang.Object source)
AttributeContentConverterconvertDataToModel in interface AttributeContentConverter<AttributeDescriptorModel>attributeDescriptor - the object describing the sourcesource - the serializable representation described by the attribute that needs be converted to some persistent propertynull.public void setAttributeDescriptorModelHelperService(AttributeDescriptorModelHelperService attributeDescriptorModelHelperService)
protected AttributeDescriptorModelHelperService getAttributeDescriptorModelHelperService()
public void setIsEnumPredicate(EnumTypeAttributePredicate isEnumPredicate)
protected EnumTypeAttributePredicate getIsEnumPredicate()
Copyright © 2018 SAP SE. All Rights Reserved.