Class Normalizer
java.lang.Object
org.apache.openjpa.jdbc.identifier.Normalizer
Static utility class used for operating on string based identifiers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAppends one string to another using default identifier rules.static booleanDetermines whether a name can be split into multiple components.static booleanDetermines whether a name can be split into multiple components, taking into account the specified delimiter.static StringCombines multiple names using default identifier rules.static StringCombines two names using default identifier rules.static Stringconvert(IdentifierConfiguration config, String rule, String name) Convert a normalized name to a name using the specified configuration and naming rule.static StringDelimits a string if necessary, optionally forcing it to be delimited.static booleanfullNamesEqual(String name1, String name2) Splits names into individual components and compares individually for equalitystatic IdentifierConfigurationstatic booleanisDelimited(String name) Returns true if the name is delimited with default delimitersstatic StringJoins multiple names using default identifier rules.static StringJoins multiple names using the specified delimiter.static StringJoins two names using the default identifier rules.static booleannamesEqual(String name1, String name2) Compares two string names for equality.static StringnormalizeMulti(String name) Normalizes a multi-part namestatic StringnormalizeString(String name) Normalizes a single part namestatic StringnormalizeString(String name, IdentifierRule rule) Normalizes a single part name with the given rule rather than the default rule, such as the rule of a dictionary that delimits its reserved words.static StringnormalizeUpper(String name) Normalizes a name, if not delimited, converts to uppercase.static StringremoveDelimiters(String name) Removes default delimiters from a string.static StringRemoves Hungarian notation from a string.static String[]Splits a name into normalized componentsstatic String[]Splits a name into normalized components using the specified name delimiter (ex. schema:table, delim = : --> { schema, table }static StringTruncates a name to the specified length while maintaining delimiters.
-
Constructor Details
-
Normalizer
public Normalizer()
-
-
Method Details
-
getNamingConfiguration
-
normalizeMulti
-
normalizeString
-
normalizeString
Normalizes a single part name with the given rule rather than the default rule, such as the rule of a dictionary that delimits its reserved words.- Parameters:
name-rule-- Since:
- 4.2.0
-
isDelimited
Returns true if the name is delimited with default delimiters- Parameters:
name-
-
fullNamesEqual
-
namesEqual
-
normalizeUpper
-
splitName
-
splitName
-
joinNames
-
joinNames
-
joinNames
-
truncate
-
convert
Convert a normalized name to a name using the specified configuration and naming rule. Note: Currently only delimiters are converted.- Parameters:
config-rule-name-
-
combine
-
combine
-
append
-
removeHungarianNotation
-
removeDelimiters
-
delimit
-
canSplit
Determines whether a name can be split into multiple components. -
canSplit
-