| Modifier and Type | Field and Description |
|---|---|
| private static final char | |
| private static final char | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | Returns: TRUE if the character in val and vLoc match based on straight equality or collation element based equality. Otherwise we will return FALSE.value to compare. val, int character position in val. vLoc, char[] pattern to look for in val. pat, int character position in pat. pLoc, RuleBasedCollator null if we are dealing with UCS_BASIC character string
types. If not null, then we use it to determine the equality of the
2 characters in pat and val if they are not same. collator)If the character in val matches the character in pat, then it does not matter if the database is UCS_BASIC or territory based, we simply return TRUE from the method. |
| pack-priv static Boolean | checkLengths(int
current index into char[] val vLoc, int end index or our value vEnd, int current index into our char[] pattern pLoc, char[] pattern char [] pat, int end index of our pattern [] pEnd)checkLengths Returns null if we are not done. |
| pack-priv static int | getMinLen(char[] pattern, int pStart, int pEnd, boolean haveEsc, char escChar)
Calculate the shortest length string that could match this pattern |
| public static String | Returns: The String for the >= clauseThe right side of the LIKE pattern, String The escape clause escape, int Maximum length of column, for null padding maxWidth)Return the substring from the pattern for the optimization >= clause. |
| private static String | greaterEqualString(String
like pattern to build from pattern, char the escape character in the pattern escChar)greaterEqualString -- for Escape clause only Walk the pattern character by character |
| public static String | |
| public static String | |
| public static boolean | Returns: Whether or not the like comparison is still needed.The right side of the LIKE pattern)Return whether or not the like comparison is still needed after performing the like transformation on a constant string. |
| public static boolean | Returns: Whether or not the LIKE can be transformedThe right side of the LIKE pattern)Determine whether or not this LIKE can be transformed into optimizable clauses. |
| public static String | Returns: The String for the < clauseThe right side of the LIKE pattern, String The escape clause escape, int Maximum length of column, for null padding maxWidth)Return the substring from the pattern for the < clause. |
| public static String | |
| public static String | |
| public static Boolean | Returns: null if val or pat null, otherwise true if match and false if not.value to compare. if null, result is null. val, int length of val valLength, char[] pattern to compare. if null, result is null. pat, int length of pat patLength, char[] escape character. Must be 1 char long.
if null, no escape character is used. escape, int length of escape escapeLength, RuleBasedCollator null if we are dealing with UCS_BASIC
character string types. If not null, then we use it to
get collation elements for characters in val and
non-metacharacters in pat to do the comparison. collator)This method gets called for UCS_BASIC and territory based character string types to look for a pattern in a value string. |
| private static Boolean | like(char[] val, int vLoc, int vEnd, char[] pat, int pLoc, int pEnd, char[] escape, int escapeLength, RuleBasedCollator collator)
|
| public static Boolean | |
| private static String | Returns: the string padded with 0s up to the given lengthThe string to pad string, int Max number of characters to pad to len)Pad a string with null characters, in order to make it > and < comparable with SQLChar. |
| public static String | Returns: a stripped of ESC char string if no pattern chars, null otherwisepattern String to search pattern, char the escape character escChar)stripEscapesNoPatternChars |
| anyChar | back to summary |
|---|---|
| private static final char anyChar | |
| anyString | back to summary |
|---|---|
| private static final char anyString | |
| SUPER_STRING | back to summary |
|---|---|
| private static final String SUPER_STRING | |
| Like | back to summary |
|---|---|
| private Like() | |
| checkEquality | back to summary |
|---|---|
| private static boolean checkEquality(char[] val, int vLoc, char[] pat, int pLoc, RuleBasedCollator collator) If the character in val matches the character in pat, then it does not matter if the database is UCS_BASIC or territory based, we simply return TRUE from the method. If the characters do not match and we are running with UCS_BASIC collation, then we will return FALSE. But if the database is territory based, then we want to use the Collator for the territory to determine if the Collator treats the 2 characters as equal (ie if their collation elements match, then the 2 characters are equal even if they are not the same character).
| |
| checkLengths | back to summary |
|---|---|
| pack-priv static Boolean checkLengths(int vLoc, int vEnd, int pLoc, char[] pat, int pEnd) checkLengths Returns null if we are not done. Returns true if we are at the end of our value and pattern Returns false if there is more pattern left but out of input value
| |
| getMinLen | back to summary |
|---|---|
| pack-priv static int getMinLen(char[] pattern, int pStart, int pEnd, boolean haveEsc, char escChar) Calculate the shortest length string that could match this pattern | |
| greaterEqualString | back to summary |
|---|---|
| public static String greaterEqualString(String pattern, String escape, int maxWidth) throws StandardException Return the substring from the pattern for the optimization >= clause. | |
| greaterEqualString | back to summary |
|---|---|
| private static String greaterEqualString(String pattern, char escChar) throws StandardException greaterEqualString -- for Escape clause only Walk the pattern character by character
| |
| greaterEqualStringFromParameter | back to summary |
|---|---|
| public static String greaterEqualStringFromParameter(String pattern, int maxWidth) throws StandardException | |
| greaterEqualStringFromParameterWithEsc | back to summary |
|---|---|
| public static String greaterEqualStringFromParameterWithEsc(String pattern, String escape, int maxWidth) throws StandardException | |
| isLikeComparisonNeeded | back to summary |
|---|---|
| public static boolean isLikeComparisonNeeded(String pattern) Return whether or not the like comparison is still needed after performing the like transformation on a constant string. The comparison is not needed if the constant string is of the form: CONSTANT% (constant followed by a trailing %)
| |
| isOptimizable | back to summary |
|---|---|
| public static boolean isOptimizable(String pattern) Determine whether or not this LIKE can be transformed into optimizable clauses. It can if the pattern is non-null and if the length == 0 or the first character is not a wild card.
| |
| lessThanString | back to summary |
|---|---|
| public static String lessThanString(String pattern, String escape, int maxWidth) throws StandardException Return the substring from the pattern for the < clause.
| |
| lessThanStringFromParameter | back to summary |
|---|---|
| public static String lessThanStringFromParameter(String pattern, int maxWidth) throws StandardException | |
| lessThanStringFromParameterWithEsc | back to summary |
|---|---|
| public static String lessThanStringFromParameterWithEsc(String pattern, String escape, int maxWidth) throws StandardException | |
| like | back to summary |
|---|---|
| public static Boolean like(char[] val, int valLength, char[] pat, int patLength, char[] escape, int escapeLength, RuleBasedCollator collator) throws StandardException This method gets called for UCS_BASIC and territory based character string types to look for a pattern in a value string. It also deals with escape character if user has provided one.
| |
| like | back to summary |
|---|---|
| private static Boolean like(char[] val, int vLoc, int vEnd, char[] pat, int pLoc, int pEnd, char[] escape, int escapeLength, RuleBasedCollator collator) throws StandardException | |
| like | back to summary |
|---|---|
| public static Boolean like(char[] value, int valueLength, char[] pattern, int patternLength, RuleBasedCollator collator) throws StandardException | |
| padWithNulls | back to summary |
|---|---|
| private static String padWithNulls(String string, int len) Pad a string with null characters, in order to make it > and < comparable with SQLChar. | |
| stripEscapesNoPatternChars | back to summary |
|---|---|
| public static String stripEscapesNoPatternChars(String pattern, char escChar) throws StandardException stripEscapesNoPatternChars
| |