|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.identifier.Normalizer
public class Normalizer
Static utility class used for operating on string based identifiers.
Constructor Summary | |
---|---|
Normalizer()
|
Method Summary | |
---|---|
static String |
append(String name1,
String name2)
Appends one string to another using default identifier rules. |
static boolean |
canSplit(String name)
Determines whether a name can be split into multiple components. |
static boolean |
canSplit(String name,
String delim)
Determines whether a name can be split into multiple components, taking into account the specified delimiter. |
static String |
combine(String... names)
Combines multiple names using default identifier rules. |
static String |
combine(String name1,
String name2)
Combines two names using default identifier rules. |
static String |
convert(IdentifierConfiguration config,
String rule,
String name)
Convert a normalized name to a name using the specified configuration and naming rule. |
static String |
delimit(String name,
boolean force)
Delimits a string if necessary, optionally forcing it to be delimited. |
static boolean |
fullNamesEqual(String name1,
String name2)
Splits names into individual components and compares individually for equality |
static IdentifierConfiguration |
getNamingConfiguration()
|
static boolean |
isDelimited(String name)
Returns true if the name is delimited with default delimiters |
static String |
joinNames(String[] names)
Joins multiple names using default identifier rules. |
static String |
joinNames(String[] names,
String delimiter)
Joins multiple names using the specified delimiter. |
static String |
joinNames(String name1,
String name2)
Joins two names using the default identifier rules. |
static boolean |
namesEqual(String name1,
String name2)
Compares two string names for equality. |
static String |
normalizeMulti(String name)
Normalizes a multi-part name |
static String |
normalizeString(String name)
Normalizes a single part name |
static String |
normalizeUpper(String name)
Normalizes a name, if not delimited, converts to uppercase. |
static String |
removeDelimiters(String name)
Removes default delimiters from a string. |
static String |
removeHungarianNotation(String name)
Removes Hungarian notation from a string. |
static String[] |
splitName(String name)
Splits a name into normalized components |
static String[] |
splitName(String name,
String delim)
Splits a name into normalized components using the specified name delimiter (ex. |
static String |
truncate(String name,
int length)
Truncates a name to the specified length while maintaining delimiters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Normalizer()
Method Detail |
---|
public static IdentifierConfiguration getNamingConfiguration()
public static String normalizeMulti(String name)
name
-
public static String normalizeString(String name)
name
-
public static boolean isDelimited(String name)
name
-
public static boolean fullNamesEqual(String name1, String name2)
name1
- name2
-
public static boolean namesEqual(String name1, String name2)
name1
- name2
-
public static String normalizeUpper(String name)
name
-
public static String[] splitName(String name)
name
-
public static String[] splitName(String name, String delim)
name
-
public static String joinNames(String[] names)
names
-
public static String joinNames(String[] names, String delimiter)
names
-
public static String joinNames(String name1, String name2)
names
-
public static String truncate(String name, int length)
name
- length
-
public static String convert(IdentifierConfiguration config, String rule, String name)
config
- rule
- name
-
public static String combine(String name1, String name2)
name1
- name2
-
public static String combine(String... names)
name1
- name2
-
public static String append(String name1, String name2)
name1
- name2
-
public static String removeHungarianNotation(String name)
name1
- name2
-
public static String removeDelimiters(String name)
name1
- name2
-
public static String delimit(String name, boolean force)
name1
- name2
-
public static boolean canSplit(String name)
name1
- name2
-
public static boolean canSplit(String name, String delim)
name1
- name2
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |