public static final class AbstractEnumField.EnumMapping extends Object
Modifier and Type | Field and Description |
---|---|
static Integer |
DEFAULT_VALUE |
Map<Integer,String> |
enumIntToStringMap |
protected String |
enumName |
protected String |
enumsConfigFile |
Map<String,Integer> |
enumStringToIntMap |
static String |
PARAM_ENUM_NAME |
static String |
PARAM_ENUMS_CONFIG |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
String |
intValueToStringValue(Integer intVal)
Converting the (internal) integer value (indicating the sort order) to string (displayed) value
|
Integer |
stringValueToIntValue(String stringVal)
Converting the string (displayed) value (internal) to integer value (indicating the sort order)
|
public static final String PARAM_ENUMS_CONFIG
public static final String PARAM_ENUM_NAME
public static final Integer DEFAULT_VALUE
protected final String enumsConfigFile
protected final String enumName
public EnumMapping(IndexSchema schema, FieldType fieldType, Map<String,String> args)
schema
- for opening resourcesfieldType
- Used for logging or error messagesargs
- the init args to comsume the enum name + config file fromCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.