Java Doc for Query.java in  » Development » JoSQL » org » josql » 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 » Development » JoSQL » org.josql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.josql.Query

All known Subclasses:   org.josql.contrib.JoSQLJRDataSource,  org.josql.contrib.JoSQLFreeChartPieDataset,  org.josql.contrib.JoSQLSwingTableModel,  org.josql.contrib.JoSQLFreeChartXYDataset,  org.josql.contrib.JoSQLAntFileSelector,  org.josql.contrib.JoSQLFreeChartCategoryDataset,
Query
public class Query (Code)
This class provides the ability for a developer to apply an arbitrary SQL statement (using suitable syntax) to a collection of Java objects.

Basic usage:

 Query q = new Query ();
 q.parse (myStatement);
 List results = q.execute (myObjects);
 

An example statement would look like:

 SELECT lastModified,
 name
 FROM   java.io.File
 WHERE  name LIKE '%.html'
 

The JoSQL functionality is large and complex, whilst basic queries like the one above are perfectly possible, very complex queries are also possible, for example:

 SELECT name,
 formatDate(lastModified),
 formatNumber(length),
 formatNumber(length - @avg_length),
 formatTimeDuration(@max_last_modified - lastModified)
 FROM   java.io.File
 WHERE  lastModified > @avg_last_modified
 AND    length > @avg_length
 AND    lower(name) LIKE '%.html'
 GROUP BY path
 ORDER BY name, lastModified DESC
 EXECUTE ON ALL avg (:_allobjs, length) avg_length,
 avg (:_allobjs, lastModified) avg_last_modified,
 max (:_allobjs, lastModified) max_last_modified
 

Note: the "EXECUTE ON ALL" syntax is an extension used by JoSQL because it has no notion of "aggregate functions".

For full details of how a query works and what is possible, see the JoSQL User Manual.

Please note that the package structure for JoSQL is deliberate, JoSQL is designed to be a black box and lightweight thus only the Query object and associated exceptions are exposed in the main package. Also, the class structure for JoSQL is not designed to exactly represent the SQL statement passed to it, rather the classes are optimised for ease of execution of the statement. If you wish to have a completely accurate Java object view of ANY SQL statement then please see: JSqlParser which will provide what you need.



Field Summary
final public static  StringALL
    
public static  StringALL_OBJS_VAR_NAME
    
public static  StringCURR_OBJ_VAR_NAME
    
final public static  StringGROUP_BY_RESULTS
    
public static  StringGRPBY_OBJ_VAR_NAME
    
public static  StringGRPBY_OBJ_VAR_NAME_SYNONYM
    
final public static  StringHAVING_RESULTS
    
final public static  StringINT_BIND_VAR_PREFIX
    
final public static  StringORDER_BY_ASC
    
final public static  StringORDER_BY_DESC
    
public static  StringPARENT_BIND_VAR_NAME
    
public static  StringQUERY_BIND_VAR_NAME
    
final public static  StringRESULTS
    
final public static  StringWHERE_RESULTS
    
final public static  ListnullQueryList
    

Constructor Summary
public  Query()
     Create a new blank Query object.

Method Summary
public  voidaddBindVariableChangedListener(BindVariableChangedListener bvl)
    
public  voidaddFunctionHandler(Object o)
    
public  voidaddSaveValueChangedListener(SaveValueChangedListener svl)
    
protected  voidaddTiming(String id, double time)
    
public  voiddoExecuteOn(List l, String t)
     Execute all the expressions for the specified type, either: Query.ALL or: Query.RESULTS .
public  QueryResultsexecute(List objs)
     Execute this query on the specified objects.
Parameters:
  objs - The list of objects to execute the query on.
protected  voidfireBindVariableChangedEvent(String name, Object from, Object to)
    
protected  voidfireSaveValueChangedEvent(Object id, Object from, Object to)
    
public  MapgetAliases()
    
public  ListgetAllObjects()
     Get the current list of objects in context (value of the :_allobjs special bind variable).
public  StringgetAnonymousBindVariableName()
    
public  ClassLoadergetClassLoader()
    
public  ListgetColumns()
    
public  ObjectgetCurrentObject()
     Get the current object (value of the :_currobj special bind variable).
public  ListgetDefaultFunctionHandlers()
    
public  MapgetExecuteOnFunctions()
    
public  ExpressiongetFrom()
    
public  ClassgetFromObjectClass()
    
public  FunctionHandlergetFunctionHandler(String id)
    
public  ListgetFunctionHandlers()
    
public  ListgetGroupByColumns()
    
public  ObjectgetGroupBySaveValue(Object id, List gbs)
     Get the save value for a particular key and group by list.
Parameters:
  id - The id of the save value.
Parameters:
  gbs - The group by list key.
public  MapgetGroupBySaveValues(List gbs)
     Get the save values for the specified group bys.
Parameters:
  gbs - The group bys.
public  ObjectgetGroupByVariable(int ind)
     Get the value of a group by variable from the current group bys.
Parameters:
  ind - The variable index.
public  ExpressiongetHavingClause()
     Return the HAVING clause expression.
public  LimitgetLimit()
     Get the object that represents the limit clause.
public  ListgetOrderByColumns()
     Get the "order bys".
public  ComparatorgetOrderByComparator()
     Return the Comparator we will use to do the ordering of the results, may be null.
public  QuerygetParent()
     Get the parent query.
public  StringgetQuery()
     Get the query string that this Query object represents.
public  QueryResultsgetQueryResults()
     Get the results of Query.execute(java.util.List) executing this query.
public  ObjectgetSaveValue(Object id)
     Get the save values for a particular key.
public  QuerygetTopLevelQuery()
     Get the top level query if "this" is a sub-query, the query chain is traversed until the top level query is found, i.e.
public  ObjectgetVariable(int index)
     Get the value of an indexed bind variable.
Parameters:
  index - The index.
public  ObjectgetVariable(String name)
     Get the value of a named bind variable.
Parameters:
  name - The name of the bind variable.
public  ClassgetVariableClass(String name)
     Get the class that the named variable has.
Parameters:
  name - The name of the variable.
public  MapgetVariables()
     Get all the bind variables as a Map.
public  ExpressiongetWhereClause()
     Return the WHERE clause expression.
public  chargetWildcardCharacter()
     Get the character that represents a wildcard in LIKE searches.
public  voidinit()
    
public  voidinitOrderByComparator()
     Will cause the order by comparator used to order the results to be initialized.
public  booleanisWantObjects()
     Return whether the query should return objects.
public  booleanisWhereTrue(Object o)
     A helper method that will evaluate the WHERE clause for the object passed in.
Parameters:
  o - The object to evaluate the WHERE clause against.
public  ClassloadClass(String name)
    
public  voidparse(String q)
     Parse the JoSQL query.
public  booleanparsed()
     Return whether this Query object has had a statement applied to it and has been parsed.
public  voidremoveBindVariableChangedListener(BindVariableChangedListener bvl)
    
public  voidremoveSaveValueChangedListener(SaveValueChangedListener svl)
    
public  QueryResultsreorder(List objs, SortedMap dirs)
     Re-order the objects according to the columns supplied in the dirs Map. The Map should be keyed on an Integer and map to a String value, the String value should be either: Query.ORDER_BY_ASC for the column to be in ascending order or: Query.ORDER_BY_DESC for the column to be in descending order.
public  QueryResultsreorder(List objs, String orderBys)
     Allows the re-ordering of the results via a textual representation of the order bys. This is effectively like providing a new ORDER BY clause to the sql.

For example:

 SELECT name,
 directory,
 file
 length
 FROM   java.io.File
 
Can be (re)ordered via the following code:
 Query q = new Query ();
 q.parse (sql);
 // Note: this call will cause the entire statement to be executed.
 q.reorder (myFiles,
 "name DESC, 3 ASC, length, 1 DESC");
 

Parameters:
  objs - The objects you wish to re-order.
Parameters:
  orderBys - The order bys.
public  voidsetAllObjects(List objs)
    
public  voidsetClassLoader(ClassLoader cl)
    
public  voidsetClassName(String n)
    
public  voidsetColumns(List cols)
    
public  voidsetCurrentGroupByObjects(List objs)
    
public  voidsetCurrentObject(Object o)
    
public  voidsetExecuteOnFunctions(Map ex)
    
public  voidsetFrom(Expression exp)
    
public  voidsetFromObjectClass(Class c)
     Set the "FROM" object class.
public  voidsetGroupByColumns(List cols)
    
public  voidsetGroupByLimit(Limit g)
    
public  voidsetGroupByOrderColumns(List cols)
    
public  voidsetHaving(Expression be)
     Set the expression for the HAVING clause.
public  voidsetLimit(Limit l)
     Set the object that represents the limit clause.
public  voidsetOrderByColumns(List cols)
    
public  voidsetParent(Query q)
     Set the parent query.
public  voidsetSaveValue(Object id, Object value)
    
public  voidsetSaveValues(Map s)
    
public  voidsetVariable(String name, Object v)
     Set the value of a named bind variable.
public  voidsetVariable(int index, Object v)
     Set the value of an indexed bind variable.
public  voidsetVariables(Map bVars)
     Set the bind variables in one go.
public  voidsetWantDistinctResults(boolean v)
     Indicate whether "distinct" results are required.
public  voidsetWantObjects(boolean v)
     Set whether the query should return objects (use true).
public  voidsetWantTimings(boolean v)
    
public  voidsetWhere(Expression be)
     Set the expression for the WHERE clause.
public  voidsetWildcardCharacter(char c)
     Set the character that represents a wildcard in LIKE searches.
public  StringtoString()
     Get a string version of this query suitable for debugging.

Field Detail
ALL
final public static String ALL(Code)



ALL_OBJS_VAR_NAME
public static String ALL_OBJS_VAR_NAME(Code)



CURR_OBJ_VAR_NAME
public static String CURR_OBJ_VAR_NAME(Code)



GROUP_BY_RESULTS
final public static String GROUP_BY_RESULTS(Code)



GRPBY_OBJ_VAR_NAME
public static String GRPBY_OBJ_VAR_NAME(Code)



GRPBY_OBJ_VAR_NAME_SYNONYM
public static String GRPBY_OBJ_VAR_NAME_SYNONYM(Code)



HAVING_RESULTS
final public static String HAVING_RESULTS(Code)



INT_BIND_VAR_PREFIX
final public static String INT_BIND_VAR_PREFIX(Code)



ORDER_BY_ASC
final public static String ORDER_BY_ASC(Code)



ORDER_BY_DESC
final public static String ORDER_BY_DESC(Code)



PARENT_BIND_VAR_NAME
public static String PARENT_BIND_VAR_NAME(Code)



QUERY_BIND_VAR_NAME
public static String QUERY_BIND_VAR_NAME(Code)



RESULTS
final public static String RESULTS(Code)



WHERE_RESULTS
final public static String WHERE_RESULTS(Code)



nullQueryList
final public static List nullQueryList(Code)




Constructor Detail
Query
public Query()(Code)
Create a new blank Query object.




Method Detail
addBindVariableChangedListener
public void addBindVariableChangedListener(BindVariableChangedListener bvl)(Code)



addFunctionHandler
public void addFunctionHandler(Object o)(Code)



addSaveValueChangedListener
public void addSaveValueChangedListener(SaveValueChangedListener svl)(Code)



addTiming
protected void addTiming(String id, double time)(Code)



doExecuteOn
public void doExecuteOn(List l, String t) throws QueryExecutionException(Code)
Execute all the expressions for the specified type, either: Query.ALL or: Query.RESULTS . If the expressions are aliased then the results will be available in the save results upon completion.
Parameters:
  l - The List of objects to execute the functions on.
Parameters:
  t - The type of expressions to execute.
throws:
  QueryExecutionException - If there is an issue with executing one of theexpressions or if the Query hasn't been inited yet.



execute
public QueryResults execute(List objs) throws QueryExecutionException(Code)
Execute this query on the specified objects.
Parameters:
  objs - The list of objects to execute the query on. The list of objects that match the query.
throws:
  QueryExecutionException - If the query cannot be executed.



fireBindVariableChangedEvent
protected void fireBindVariableChangedEvent(String name, Object from, Object to)(Code)



fireSaveValueChangedEvent
protected void fireSaveValueChangedEvent(Object id, Object from, Object to)(Code)



getAliases
public Map getAliases()(Code)



getAllObjects
public List getAllObjects()(Code)
Get the current list of objects in context (value of the :_allobjs special bind variable). Note: the value of the :_allobjs bind variable will change depending upon where the query execution is up to. The list of objects in context.



getAnonymousBindVariableName
public String getAnonymousBindVariableName()(Code)



getClassLoader
public ClassLoader getClassLoader()(Code)



getColumns
public List getColumns()(Code)



getCurrentObject
public Object getCurrentObject()(Code)
Get the current object (value of the :_currobj special bind variable). Note: the value of the :_currobj bind variable will change depending upon where the query execution is up to. The current object in context.



getDefaultFunctionHandlers
public List getDefaultFunctionHandlers()(Code)



getExecuteOnFunctions
public Map getExecuteOnFunctions()(Code)



getFrom
public Expression getFrom()(Code)



getFromObjectClass
public Class getFromObjectClass()(Code)



getFunctionHandler
public FunctionHandler getFunctionHandler(String id)(Code)



getFunctionHandlers
public List getFunctionHandlers()(Code)



getGroupByColumns
public List getGroupByColumns()(Code)



getGroupBySaveValue
public Object getGroupBySaveValue(Object id, List gbs)(Code)
Get the save value for a particular key and group by list.
Parameters:
  id - The id of the save value.
Parameters:
  gbs - The group by list key. The object the key maps to.



getGroupBySaveValues
public Map getGroupBySaveValues(List gbs)(Code)
Get the save values for the specified group bys.
Parameters:
  gbs - The group bys. The save values (name/value pairs).



getGroupByVariable
public Object getGroupByVariable(int ind)(Code)
Get the value of a group by variable from the current group bys.
Parameters:
  ind - The variable index. The value.



getHavingClause
public Expression getHavingClause()(Code)
Return the HAVING clause expression. The HAVING clause as an expression.



getLimit
public Limit getLimit()(Code)
Get the object that represents the limit clause. The object.



getOrderByColumns
public List getOrderByColumns()(Code)
Get the "order bys". This will return a List of OrderBy objects. This is generally only useful when you want to Query.reorder(List,String) the search and wish to get access to the textual representation of the order bys.

It is therefore possible to modify the orderbys in place, perhaps by using a different expression or changing the direction (since the objects are not cloned before being returned). However do so at YOUR OWN RISK. If you do so, then ensure you call: Query.setOrderByColumns(List) , then: Query.initOrderByComparator() before re-executing the statement, otherwise nothing will happen! The order bys.




getOrderByComparator
public Comparator getOrderByComparator()(Code)
Return the Comparator we will use to do the ordering of the results, may be null. The Comparator.



getParent
public Query getParent()(Code)
Get the parent query. The query, will be null if there is no parent.



getQuery
public String getQuery()(Code)
Get the query string that this Query object represents. The query string.



getQueryResults
public QueryResults getQueryResults()(Code)
Get the results of Query.execute(java.util.List) executing this query. The query results.



getSaveValue
public Object getSaveValue(Object id)(Code)
Get the save values for a particular key. The object the key maps to.



getTopLevelQuery
public Query getTopLevelQuery()(Code)
Get the top level query if "this" is a sub-query, the query chain is traversed until the top level query is found, i.e. when Query.getParent() returns null. The top level query, will be null if there is no parent.



getVariable
public Object getVariable(int index)(Code)
Get the value of an indexed bind variable.
Parameters:
  index - The index. The value.



getVariable
public Object getVariable(String name)(Code)
Get the value of a named bind variable.
Parameters:
  name - The name of the bind variable. The value.



getVariableClass
public Class getVariableClass(String name)(Code)
Get the class that the named variable has.
Parameters:
  name - The name of the variable. The Class.



getVariables
public Map getVariables()(Code)
Get all the bind variables as a Map. The name/value mappings of the bind variables.



getWhereClause
public Expression getWhereClause()(Code)
Return the WHERE clause expression. The WHERE clause as an expression.



getWildcardCharacter
public char getWildcardCharacter()(Code)
Get the character that represents a wildcard in LIKE searches. The char.



init
public void init() throws QueryParseException(Code)



initOrderByComparator
public void initOrderByComparator() throws QueryParseException(Code)
Will cause the order by comparator used to order the results to be initialized. This is generally only useful if you are specifying the the order bys yourself via: Query.setOrderByColumns(List) . Usage of this method is NOT supported, so don't use unless you really know what you are doing!



isWantObjects
public boolean isWantObjects()(Code)
Return whether the query should return objects. true if the query should return objects.



isWhereTrue
public boolean isWhereTrue(Object o) throws QueryExecutionException(Code)
A helper method that will evaluate the WHERE clause for the object passed in.
Parameters:
  o - The object to evaluate the WHERE clause against. The result of calling: Expression.isTrue(Object,Query) for the WHERE clause.



loadClass
public Class loadClass(String name) throws Exception(Code)



parse
public void parse(String q) throws QueryParseException(Code)
Parse the JoSQL query.
Parameters:
  q - The query string.
throws:
  QueryParseException - If the query cannot be parsed and/or Query.init() inited.



parsed
public boolean parsed()(Code)
Return whether this Query object has had a statement applied to it and has been parsed. Whether the query is associated with a statement.



removeBindVariableChangedListener
public void removeBindVariableChangedListener(BindVariableChangedListener bvl)(Code)



removeSaveValueChangedListener
public void removeSaveValueChangedListener(SaveValueChangedListener svl)(Code)



reorder
public QueryResults reorder(List objs, SortedMap dirs) throws QueryExecutionException, QueryParseException(Code)
Re-order the objects according to the columns supplied in the dirs Map. The Map should be keyed on an Integer and map to a String value, the String value should be either: Query.ORDER_BY_ASC for the column to be in ascending order or: Query.ORDER_BY_DESC for the column to be in descending order. The Integer refers to a column in the SELECT part of the statement.

For example:

 SELECT name,
 directory,
 file
 length
 FROM   java.io.File
 
Can be (re)ordered via the following code:
 Query q = new Query ();
 q.parse (sql);
 Map reorderBys = new TreeMap ();
 reorderBys.put (new Integer (2), Query.ORDER_BY_ASC);
 reorderBys.put (new Integer (3), Query.ORDER_BY_DESC);
 reorderBys.put (new Integer (1), Query.ORDER_BY_ASC);
 reorderBys.put (new Integer (4), Query.ORDER_BY_DESC);
 // Note: this call will cause the entire statement to be executed.
 q.reorder (myFiles,
 reorderBys);
 

Parameters:
  objs - The objects you wish to reorder.
Parameters:
  dirs - The order bys. The QueryResults.
throws:
  QueryParseException - If the statement can be parsed, i.e. if any of the order bycolumns is out of range.
throws:
  QueryExecutionException - If the call to: Query.execute(List) fails.
See Also:   Query.reorder(List,String)



reorder
public QueryResults reorder(List objs, String orderBys) throws QueryParseException, QueryExecutionException(Code)
Allows the re-ordering of the results via a textual representation of the order bys. This is effectively like providing a new ORDER BY clause to the sql.

For example:

 SELECT name,
 directory,
 file
 length
 FROM   java.io.File
 
Can be (re)ordered via the following code:
 Query q = new Query ();
 q.parse (sql);
 // Note: this call will cause the entire statement to be executed.
 q.reorder (myFiles,
 "name DESC, 3 ASC, length, 1 DESC");
 

Parameters:
  objs - The objects you wish to re-order.
Parameters:
  orderBys - The order bys. The execution results.
throws:
  QueryParseException - If the statement can be parsed, i.e. if any of the order bycolumns is out of range or the order bys cannot be parsed.
throws:
  QueryExecutionException - If the call to: Query.execute(List) fails.
See Also:   Query.reorder(List,SortedMap)



setAllObjects
public void setAllObjects(List objs)(Code)



setClassLoader
public void setClassLoader(ClassLoader cl)(Code)



setClassName
public void setClassName(String n)(Code)



setColumns
public void setColumns(List cols)(Code)



setCurrentGroupByObjects
public void setCurrentGroupByObjects(List objs)(Code)



setCurrentObject
public void setCurrentObject(Object o)(Code)



setExecuteOnFunctions
public void setExecuteOnFunctions(Map ex)(Code)



setFrom
public void setFrom(Expression exp)(Code)



setFromObjectClass
public void setFromObjectClass(Class c)(Code)
Set the "FROM" object class. It is advised that you NEVER call this method, do so at your own risk, dragons will swoop from the sky and crisp your innards if you do so!!! Seriously though ;), this method should ONLY be called by those who know what they are doing, whatever you think you know about how this method operates is irrelevant which is why the dangers of calling this method are not documented...

YOU HAVE BEEN WARNED!!! NO BUGS WILL BE ACCEPTED THAT ARISE FROM THE CALLING OF THIS METHOD!!!
Parameters:
  c - The FROM class.




setGroupByColumns
public void setGroupByColumns(List cols)(Code)



setGroupByLimit
public void setGroupByLimit(Limit g)(Code)



setGroupByOrderColumns
public void setGroupByOrderColumns(List cols)(Code)



setHaving
public void setHaving(Expression be)(Code)
Set the expression for the HAVING clause. Caution: do NOT use this method unless you are sure about what you are doing!
Parameters:
  be - The expression.



setLimit
public void setLimit(Limit l)(Code)
Set the object that represents the limit clause. Caution: Do NOT use unless you are sure about what you are doing!
Parameters:
  l - The object.



setOrderByColumns
public void setOrderByColumns(List cols)(Code)



setParent
public void setParent(Query q)(Code)
Set the parent query. Caution: Do NOT use unless you are sure about what you are doing!
Parameters:
  q - The parent query.



setSaveValue
public void setSaveValue(Object id, Object value)(Code)



setSaveValues
public void setSaveValues(Map s)(Code)



setVariable
public void setVariable(String name, Object v)(Code)
Set the value of a named bind variable.
Parameters:
  name - The name.
Parameters:
  v - The value.



setVariable
public void setVariable(int index, Object v)(Code)
Set the value of an indexed bind variable.
Parameters:
  index - The index.
Parameters:
  v - The value.



setVariables
public void setVariables(Map bVars)(Code)
Set the bind variables in one go.
Parameters:
  bVars - The bind variable name/value mappings.



setWantDistinctResults
public void setWantDistinctResults(boolean v)(Code)
Indicate whether "distinct" results are required.
Parameters:
  v - Set to true to make the results distinct.



setWantObjects
public void setWantObjects(boolean v)(Code)
Set whether the query should return objects (use true). Caution: Do NOT use unless you are sure about what you are doing!
Parameters:
  v - Set to true to indicate that the query should return objects.



setWantTimings
public void setWantTimings(boolean v)(Code)



setWhere
public void setWhere(Expression be)(Code)
Set the expression for the WHERE clause. Caution: do NOT use this method unless you are sure about what you are doing!
Parameters:
  be - The expression.



setWildcardCharacter
public void setWildcardCharacter(char c)(Code)
Set the character that represents a wildcard in LIKE searches.
Parameters:
  c - The char.



toString
public String toString()(Code)
Get a string version of this query suitable for debugging. This will reconstruct the query based on the objects it holds that represent the various clauses. The reconstructed query.



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.