public enum NamingConvention extends Enum<NamingConvention>
Entity-annotated class.NamingStrategy| Enum Constant and Description |
|---|
CASE_INSENSITIVE
Uses the Java name as-is, as a case-insensitive CQL name, for example
Product
=> Product, productId => productId. |
EXACT_CASE
Uses the Java name as-is, as a case-sensitive CQL name, for example
Product =>
"Product", productId => "productId". |
LOWER_CAMEL_CASE
Divide the Java name into words, splitting on upper-case characters; capitalize every word
except the first; then concatenate the words and make the result a case-sensitive CQL
name, for example
Product => "product", productId => "productId". |
SNAKE_CASE_INSENSITIVE
Divide the Java name into words, splitting on upper-case characters; lower-case everything;
then concatenate the words with underscore separators, and make the result a
case-insensitive CQL name, for example
Product => product, productId =>
product_id. |
UPPER_CAMEL_CASE
Divide the Java name into words, splitting on upper-case characters; capitalize every word;
then concatenate the words and make the result a case-sensitive CQL name, for example
Product => "Product", productId => "ProductId". |
UPPER_CASE
Upper-case everything, and make the result a case-sensitive CQL name, for example
Product => "PRODUCT", productId => "PRODUCTID". |
UPPER_SNAKE_CASE
Divide the Java name into words, splitting on upper-case characters; upper-case everything;
then concatenate the words with underscore separators, and make the result a
case-sensitive CQL name, for example
Product => "PRODUCT", productId =>
"PRODUCT_ID". |
| Modifier and Type | Method and Description |
|---|---|
static NamingConvention |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NamingConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NamingConvention CASE_INSENSITIVE
Product
=> Product, productId => productId.
In practice this is the same as lower-casing everything (product, productid), but it
makes generated queries a bit easier to read.
public static final NamingConvention EXACT_CASE
Product =>
"Product", productId => "productId".
Use this if your schema uses camel case and you want to preserve capitalization in table names.
public static final NamingConvention LOWER_CAMEL_CASE
Product => "product", productId => "productId".public static final NamingConvention UPPER_CAMEL_CASE
Product => "Product", productId => "ProductId".public static final NamingConvention SNAKE_CASE_INSENSITIVE
Product => product, productId =>
product_id.public static final NamingConvention UPPER_SNAKE_CASE
Product => "PRODUCT", productId =>
"PRODUCT_ID".public static final NamingConvention UPPER_CASE
Product => "PRODUCT", productId => "PRODUCTID".public static NamingConvention[] values()
for (NamingConvention c : NamingConvention.values()) System.out.println(c);
public static NamingConvention valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2017–2020. All rights reserved.