public enum NamingType extends java.lang.Enum<NamingType>
This convention resolves the table name from the entity name when Table.name() is not
specified at the entity class, and also resolves the column name from the entity property name
when Column.name() is not specified at the property field.
| Enum Constant and Description |
|---|
LENIENT_SNAKE_LOWER_CASE
Deprecated.
|
LENIENT_SNAKE_UPPER_CASE
Deprecated.
|
LOWER_CASE
Converts the camel case text to the lower case text.
|
NONE
Converts nothing.
|
SNAKE_LOWER_CASE
Converts the camel case text to the text that is snake case and lower case.
|
SNAKE_UPPER_CASE
Converts the camel case text to the text that is snake case and upper case.
|
UPPER_CASE
Converts the camel case text to the upper case text.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
apply(java.lang.String text)
Applies this convention.
|
abstract java.lang.String |
revert(java.lang.String text)
Reverts the text to the original as much as possible.
|
static NamingType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NamingType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NamingType NONE
public static final NamingType SNAKE_UPPER_CASE
For examples:
aaaBbb is converted to AAA_BBB.
aaa3Bbb is converted to AAA3_BBB.
public static final NamingType SNAKE_LOWER_CASE
For examples:
aaaBbb is converted to aaa_bbb.
aaa3Bbb is converted to aaa3_bbb.
@Deprecated public static final NamingType LENIENT_SNAKE_UPPER_CASE
@Deprecated public static final NamingType LENIENT_SNAKE_LOWER_CASE
public static final NamingType UPPER_CASE
For examples:
aaaBbb is converted to AAABBB.
public static final NamingType LOWER_CASE
For examples:
aaaBbb is converted to aaabbb.
public static NamingType[] values()
for (NamingType c : NamingType.values()) System.out.println(c);
public static NamingType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic abstract java.lang.String apply(java.lang.String text)
text - the entity name or the property namepublic abstract java.lang.String revert(java.lang.String text)
text - the text that is converted by this convention