Class AbstractEnumField.EnumMapping

  • Enclosing class:

    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.
        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
        intVal - integer value
        string value
      • stringValueToIntValue

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