- All Implemented Interfaces:
Serializable,Comparable<MapKeyNamingType>,Constable
Defines naming convention rules for the keys contained in a
Map<Object, String> object.
The key name is resolved from a column name by applying this convention. This is used when mapping database query results to Map objects.
Different naming conventions can be applied to transform column names into map keys according to the desired format (camel case, upper case, lower case, or unchanged).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConverts an underscore separated string to a camel case string.Converts a string to an lower case string.Does nothing.Converts a string to an upper case string. -
Method Summary
Modifier and TypeMethodDescriptionabstract StringApplies this naming conversion.static MapKeyNamingTypeReturns the enum constant of this class with the specified name.static MapKeyNamingType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Does nothing. -
CAMEL_CASE
Converts an underscore separated string to a camel case string.For example,
AAA_BBBis converted toaaaBbb. -
UPPER_CASE
Converts a string to an upper case string.For example、
aaaBbbis converted toAAABBB. -
LOWER_CASE
Converts a string to an lower case string.For example,
aaaBbbis converted toaaabbb.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
apply
Applies this naming conversion.- Parameters:
text- the text- Returns:
- the converted text
-