Java Doc for Like.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » types » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.types 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.types.Like

Like
public class Like (Code)
Like matching algorithm. Not too speedy for %s. SQL92 says the escape character can only and must be followed by itself, %, or _. So if you choose % or _ as the escape character, you can no longer do that sort of matching. Not the most recent Like -- missing the unit tests
author:
   ames




Method Summary
static  BooleancheckLengths(int vLoc, int vEnd, int pLoc, char[] pat, int pEnd)
     checkLengths -- non-national chars Returns null if we are not done.
static  BooleancheckLengths(int vLoc, int vEnd, int pLoc, int[] pat, int pEnd, int[] anyStringInts)
     checkLengths -- national chars Returns null if we are not done.
static  intgetMinLen(char[] pattern, int pStart, int pEnd, boolean haveEsc, char escChar)
    
static  intgetMinLen(int[] pattern, int pStart, int pEnd, boolean haveEsc, int[] escCharInts, int[] anyStringInts)
    
public static  StringgreaterEqualString(String pattern, String escape, int maxWidth)
     Return the substring from the pattern for the optimization >= clause.
public static  StringgreaterEqualStringFromParameter(String pattern, int maxWidth)
    
public static  StringgreaterEqualStringFromParameterWithEsc(String pattern, String escape, int maxWidth)
    
public static  booleanisLikeComparisonNeeded(String pattern)
     Return whether or not the like comparison is still needed after performing the like transformation on a constant string.
public static  booleanisOptimizable(String pattern)
     Determine whether or not this LIKE can be transformed into optimizable clauses.
public static  StringlessThanString(String pattern, String escape, int maxWidth)
     Return the substring from the pattern for the < clause.
public static  StringlessThanStringFromParameter(String pattern, int maxWidth)
    
public static  StringlessThanStringFromParameterWithEsc(String pattern, String escape, int maxWidth)
    
public static  Booleanlike(char[] val, int valLength, char[] pat, int patLength, char[] escape, int escapeLength)
    
Parameters:
  val - value to compare.
public static  Booleanlike(int[] val, int valLength, int[] pat, int patLength, int[] escape, int escapeLength, RuleBasedCollator collator)
     For national chars.
Parameters:
  val - value to compare.
public static  Booleanlike(char[] value, int valueLength, char[] pattern, int patternLength)
    
public static  Booleanlike(int[] value, int valueLength, int[] pattern, int patternLength, RuleBasedCollator collator)
    
public static  StringstripEscapesNoPatternChars(String pattern, char escChar)
    



Method Detail
checkLengths
static Boolean checkLengths(int vLoc, int vEnd, int pLoc, char[] pat, int pEnd)(Code)
checkLengths -- non-national chars 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
Parameters:
  vLoc - current index into char[] val
Parameters:
  vEnd - end index or our value
Parameters:
  pLoc - current index into our char[] pattern
Parameters:
  pat - pattern char []
Parameters:
  pEnd - end index of our pattern []



checkLengths
static Boolean checkLengths(int vLoc, int vEnd, int pLoc, int[] pat, int pEnd, int[] anyStringInts)(Code)
checkLengths -- national chars 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
Parameters:
  vLoc - current index into int[] val
Parameters:
  vEnd - end index or our value
Parameters:
  pLoc - current index into our int[] pattern
Parameters:
  pat - pattern int []
Parameters:
  pEnd - end index of our pattern []



getMinLen
static int getMinLen(char[] pattern, int pStart, int pEnd, boolean haveEsc, char escChar)(Code)
Calculate the shortest length string that could match this pattern for non-national chars



getMinLen
static int getMinLen(int[] pattern, int pStart, int pEnd, boolean haveEsc, int[] escCharInts, int[] anyStringInts)(Code)
Calculate the shortest length string that could match this pattern for national chars



greaterEqualString
public static String greaterEqualString(String pattern, String escape, int maxWidth) throws StandardException(Code)
Return the substring from the pattern for the optimization >= clause.
Parameters:
  pattern - The right side of the LIKE
Parameters:
  escape - The escape clause
Parameters:
  maxWidth - Maximum length of column, for null padding The String for the >= clause



greaterEqualStringFromParameter
public static String greaterEqualStringFromParameter(String pattern, int maxWidth) throws StandardException(Code)



greaterEqualStringFromParameterWithEsc
public static String greaterEqualStringFromParameterWithEsc(String pattern, String escape, int maxWidth) throws StandardException(Code)



isLikeComparisonNeeded
public static boolean isLikeComparisonNeeded(String pattern)(Code)
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 %)
Parameters:
  pattern - The right side of the LIKE Whether or not the like comparison is still needed.



isOptimizable
public static boolean isOptimizable(String pattern)(Code)
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.
Parameters:
  pattern - The right side of the LIKE Whether or not the LIKE can be transformed



lessThanString
public static String lessThanString(String pattern, String escape, int maxWidth) throws StandardException(Code)
Return the substring from the pattern for the < clause.
Parameters:
  pattern - The right side of the LIKE
Parameters:
  escape - The escape clause
Parameters:
  maxWidth - Maximum length of column, for null padding The String for the < clause
exception:
  StandardException - thrown if data invalid



lessThanStringFromParameter
public static String lessThanStringFromParameter(String pattern, int maxWidth) throws StandardException(Code)



lessThanStringFromParameterWithEsc
public static String lessThanStringFromParameterWithEsc(String pattern, String escape, int maxWidth) throws StandardException(Code)



like
public static Boolean like(char[] val, int valLength, char[] pat, int patLength, char[] escape, int escapeLength) throws StandardException(Code)

Parameters:
  val - value to compare. if null, result is null.
Parameters:
  valLength - length of val
Parameters:
  pat - pattern to compare. if null, result is null.
Parameters:
  patLength - length of pat
Parameters:
  escape - escape character. Must be 1 char long.if null, no escape character is used.
Parameters:
  escapeLength - length of escape null if val or pat null, otherwise true if matchand false if not.
exception:
  StandardException - thrown if data invalid



like
public static Boolean like(int[] val, int valLength, int[] pat, int patLength, int[] escape, int escapeLength, RuleBasedCollator collator) throws StandardException(Code)
For national chars.
Parameters:
  val - value to compare. if null, result is null.
Parameters:
  valLength - length of val
Parameters:
  pat - pattern to compare. if null, result is null.
Parameters:
  patLength - length of pat
Parameters:
  escape - escape character. Must be 1 char long.if null, no escape character is used.
Parameters:
  escapeLength - length of escape
Parameters:
  collator - The collator to use. null if val or pat null, otherwise true if matchand false if not.
exception:
  StandardException - thrown if data invalid



like
public static Boolean like(char[] value, int valueLength, char[] pattern, int patternLength) throws StandardException(Code)



like
public static Boolean like(int[] value, int valueLength, int[] pattern, int patternLength, RuleBasedCollator collator) throws StandardException(Code)



stripEscapesNoPatternChars
public static String stripEscapesNoPatternChars(String pattern, char escChar) throws StandardException(Code)
stripEscapesNoPatternChars
Parameters:
  pattern - pattern String to search
Parameters:
  escChar - the escape character a stripped of ESC char string if no pattern chars, null otherwise
exception:
  StandardException - thrown if data invalid



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.