org.hibernate.util
Class StringHelper
java.lang.Object
org.hibernate.util.StringHelper
public final class StringHelper
- extends Object
Method Summary |
static String[] |
add(String[] x,
String sep,
String[] y)
|
static boolean |
booleanValue(String tfString)
|
static int |
countUnquoted(String string,
char character)
|
static int |
firstIndexOfChar(String sqlString,
String string,
int startindex)
|
static String |
generateAlias(String description)
|
static String |
generateAlias(String description,
int unique)
Generate a nice alias for the given class name or collection role
name and unique integer. |
static boolean |
isEmpty(String string)
|
static boolean |
isNotEmpty(String string)
|
static String |
join(String seperator,
Iterator objects)
|
static String |
join(String seperator,
String[] strings)
|
static int |
lastIndexOfLetter(String string)
|
static int[] |
locateUnquoted(String string,
char character)
|
static String |
moveAndToBeginning(String filter)
|
static String[] |
multiply(String string,
Iterator placeholders,
Iterator replacements)
|
static String |
qualifier(String qualifiedName)
|
static String |
qualify(String prefix,
String name)
|
static String[] |
qualify(String prefix,
String[] names)
|
static String |
repeat(String string,
int times)
|
static String[] |
replace(String[] templates,
String placeholder,
String replacement)
|
static String |
replace(String template,
String placeholder,
String replacement)
|
static String |
replace(String template,
String placeholder,
String replacement,
boolean wholeWords)
|
static String |
replaceOnce(String template,
String placeholder,
String replacement)
|
static String |
root(String qualifiedName)
|
static String[] |
split(String seperators,
String list)
|
static String[] |
split(String seperators,
String list,
boolean include)
|
static String[] |
suffix(String[] columns,
String suffix)
|
static String |
toLowerCase(String str)
|
static String |
toString(Object[] array)
|
static String |
toUpperCase(String str)
|
static String |
truncate(String string,
int length)
|
static String |
unqualify(String qualifiedName)
|
static String |
unqualifyEntityName(String entityName)
|
static String |
unroot(String qualifiedName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WHITESPACE
public static final String WHITESPACE
- See Also:
- Constant Field Values
lastIndexOfLetter
public static int lastIndexOfLetter(String string)
join
public static String join(String seperator,
String[] strings)
join
public static String join(String seperator,
Iterator objects)
add
public static String[] add(String[] x,
String sep,
String[] y)
repeat
public static String repeat(String string,
int times)
replace
public static String replace(String template,
String placeholder,
String replacement)
replace
public static String[] replace(String[] templates,
String placeholder,
String replacement)
replace
public static String replace(String template,
String placeholder,
String replacement,
boolean wholeWords)
replaceOnce
public static String replaceOnce(String template,
String placeholder,
String replacement)
split
public static String[] split(String seperators,
String list)
split
public static String[] split(String seperators,
String list,
boolean include)
unqualify
public static String unqualify(String qualifiedName)
qualifier
public static String qualifier(String qualifiedName)
suffix
public static String[] suffix(String[] columns,
String suffix)
root
public static String root(String qualifiedName)
unroot
public static String unroot(String qualifiedName)
booleanValue
public static boolean booleanValue(String tfString)
toString
public static String toString(Object[] array)
multiply
public static String[] multiply(String string,
Iterator placeholders,
Iterator replacements)
countUnquoted
public static int countUnquoted(String string,
char character)
locateUnquoted
public static int[] locateUnquoted(String string,
char character)
isNotEmpty
public static boolean isNotEmpty(String string)
isEmpty
public static boolean isEmpty(String string)
qualify
public static String qualify(String prefix,
String name)
qualify
public static String[] qualify(String prefix,
String[] names)
firstIndexOfChar
public static int firstIndexOfChar(String sqlString,
String string,
int startindex)
truncate
public static String truncate(String string,
int length)
generateAlias
public static String generateAlias(String description)
generateAlias
public static String generateAlias(String description,
int unique)
- Generate a nice alias for the given class name or collection role
name and unique integer. Subclasses of Loader do not have
to use aliases of this form.
- Returns:
- an alias of the form foo1_
unqualifyEntityName
public static String unqualifyEntityName(String entityName)
toUpperCase
public static String toUpperCase(String str)
toLowerCase
public static String toLowerCase(String str)
moveAndToBeginning
public static String moveAndToBeginning(String filter)