Class EnumAttributeContentConverter

    • Constructor Detail

      • EnumAttributeContentConverter

        public EnumAttributeContentConverter()
    • Method Detail

      • convertModelToData

        public java.lang.Object convertModelToData​(AttributeDescriptorModel attribute,
                                                   java.lang.Object source)
        Description copied from interface: AttributeContentConverter
        Converts a property value to a serializable representation in case that the predicate defined is true for a given attribute descriptor.
        Specified by:
        convertModelToData in interface AttributeContentConverter<AttributeDescriptorModel>
        Parameters:
        attribute - the object describing the source
        source - the persistent source described by the attribute that needs be converted to some serializable representation
        Returns:
        the converter instance. Never null.
      • convertDataToModel

        public java.lang.Object convertDataToModel​(AttributeDescriptorModel attributeDescriptor,
                                                   java.lang.Object source)
        Description copied from interface: AttributeContentConverter
        Converts a serializable representation to a property value in case that the predicate defined is true for a given attribute descriptor.
        Specified by:
        convertDataToModel in interface AttributeContentConverter<AttributeDescriptorModel>
        Parameters:
        attributeDescriptor - the object describing the source
        source - the serializable representation described by the attribute that needs be converted to some persistent property
        Returns:
        the converter instance. Never null.
      • getAttributeClass

        protected java.lang.Class getAttributeClass​(AttributeDescriptorModel attributeDescriptor)
        This method gets the class of the attribute described by the given descriptor.
        Parameters:
        attributeDescriptor - - The descriptor of the attribute whose class to retrieve.
        Returns:
        the class associated to the given attribute descriptor.
      • isDynamicEnum

        protected boolean isDynamicEnum​(java.lang.Class enumClass)
        This method is used to check if the given class is a dynamic enumeration.
        Parameters:
        enumClass - - The class to check
        Returns:
        true if the class represents a dynamic enum. false, otherwise.
      • setEnumerationService

        public void setEnumerationService​(EnumerationService enumerationService)