Java Doc for SearchCriteriaBuilder.java in  » Database-ORM » ProjectJulp » org » julp » misc » search » 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 ORM » ProjectJulp » org.julp.misc.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.julp.misc.search.SearchCriteriaBuilder

All known Subclasses:   org.julp.examples.CustomerCriteria,  org.julp.misc.search.BasicSearchCriteriaBuilder,
SearchCriteriaBuilder
abstract public class SearchCriteriaBuilder (Code)


Field Summary
final protected static  StringSPACE
    
protected  SetadhocColumns
    
protected  Listarguments
    
protected  StringdynamicWhere
    
protected  Stringexecutable
    
protected  MapfieldOperators
    
protected  MapfieldValues
    
protected  Listfields
    
protected  Stringfrom
    
protected  StringgroupBy
    
protected  Stringhaving
    
protected  Stringjoins
    
protected  MaplikeHint
    
protected  MetaDatametaData
    
protected  ListoperatorsList
    
protected  StringorderBy
    
protected  Stringquery
    
protected  ListsearchCriteriaHolders
    
protected  Stringselect
    
protected  Stringwhere
    

Constructor Summary
public  SearchCriteriaBuilder()
     This object is not indended to be a *real* Query engine. It is indended to be used with GUI to allow end users uppend WHERE clause to SELECT statement. How it works?
  • User would add Criteria
  • Criteria would have
    1. List of fileds to search.

Method Summary
public  voidaddSearch()
    
public  voidbeforeBuildCriteria()
    
public  StringbuildCriteria()
    
public  java.util.ListgetArguments()
     Getter for property arguments.
public  java.lang.StringgetDynamicWhere()
     Getter for property dynamicWhere.
public  StringgetExecutable()
    
public  java.util.MapgetFieldOperators()
     Getter for property fieldOperators.
public  java.util.MapgetFieldValues()
     Getter for property fieldValues.
public  java.util.ListgetFields()
     Getter for property fields.
public  java.lang.StringgetFrom()
     Getter for property from.
public  java.lang.StringgetGroupBy()
     Getter for property groupBy.
public  java.lang.StringgetHaving()
     Getter for property having.
public  java.lang.StringgetJoins()
     Getter for property joins.
public  java.util.MapgetLikeHint()
     Getter for property likeHint.
public  intgetLikeHint(String operatorName)
    
public  org.julp.MetaDatagetMetaData()
     Getter for property metaData.
public  java.util.ListgetOperatorsList()
     Getter for property operatorsList.
public  java.lang.StringgetOrderBy()
     Getter for property orderBy.
public  java.lang.StringgetQuery()
     Getter for property query.
public  java.util.ListgetSearchCriteriaHolders()
     Getter for property searchCriteriaHolders.
public  java.lang.StringgetSelect()
     Getter for property select.
public  java.lang.StringgetWhere()
     Getter for property where.
public  voidremoveSearch(int idx)
    
protected  Stringreplace(String functions, String columnName)
    
public  voidreset()
    
public  voidsetArguments(java.util.List arguments)
     Setter for property arguments.
public  voidsetDynamicWhere(java.lang.String dynamicWhere)
     Setter for property dynamicWhere.
public  voidsetExecutable(String executable)
    
public  voidsetFieldOperators(java.util.Map fieldOperators)
     Setter for property fieldOperators.
public  voidsetFieldValues(java.util.Map fieldValues)
     Setter for property fieldValues.
public  voidsetFields(java.util.List fields)
     Setter for property fields.
public  voidsetFrom(java.lang.String from)
     Setter for property from.
public  voidsetGroupBy(java.lang.String groupBy)
     Setter for property groupBy.
public  voidsetHaving(java.lang.String having)
     Setter for property having.
public  voidsetJoins(java.lang.String joins)
     Setter for property joins.
public  voidsetLikeHint(String operatorName, int likeHint)
     Setter for property likeHint.
public  voidsetLikeHint(java.util.Map likeHint)
    
public  voidsetMetaData(org.julp.MetaData metaData)
     Setter for property metaData.
public  voidsetOperatorsList(java.util.List operatorsList)
     Setter for property operatorsList.
public  voidsetOrderBy(java.lang.String orderBy)
     Setter for property orderBy.
public  voidsetQuery(java.lang.String query)
     Setter for property query.
public  voidsetSearchCriteriaHolders(java.util.List searchCriteriaHolders)
     Setter for property searchCriteriaHolders.
public  voidsetSelect(java.lang.String select)
     Setter for property select.
public  StringsetSort(List sort)
    
public  StringsetSort(List sort, boolean findMapping)
    
public  StringsetSort(List sort, boolean findMapping, boolean replace)
     Cnange original "ORDER BY" clause.
public  voidsetWhere(java.lang.String where)
     Setter for property where.
public  intsize()
    
public  StringtoString()
    

Field Detail
SPACE
final protected static String SPACE(Code)



adhocColumns
protected Set adhocColumns(Code)



arguments
protected List arguments(Code)



dynamicWhere
protected String dynamicWhere(Code)



executable
protected String executable(Code)



fieldOperators
protected Map fieldOperators(Code)



fieldValues
protected Map fieldValues(Code)



fields
protected List fields(Code)



from
protected String from(Code)



groupBy
protected String groupBy(Code)



having
protected String having(Code)



joins
protected String joins(Code)



likeHint
protected Map likeHint(Code)



metaData
protected MetaData metaData(Code)



operatorsList
protected List operatorsList(Code)



orderBy
protected String orderBy(Code)



query
protected String query(Code)



searchCriteriaHolders
protected List searchCriteriaHolders(Code)



select
protected String select(Code)



where
protected String where(Code)




Constructor Detail
SearchCriteriaBuilder
public SearchCriteriaBuilder()(Code)
This object is not indended to be a *real* Query engine. It is indended to be used with GUI to allow end users uppend WHERE clause to SELECT statement. How it works?
  • User would add Criteria
  • Criteria would have
    1. List of fileds to search. User must select one of the fields
    2. List of operators for each field (fieldOperators). You can specify which operators can be used with selected field. For example you can remove "LIKE" operator for numeric field
    3. Some fields can have list of values to select from (fieldValues). Example: field "State" can have a drop-down control (combobox) with list of states
    4. Boolean condition AND/OR. User must select one of them if there will be another Criteria
  • Use beforeBuildCriteria() in descendants to modify/validate user input
  • After user done buildCriteria() would generate WHERE clause, which would be added to pre-defined SELECT statement
  • To make it user-friendly fields, operators, etc. should have "display values" and "real values" Example: fields.add(new SomeObject("firstName", "First Name")); fields.add(new SomeObject("lastName", "Last Name")); fields.add(new SomeObject("state", "State"));
    ...




Method Detail
addSearch
public void addSearch()(Code)



beforeBuildCriteria
public void beforeBuildCriteria()(Code)



buildCriteria
public String buildCriteria()(Code)



getArguments
public java.util.List getArguments()(Code)
Getter for property arguments. Value of property arguments.



getDynamicWhere
public java.lang.String getDynamicWhere()(Code)
Getter for property dynamicWhere. Value of property dynamicWhere.



getExecutable
public String getExecutable()(Code)



getFieldOperators
public java.util.Map getFieldOperators()(Code)
Getter for property fieldOperators. Value of property fieldOperators.



getFieldValues
public java.util.Map getFieldValues()(Code)
Getter for property fieldValues. Value of property fieldValues.



getFields
public java.util.List getFields()(Code)
Getter for property fields. Value of property fields.



getFrom
public java.lang.String getFrom()(Code)
Getter for property from. Value of property from.



getGroupBy
public java.lang.String getGroupBy()(Code)
Getter for property groupBy. Value of property groupBy.



getHaving
public java.lang.String getHaving()(Code)
Getter for property having. Value of property having.



getJoins
public java.lang.String getJoins()(Code)
Getter for property joins. Value of property joins.



getLikeHint
public java.util.Map getLikeHint()(Code)
Getter for property likeHint. Value of property likeHint.



getLikeHint
public int getLikeHint(String operatorName)(Code)



getMetaData
public org.julp.MetaData getMetaData()(Code)
Getter for property metaData. Value of property metaData.



getOperatorsList
public java.util.List getOperatorsList()(Code)
Getter for property operatorsList. Value of property operatorsList.



getOrderBy
public java.lang.String getOrderBy()(Code)
Getter for property orderBy. Value of property orderBy.



getQuery
public java.lang.String getQuery()(Code)
Getter for property query. Value of property query.



getSearchCriteriaHolders
public java.util.List getSearchCriteriaHolders()(Code)
Getter for property searchCriteriaHolders. Value of property searchCriteriaHolders.



getSelect
public java.lang.String getSelect()(Code)
Getter for property select. Value of property select.



getWhere
public java.lang.String getWhere()(Code)
Getter for property where. Value of property where.



removeSearch
public void removeSearch(int idx)(Code)



replace
protected String replace(String functions, String columnName)(Code)



reset
public void reset()(Code)



setArguments
public void setArguments(java.util.List arguments)(Code)
Setter for property arguments.
Parameters:
  arguments - New value of property arguments.



setDynamicWhere
public void setDynamicWhere(java.lang.String dynamicWhere)(Code)
Setter for property dynamicWhere.
Parameters:
  dynamicWhere - New value of property dynamicWhere.



setExecutable
public void setExecutable(String executable)(Code)



setFieldOperators
public void setFieldOperators(java.util.Map fieldOperators)(Code)
Setter for property fieldOperators.
Parameters:
  fieldOperators - New value of property fieldOperators.



setFieldValues
public void setFieldValues(java.util.Map fieldValues)(Code)
Setter for property fieldValues.
Parameters:
  fieldValues - New value of property fieldValues.



setFields
public void setFields(java.util.List fields)(Code)
Setter for property fields.
Parameters:
  fields - New value of property fields.



setFrom
public void setFrom(java.lang.String from)(Code)
Setter for property from.
Parameters:
  from - New value of property from.



setGroupBy
public void setGroupBy(java.lang.String groupBy)(Code)
Setter for property groupBy.
Parameters:
  groupBy - New value of property groupBy.



setHaving
public void setHaving(java.lang.String having)(Code)
Setter for property having.
Parameters:
  having - New value of property having.



setJoins
public void setJoins(java.lang.String joins)(Code)
Setter for property joins.
Parameters:
  joins - New value of property joins.



setLikeHint
public void setLikeHint(String operatorName, int likeHint)(Code)
Setter for property likeHint.
Parameters:
  likeHint - New value of property likeHint.



setLikeHint
public void setLikeHint(java.util.Map likeHint)(Code)



setMetaData
public void setMetaData(org.julp.MetaData metaData)(Code)
Setter for property metaData.
Parameters:
  metaData - New value of property metaData.



setOperatorsList
public void setOperatorsList(java.util.List operatorsList)(Code)
Setter for property operatorsList.
Parameters:
  operatorsList - New value of property operatorsList.



setOrderBy
public void setOrderBy(java.lang.String orderBy)(Code)
Setter for property orderBy.
Parameters:
  orderBy - New value of property orderBy.



setQuery
public void setQuery(java.lang.String query)(Code)
Setter for property query.
Parameters:
  query - New value of property query.



setSearchCriteriaHolders
public void setSearchCriteriaHolders(java.util.List searchCriteriaHolders)(Code)
Setter for property searchCriteriaHolders.
Parameters:
  searchCriteriaHolders - New value of property searchCriteriaHolders.



setSelect
public void setSelect(java.lang.String select)(Code)
Setter for property select.
Parameters:
  select - New value of property select.



setSort
public String setSort(List sort)(Code)



setSort
public String setSort(List sort, boolean findMapping)(Code)



setSort
public String setSort(List sort, boolean findMapping, boolean replace)(Code)
Cnange original "ORDER BY" clause.



setWhere
public void setWhere(java.lang.String where)(Code)
Setter for property where.
Parameters:
  where - New value of property where.



size
public int size()(Code)



toString
public String toString()(Code)



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.