public interface IdentifierUtil
Modifier and Type | Field and Description |
---|---|
static String |
BAR |
static String |
CASE_LOWER |
static String |
CASE_PRESERVE |
static String |
CASE_UPPER |
static char |
DOLLAR_CHAR |
static String |
DOT |
static String |
DOUBLE_QUOTE |
static String |
EMPTY |
static String |
PERCENT |
static String |
SPACE |
static String |
UNDERSCORE |
static char |
UNDERSCORE_CHAR |
Modifier and Type | Method and Description |
---|---|
String |
appendNames(IdentifierRule rule,
String name1,
String name2)
Append the names together while maintaining delimiters.
|
String |
appendNames(String rule,
String name1,
String name2)
Append the names together while maintaining delimiters.
|
boolean |
canSplit(IdentifierRule rule,
String name)
Determines whether a name can be split into multiple components.
|
boolean |
canSplit(IdentifierRule rule,
String name,
String delim)
Determines whether a name can be split into multiple components, taking
into account the specified delimiter.
|
boolean |
canSplit(String rule,
String name)
Determines whether a name can be split into multiple components.
|
boolean |
canSplit(String rule,
String name,
String delim)
Determines whether a name can be split into multiple components, taking
into account the specified delimiter.
|
String |
combineNames(IdentifierRule rule,
IdentifierRule[] rules,
String[] names)
Combines names using delimiting rules and appropriate separators
|
String |
combineNames(IdentifierRule rule,
String[] names)
Combines names using the specified delimiting rule and appropriate separators
|
String |
combineNames(IdentifierRule rule,
String name1,
String name2)
Combines two names using delimiting rules and appropriate separators
|
String |
combineNames(String rule,
String[] names)
Combines names using the specified delimiting rule and appropriate separators
|
String |
combineNames(String rule,
String[] rules,
String[] names)
Combines names using delimiting rules and appropriate separators
|
String |
combineNames(String rule,
String name1,
String name2)
Combines two names using delimiting rules and appropriate separators
|
String |
convert(IdentifierConfiguration config,
String rule,
String name)
Convert the string using this naming configuration to the supplied
naming configuration.
|
String |
convertFull(IdentifierConfiguration config,
String rule,
String fullName)
Converts a qualified string-based name defined using the base configuration to the
specified configuration.
|
String |
delimit(IdentifierRule rule,
String name)
Delimit the name if it requires delimiters
|
String |
delimit(IdentifierRule rule,
String name,
boolean force)
Delimit the string with the option to force delimiting.
|
String |
delimit(String rule,
String name)
Delimit the name if it requires delimiters
|
String |
delimit(String rule,
String name,
boolean force)
Delimit the string with the option to force delimiting.
|
IdentifierConfiguration |
getIdentifierConfiguration()
Get the naming configuration.
|
boolean |
isDelimited(IdentifierRule rule,
String name)
Determines whether a name is delimited.
|
boolean |
isDelimited(String rule,
String name)
Determines whether a name is delimited.
|
boolean |
isReservedWord(IdentifierRule rule,
String name)
Returns whether a name is considered a reserved word
|
boolean |
isReservedWord(String rule,
String name)
Returns whether a name is considered a reserved word
|
String |
joinNames(IdentifierRule[] rules,
String[] names)
Joins several names with different naming rules into a single string
using appropriate delimiters and separators
|
String |
joinNames(IdentifierRule rule,
String[] names)
Joins several names with different naming rules into a single string
using appropriate delimiters and separators
|
String |
joinNames(IdentifierRule rule,
String[] names,
String delimiter)
Joins several names with different naming rules into a single string
using the specified delimiter
|
String |
joinNames(String[] rules,
String[] names)
Joins several names with different naming rules into a single string
using appropriate delimiters and separators
|
String |
joinNames(String rule,
String[] names)
Joins several names with different naming rules into a single string
using appropriate delimiters and separators
|
String |
joinNames(String rule,
String[] names,
String delimiter)
Joins several names with different naming rules into a single string
using the specified delimiter
|
String |
removeDelimiters(IdentifierConfiguration config,
String rule,
String name)
Remove delimiters from a delimited name
|
String |
removeDelimiters(IdentifierRule rule,
String name)
Remove delimiters from a delimited name
|
String |
removeDelimiters(String rule,
String name)
Remove delimiters from a delimited name
|
String |
removeHungarianNotation(IdentifierRule rule,
String name)
Removes Hungarian notation from the specified string.
|
String |
removeHungarianNotation(String rule,
String name)
Removes Hungarian notation from the specified string.
|
boolean |
requiresDelimiters(IdentifierRule rule,
String name)
Determines whether a name requires delimiters based upon:
The SQL-92 Reference definition of a valid unquoted name
The naming rule specified
|
boolean |
requiresDelimiters(String rule,
String name)
Determines whether a name requires delimiters based upon:
The SQL-92 Reference definition of a valid unquoted name
The naming rule specified
|
void |
setIdentifierConfiguration(IdentifierConfiguration config)
Set the naming configuration to use for naming operations.
|
String[] |
splitName(IdentifierRule rule,
String name)
Splits a combined name name using the provided naming rule
|
String[] |
splitName(IdentifierRule rule,
String name,
String delimiter)
Splits a combined name name using the provided naming rule and
delimiter.
|
String[] |
splitName(String rule,
String name)
Splits a combined name name using the provided naming rule
|
String[] |
splitName(String rule,
String name,
String delimiter)
Splits a combined name name using the provided naming rule and
delimiter.
|
String |
truncateName(IdentifierRule rule,
String name,
int length)
Truncates a name while maintaining delimiters.
|
String |
truncateName(String rule,
String name,
int length)
Truncates a name while maintaining delimiters.
|
static final String DOUBLE_QUOTE
static final String DOT
static final String UNDERSCORE
static final String SPACE
static final String BAR
static final String EMPTY
static final String PERCENT
static final char DOLLAR_CHAR
static final char UNDERSCORE_CHAR
static final String CASE_UPPER
static final String CASE_LOWER
static final String CASE_PRESERVE
IdentifierConfiguration getIdentifierConfiguration()
void setIdentifierConfiguration(IdentifierConfiguration config)
String delimit(String rule, String name)
rule
- the rule to use for delimitingname
- the name to delimitString delimit(IdentifierRule rule, String name)
rule
- the rule to use for delimitingname
- the name to delimitString delimit(String rule, String name, boolean force)
rule
- the rule to use for delimitingname
- the name to delimitforce
- add delimiters even if delimiting is not requiredString delimit(IdentifierRule rule, String name, boolean force)
rule
- the rule to use for delimitingname
- the name to delimitforce
- add delimiters even if delimiting is not requiredString removeDelimiters(String rule, String name)
rule
- the rule to use for removing delimitersname
- the name from which to remove delimitersString removeDelimiters(IdentifierConfiguration config, String rule, String name)
rule
- the rule to use for removing delimitersname
- the name from which to remove delimitersString removeDelimiters(IdentifierRule rule, String name)
rule
- the rule to use for removing delimitersname
- the name from which to remove delimitersboolean isDelimited(String rule, String name)
rule
- the rule to use for removing delimitersname
- the name to examine for delimitersboolean isDelimited(IdentifierRule rule, String name)
rule
- the rule to use for removing delimitersname
- the name to examine for delimitersboolean requiresDelimiters(String rule, String name)
rule
- the rule to use for removing delimitersname
- the name to examine for delimiting requirementsboolean requiresDelimiters(IdentifierRule rule, String name)
rule
- the rule to use for removing delimitersname
- the name to examine for delimiting requirementsString combineNames(String rule, String[] rules, String[] names)
String combineNames(IdentifierRule rule, IdentifierRule[] rules, String[] names)
String combineNames(String rule, String[] names)
String combineNames(IdentifierRule rule, String[] names)
String combineNames(String rule, String name1, String name2)
String combineNames(IdentifierRule rule, String name1, String name2)
String joinNames(String[] rules, String[] names)
String joinNames(IdentifierRule[] rules, String[] names)
String joinNames(String rule, String[] names)
String joinNames(IdentifierRule rule, String[] names)
String joinNames(IdentifierRule rule, String[] names, String delimiter)
String joinNames(String rule, String[] names, String delimiter)
String[] splitName(String rule, String name)
name
- the multi-value nameString[] splitName(IdentifierRule rule, String name)
name
- the multi-value nameString[] splitName(String rule, String name, String delimiter)
name
- the multi-value nameString[] splitName(IdentifierRule rule, String name, String delimiter)
name
- the multi-value nameboolean isReservedWord(String rule, String name)
boolean isReservedWord(IdentifierRule rule, String name)
String convert(IdentifierConfiguration config, String rule, String name)
String truncateName(String rule, String name, int length)
String truncateName(IdentifierRule rule, String name, int length)
String appendNames(IdentifierRule rule, String name1, String name2)
String appendNames(String rule, String name1, String name2)
String convertFull(IdentifierConfiguration config, String rule, String fullName)
String removeHungarianNotation(String rule, String name)
String removeHungarianNotation(IdentifierRule rule, String name)
boolean canSplit(String rule, String name)
boolean canSplit(IdentifierRule rule, String name)
boolean canSplit(String rule, String name, String delim)
boolean canSplit(IdentifierRule rule, String name, String delim)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.