public class TableNamingStrategy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
alwaysQuoteNames |
protected boolean |
changeCase |
protected char |
entityNameTerminator |
protected java.lang.String |
prefix |
protected char |
quoteChar |
protected char |
separatorChar |
protected boolean |
splitCamelCase |
protected boolean |
strictAnnotationNames |
protected java.lang.String |
suffix |
protected boolean |
uppercase |
Constructor and Description |
---|
TableNamingStrategy() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
applyToTableName(java.lang.String tableName)
Applies table naming strategy to given table name hint.
|
java.lang.String |
convertEntityNameToTableName(java.lang.Class type)
Converts entity name to table name.
|
java.lang.String |
convertEntityNameToTableName(java.lang.String entityName)
Converts entity (type) name to table name.
|
java.lang.String |
convertTableNameToEntityName(java.lang.String tableName)
Converts table name to entity (type) name.
|
char |
getEntityNameTerminator() |
java.lang.String |
getPrefix() |
char |
getQuoteChar() |
char |
getSeparatorChar() |
java.lang.String |
getSuffix() |
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 |
setEntityNameTerminator(char entityNameTerminator)
Specifies the terminator character for entity names.
|
void |
setLowercase(boolean lowercase)
Alternative property to
setUppercase(boolean) . |
void |
setPrefix(java.lang.String prefix)
Table prefix, may be
null . |
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 |
setSuffix(java.lang.String suffix)
Table suffix, may be
null . |
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 java.lang.String prefix
protected java.lang.String suffix
protected char entityNameTerminator
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 getPrefix()
public void setPrefix(java.lang.String prefix)
null
.public java.lang.String getSuffix()
public void setSuffix(java.lang.String suffix)
null
.public char getEntityNameTerminator()
public void setEntityNameTerminator(char entityNameTerminator)
public java.lang.String convertEntityNameToTableName(java.lang.Class type)
convertEntityNameToTableName(String)
public java.lang.String convertEntityNameToTableName(java.lang.String entityName)
public java.lang.String convertTableNameToEntityName(java.lang.String tableName)
public java.lang.String applyToTableName(java.lang.String tableName)
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