java.lang.Objectorg.objectweb.telosys.dal.tools.Joker
Class for joker character substitution ( e.g. '*' -> '%' in SQL )
Field Summary | |
static int |
REPLACE_ALL
|
static int |
REPLACE_FIRST
|
static int |
REPLACE_LAST
|
Constructor Summary | |
Joker(char userJoker)
Defines a user joker character ( it will be replaced by '%' ) The replace mode is REPLACE_ALL by default |
|
Joker(char userJoker,
char sqlJoker)
Defines a user joker character with a specific replacement character The replace mode is REPLACE_ALL by default |
|
Joker(char userJoker,
char sqlJoker,
int replaceMode)
Defines a user joker character with a specific replacement character and a specific replace mode |
|
Joker(char userJoker,
int replaceMode)
Defines a user joker character ( it will be replaced by '%' ) with a specific replace mode |
Method Summary | |
java.lang.String |
replace(java.lang.String s)
Replaces the user joker(s) by the standard or specific joker character It replaces all, first or last user joker according with the "replace mode" |
java.lang.String |
replaceAll(java.lang.String s)
Replaces all the user jokers by the standard or specific joker character |
java.lang.String |
replaceFirst(java.lang.String s)
Replaces the first character of the given string if it's a user joker |
java.lang.String |
replaceLast(java.lang.String s)
Replaces the last character of the given string if it's a user joker |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int REPLACE_ALL
public static final int REPLACE_FIRST
public static final int REPLACE_LAST
Constructor Detail |
public Joker(char userJoker)
userJoker
- public Joker(char userJoker, int replaceMode)
userJoker
- replaceMode
- : REPLACE_ALL or REPLACE_FIRST or REPLACE_LASTpublic Joker(char userJoker, char sqlJoker)
userJoker
- sqlJoker
- public Joker(char userJoker, char sqlJoker, int replaceMode)
userJoker
- sqlJoker
- replaceMode
- : REPLACE_ALL or REPLACE_FIRST or REPLACE_LASTMethod Detail |
public java.lang.String replace(java.lang.String s)
s
-
public java.lang.String replaceAll(java.lang.String s)
s
-
public java.lang.String replaceLast(java.lang.String s)
s
-
public java.lang.String replaceFirst(java.lang.String s)
s
-
public java.lang.String toString()