public class UnderscoreNamingConvention extends AbstractNamingConvention
databasePlatform, DEFAULT_SEQ_FORMAT, maxConstraintNameLength, rhsPrefixLength, TABLE_PKCOLUMN_SEQ_FORMAT, useForeignKeyPrefix| Constructor and Description |
|---|
UnderscoreNamingConvention()
Create with a sequence format of "{table}_seq".
|
UnderscoreNamingConvention(String sequenceFormat)
Create with a given sequence format.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getColumnFromProperty(Class<?> beanClass,
String propertyName)
Converts Camel case property name to underscore based column name.
|
String |
getPropertyFromColumn(Class<?> beanClass,
String dbColumnName)
Converts underscore based column name to Camel case property name.
|
TableName |
getTableNameByConvention(Class<?> beanClass)
Returns the last part of the class name.
|
boolean |
isDigitsCompressed()
Returns true if digits are compressed.
|
boolean |
isForceUpperCase()
Return true if the result will be upper case.
|
void |
setDigitsCompressed(boolean digitsCompressed)
Sets to true for digits to be compressed (without a leading underscore).
|
void |
setForceUpperCase(boolean forceUpperCase)
Set to true to make the result upper case.
|
protected String |
toCamelFromUnderscore(String underscore)
To camel from underscore.
|
protected String |
toUnderscoreFromCamel(String camelCase)
Convert and return the string to underscore from camel case.
|
findTableAnnotation, getCatalog, getM2MJoinTableName, getSchema, getSequenceFormat, getSequenceName, getTableName, getTableNameFromAnnotation, isEmpty, isUseForeignKeyPrefix, quoteIdentifiers, setCatalog, setDatabasePlatform, setSchema, setSequenceFormat, setUseForeignKeyPrefixpublic UnderscoreNamingConvention(String sequenceFormat)
sequenceFormat - the sequence formatpublic UnderscoreNamingConvention()
public TableName getTableNameByConvention(Class<?> beanClass)
getTableNameByConvention in class AbstractNamingConventionbeanClass - the bean classpublic String getColumnFromProperty(Class<?> beanClass, String propertyName)
public String getPropertyFromColumn(Class<?> beanClass, String dbColumnName)
beanClass - the bean classdbColumnName - the db column namepublic boolean isForceUpperCase()
False if it will be lower case.
public void setForceUpperCase(boolean forceUpperCase)
public boolean isDigitsCompressed()
public void setDigitsCompressed(boolean digitsCompressed)
protected String toUnderscoreFromCamel(String camelCase)
Copyright © 2014. All Rights Reserved.