public class ColumnNamingStrategy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
alwaysQuoteNames |
protected boolean |
changeCase |
protected char |
quoteChar |
protected char |
separatorChar |
protected boolean |
splitCamelCase |
protected boolean |
strictAnnotationNames |
protected boolean |
uppercase |
Constructor and Description |
---|
ColumnNamingStrategy() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
applyToColumnName(java.lang.String columnName)
Applies column naming strategy to given column name hint.
|
java.lang.String |
convertColumnNameToPropertyName(java.lang.String columnName)
Converts column name to property name.
|
java.lang.String |
convertPropertyNameToColumnName(java.lang.String propertyName)
Converts property name to column name.
|
char |
getQuoteChar() |
char |
getSeparatorChar() |
boolean |
isAlwaysQuoteNames() |
boolean |
isChangeCase() |
boolean |
isLowercase() |
boolean |
isSplitCamelCase() |
boolean |
isStrictAnnotationNames() |
boolean |
isUppercase() |
void |
setAlwaysQuoteNames(boolean alwaysQuoteNames)
Defines if all table and column names should be quoted.
|
void |
setChangeCase(boolean changeCase)
Specifies if database names should be convert to
uppercase or lowercase.
|
void |
setLowercase(boolean lowercase)
Alternative property to
setUppercase(boolean) . |
void |
setQuoteChar(char quoteChar)
Defines quote char.
|
void |
setSeparatorChar(char separatorChar)
Separator character, when camel case names
are
split . |
void |
setSplitCamelCase(boolean splitCamelCase)
Specifies if camel case name has to be split.
|
void |
setStrictAnnotationNames(boolean strictAnnotationNames)
Defines if annotation names are strict, or if all the naming
rules should apply on them, too.
|
void |
setUppercase(boolean uppercase)
Specifies if table name should be converted to uppercase.
|
protected static java.lang.StringBuilder |
toLowercase(java.lang.StringBuilder string) |
protected static java.lang.StringBuilder |
toUppercase(java.lang.StringBuilder string) |
protected boolean splitCamelCase
protected char separatorChar
protected boolean changeCase
protected boolean uppercase
protected boolean strictAnnotationNames
protected boolean alwaysQuoteNames
protected char quoteChar
public java.lang.String convertPropertyNameToColumnName(java.lang.String propertyName)
public java.lang.String convertColumnNameToPropertyName(java.lang.String columnName)
public java.lang.String applyToColumnName(java.lang.String columnName)
public boolean isSplitCamelCase()
public void setSplitCamelCase(boolean splitCamelCase)
false
, then name is passed unchanged.public char getSeparatorChar()
public void setSeparatorChar(char separatorChar)
split
.public boolean isChangeCase()
public void setChangeCase(boolean changeCase)
public boolean isUppercase()
public void setUppercase(boolean uppercase)
public boolean isLowercase()
public void setLowercase(boolean lowercase)
setUppercase(boolean)
.
Does just the opposite.public boolean isStrictAnnotationNames()
public void setStrictAnnotationNames(boolean strictAnnotationNames)
public boolean isAlwaysQuoteNames()
public void setAlwaysQuoteNames(boolean alwaysQuoteNames)
public char getQuoteChar()
public void setQuoteChar(char quoteChar)
protected static java.lang.StringBuilder toUppercase(java.lang.StringBuilder string)
protected static java.lang.StringBuilder toLowercase(java.lang.StringBuilder string)
Copyright © 2003-present Jodd Team