|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.util.StringHelper
public final class StringHelper
Field Summary | |
---|---|
static String |
WHITESPACE
|
Method Summary | |
---|---|
static String[] |
add(String[] x,
String sep,
String[] y)
|
static boolean |
booleanValue(String tfString)
|
static String |
collapse(String name)
Collapses a name. |
static String |
collapseQualifier(String qualifier,
boolean includeDots)
Given a qualifier, collapse it. |
static String |
collapseQualifierBase(String name,
String qualifierBase)
Cross between collapse(java.lang.String) and partiallyUnqualify(java.lang.String, java.lang.String) . |
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 |
partiallyUnqualify(String name,
String qualifierBase)
Partially unqualifies a qualified name. |
static String |
qualifier(String qualifiedName)
|
static String |
qualify(String prefix,
String name)
|
static String[] |
qualify(String prefix,
String[] names)
|
static String |
repeat(char character,
int times)
|
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 |
Field Detail |
---|
public static final String WHITESPACE
Method Detail |
---|
public static int lastIndexOfLetter(String string)
public static String join(String seperator, String[] strings)
public static String join(String seperator, Iterator objects)
public static String[] add(String[] x, String sep, String[] y)
public static String repeat(String string, int times)
public static String repeat(char character, int times)
public static String replace(String template, String placeholder, String replacement)
public static String[] replace(String[] templates, String placeholder, String replacement)
public static String replace(String template, String placeholder, String replacement, boolean wholeWords)
public static String replaceOnce(String template, String placeholder, String replacement)
public static String[] split(String seperators, String list)
public static String[] split(String seperators, String list, boolean include)
public static String unqualify(String qualifiedName)
public static String qualifier(String qualifiedName)
public static String collapse(String name)
name
- The name to collapse.
public static String collapseQualifier(String qualifier, boolean includeDots)
qualifier
- The qualifier to collapse.includeDots
- Should we include the dots in the collapsed form?
public static String partiallyUnqualify(String name, String qualifierBase)
name
- The (potentially) qualified name.qualifierBase
- The qualifier base.
public static String collapseQualifierBase(String name, String qualifierBase)
collapse(java.lang.String)
and partiallyUnqualify(java.lang.String, java.lang.String)
. Functions much like collapse(java.lang.String)
except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name
'org.hibernate.util.StringHelper' would become 'o.h.util.StringHelper'.
name
- The (potentially) qualified name.qualifierBase
- The qualifier base.
public static String[] suffix(String[] columns, String suffix)
public static String root(String qualifiedName)
public static String unroot(String qualifiedName)
public static boolean booleanValue(String tfString)
public static String toString(Object[] array)
public static String[] multiply(String string, Iterator placeholders, Iterator replacements)
public static int countUnquoted(String string, char character)
public static int[] locateUnquoted(String string, char character)
public static boolean isNotEmpty(String string)
public static boolean isEmpty(String string)
public static String qualify(String prefix, String name)
public static String[] qualify(String prefix, String[] names)
public static int firstIndexOfChar(String sqlString, String string, int startindex)
public static String truncate(String string, int length)
public static String generateAlias(String description)
public static String generateAlias(String description, int unique)
description
- The base name (usually an entity-name or collection-role)unique
- A uniquing value
public static String unqualifyEntityName(String entityName)
public static String toUpperCase(String str)
public static String toLowerCase(String str)
public static String moveAndToBeginning(String filter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |