Class AbstractEnumField.EnumMapping

  • Enclosing class:
    AbstractEnumField

    public static final class AbstractEnumField.EnumMapping
    extends Object
    Models all the info contained in an enums config XML file
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • EnumMapping

        public EnumMapping​(IndexSchema schema,
                           FieldType fieldType,
                           Map<String,​String> args)
        Takes in a FieldType and the initArgs Map used for that type, removing the keys that specify the enum.
        Parameters:
        schema - for opening resources
        fieldType - Used for logging or error messages
        args - the init args to comsume the enum name + config file from
    • Method Detail

      • intValueToStringValue

        public String intValueToStringValue​(Integer intVal)
        Converting the (internal) integer value (indicating the sort order) to string (displayed) value
        Parameters:
        intVal - integer value
        Returns:
        string value
      • stringValueToIntValue

        public Integer stringValueToIntValue​(String stringVal)
        Converting the string (displayed) value (internal) to integer value (indicating the sort order)
        Parameters:
        stringVal - string value
        Returns:
        integer value