public class DBIdentifierUtilImpl extends IdentifierUtilImpl implements DBIdentifierUtil, Configurable
ANY, COLUMN, SEQUENCE, TABLEBAR, CASE_LOWER, CASE_PRESERVE, CASE_UPPER, DOLLAR_CHAR, DOT, DOUBLE_QUOTE, EMPTY, PERCENT, SPACE, UNDERSCORE, UNDERSCORE_CHAR| Constructor and Description |
|---|
DBIdentifierUtilImpl() |
DBIdentifierUtilImpl(IdentifierConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
DBIdentifier |
append(DBIdentifier.DBIdentifierType resultId,
DBIdentifier... names)
Appends multiple names together using the appropriate name delimiter.
|
String |
appendColumns(Column[] columns)
Appends multiple columns names together into comma delimited string.
|
String |
convertAlias(String alias)
Converts a column alias to use the appropriate delimiters
|
DBIdentifier |
convertSchemaCase(DBIdentifier name)
Convert the specified schema name to a name that the database will
be able to understand in metadata operations.
|
String |
delimit(DBIdentifier name,
boolean force) |
DBIdentifier |
fromDBName(String name,
DBIdentifier.DBIdentifierType id)
Creates a new identifier of a given type based upon the name returned
from the database.
|
JDBCConfiguration |
getConfiguration()
System configuration.
|
DBIdentifier |
getGeneratedKeySequenceName(Column col,
int maxLen)
Returns a generated key sequence identifier for the column.
|
DBIdentifier |
getValidColumnIdentifier(DBIdentifier name,
Table table,
int maxLen,
boolean checkForUniqueness)
Returns a valid column name/identifier, based upon the configuration and
provided parameters.
|
DBIdentifier |
getValidForeignKeyIdentifier(DBIdentifier name,
Table table,
Table toTable,
int maxLen)
Returns a valid foreign key identifier, based upon the configuration and
provided parameters.
|
DBIdentifier |
getValidIndexIdentifier(DBIdentifier name,
Table table,
int maxLen)
Returns a valid index identifier, based upon the configuration and
provided parameters.
|
DBIdentifier |
getValidSequenceIdentifier(DBIdentifier name,
Schema schema,
int maxLen)
Returns a valid index identifier, based upon the configuration and
provided parameters.
|
DBIdentifier |
getValidTableIdentifier(DBIdentifier name,
Schema schema,
int maxLen)
Returns a valid table identifier, based upon the configuration and provided
parameters.
|
DBIdentifier |
getValidUniqueIdentifier(DBIdentifier name,
Table table,
int maxLen)
Returns a valid unique constraint identifier, based upon the configuration and
provided parameters.
|
DBIdentifier |
makeIdentifierValid(DBIdentifier sname,
NameSet set,
int maxLen,
boolean checkForUniqueness)
Shortens the given name to the given maximum length, then checks that
it is not a reserved word.
|
DBIdentifier |
makeNameValid(String name,
NameSet set,
int maxLen,
int nameType,
boolean checkForUniqueness)
Shortens the given name to the given maximum length, then checks that
it is not a reserved word.
|
void |
setConfiguration(Configuration conf)
Invoked prior to setting bean properties.
|
String |
shorten(String name,
int targetLength) |
String |
toDBName(DBIdentifier name)
Converts the name to a name which can be used within a SQL statement.
|
String |
toDBName(DBIdentifier name,
boolean delimit)
Converts the name to a name which can be used within a SQL statement.
|
String |
toDBName(String name)
Converts the identifier to a format appropriate for the configuration.
|
String |
toDBName(String name,
boolean delimit)
Converts the identifier to a format appropriate for the configuration using
the default naming rule.
|
appendNames, appendNames, canSplit, canSplit, canSplit, canSplit, combineFull, combineNames, combineNames, combineNames, combineNames, combineNames, combineNames, combineNames, combineNames, combineNames, combineNames, convert, convertFull, delimit, delimit, delimit, delimit, delimit, delimit, endConfiguration, getIdentifierConfiguration, isDelimited, isDelimited, isDelimited, isDoubleQuoted, isReservedWord, isReservedWord, joinNames, joinNames, joinNames, joinNames, joinNames, joinNames, joinNames, needsConversion, removeDelimiters, removeDelimiters, removeDelimiters, removeDelimiters, removeDelimiters, removeHungarianNotation, removeHungarianNotation, requiresDelimiters, requiresDelimiters, requiresDelimiters, setIdentifierConfiguration, splitName, splitName, splitName, splitName, splitName, splitName, startConfiguration, truncateName, truncateNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendNames, appendNames, canSplit, canSplit, canSplit, canSplit, combineNames, combineNames, combineNames, combineNames, combineNames, combineNames, convert, convertFull, delimit, delimit, delimit, delimit, getIdentifierConfiguration, isDelimited, isDelimited, isReservedWord, isReservedWord, joinNames, joinNames, joinNames, joinNames, joinNames, joinNames, removeDelimiters, removeDelimiters, removeDelimiters, removeHungarianNotation, removeHungarianNotation, requiresDelimiters, requiresDelimiters, setIdentifierConfiguration, splitName, splitName, splitName, splitName, truncateName, truncateNameendConfiguration, startConfigurationpublic DBIdentifierUtilImpl()
public DBIdentifierUtilImpl(IdentifierConfiguration config)
public DBIdentifier getValidColumnIdentifier(DBIdentifier name, Table table, int maxLen, boolean checkForUniqueness)
DBIdentifierUtilgetValidColumnIdentifier in interface DBIdentifierUtilpublic DBIdentifier getValidForeignKeyIdentifier(DBIdentifier name, Table table, Table toTable, int maxLen)
DBIdentifierUtilgetValidForeignKeyIdentifier in interface DBIdentifierUtilpublic DBIdentifier getValidUniqueIdentifier(DBIdentifier name, Table table, int maxLen)
DBIdentifierUtilgetValidUniqueIdentifier in interface DBIdentifierUtilpublic DBIdentifier getValidIndexIdentifier(DBIdentifier name, Table table, int maxLen)
DBIdentifierUtilgetValidIndexIdentifier in interface DBIdentifierUtilpublic DBIdentifier getValidSequenceIdentifier(DBIdentifier name, Schema schema, int maxLen)
DBIdentifierUtilgetValidSequenceIdentifier in interface DBIdentifierUtilpublic DBIdentifier getValidTableIdentifier(DBIdentifier name, Schema schema, int maxLen)
DBIdentifierUtilgetValidTableIdentifier in interface DBIdentifierUtilpublic DBIdentifier makeNameValid(String name, NameSet set, int maxLen, int nameType, boolean checkForUniqueness)
DBIdentifierUtilmakeNameValid in interface DBIdentifierUtilpublic DBIdentifier makeIdentifierValid(DBIdentifier sname, NameSet set, int maxLen, boolean checkForUniqueness)
DBIdentifierUtilmakeIdentifierValid in interface DBIdentifierUtilpublic String toDBName(DBIdentifier name)
toDBName in interface DBIdentifierUtilpublic String toDBName(DBIdentifier name, boolean delimit)
toDBName in interface DBIdentifierUtildelimit - If true, allows the name to be delimited, if necessary.
Otherwise, the identifier is not delimited.public String toDBName(String name)
toDBName in interface DBIdentifierUtilpublic String toDBName(String name, boolean delimit)
toDBName in interface DBIdentifierUtildelimit - If false, do not delimit. Otherwise, delimit if necessary.public DBIdentifier fromDBName(String name, DBIdentifier.DBIdentifierType id)
fromDBName in interface DBIdentifierUtilpublic DBIdentifier append(DBIdentifier.DBIdentifierType resultId, DBIdentifier... names)
DBIdentifierUtilappend in interface DBIdentifierUtilpublic String appendColumns(Column[] columns)
DBIdentifierUtilappendColumns in interface DBIdentifierUtilpublic String delimit(DBIdentifier name, boolean force)
public DBIdentifier getGeneratedKeySequenceName(Column col, int maxLen)
DBIdentifierUtilgetGeneratedKeySequenceName in interface DBIdentifierUtilpublic DBIdentifier convertSchemaCase(DBIdentifier name)
convertSchemaCase in interface DBIdentifierUtilpublic String convertAlias(String alias)
convertAlias in interface DBIdentifierUtilpublic JDBCConfiguration getConfiguration()
public void setConfiguration(Configuration conf)
ConfigurablesetConfiguration in interface ConfigurablesetConfiguration in class IdentifierUtilImplCopyright © 2006–2022 Apache Software Foundation. All rights reserved.