Java Doc for QueryExpression.java in  » Database-ORM » JPOX » org » jpox » store » expression » 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 » JPOX » org.jpox.store.expression 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jpox.store.expression.QueryExpression

QueryExpression
public interface QueryExpression (Code)
Expression for a query in language-independent form.




Method Summary
 voidaddExtension(String key, Object value)
     Method to define an extension for this query statement allowing control over its behaviour in generating a query.
 voidaddGroupingExpression(ScalarExpression expr)
     Method to add a grouping clause to the statement.
 voidandCondition(BooleanExpression condition)
     add an condition to the query.
 voidandCondition(BooleanExpression condition, boolean unionQueries)
    
 voidcrossJoin(LogicSetExpression tableExpr, boolean unionQueries)
    
 StringgetCandidateAlias()
     Accessor for the candidate alias in use by the query.
 ClassgetCandidateClass()
     Accessor for the candidate class of the query expression.
 ClassLoaderResolvergetClassLoaderResolver()
     Accessor for the ClassLoaderResolver to use with this query statement.
 HashMapgetExtensions()
     Accessor for the extensions for this expression.
 ScalarExpression[]getGroupingExpressions()
     Accessor for the grouping expressions of this statement.
 BooleanExpressiongetHavingExpression()
     Accessor for the having expression of this statement.
 DatastoreIdentifiergetMainTableAlias()
     Accessor for the alias of the main table of this query.
 LogicSetExpressiongetMainTableExpression()
     Accessor for the expression for the main table of this query.
 intgetNumberOfScalarExpressions()
     Accessor for the number of ScalarExpression projected.
 ScalarExpression[]getOrderingExpressions()
     Accessor for the ordering expressions of this statement.
 QueryExpressiongetParent()
     Accessor for the parent QueryExpression if this is a nested expression.
 StoreManagergetStoreManager()
     Accessor for the store manager associated with this query.
 LogicSetExpressiongetTableExpression(DatastoreIdentifier alias)
     Accessor to the table expression for the given alias.
 ObjectgetValueForExtension(String key)
     Accessor for the value for an extension.
 booleanhasCrossJoin(LogicSetExpression tableExpr)
    
 booleanhasMetaDataExpression()
    
 voidinnerJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals, boolean unionQueries)
     Method to do an inner join to another table, and optionally apply it to any unions for this query.
 voidinnerJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals)
     Method to do an inner join to another table.
 voidiorCondition(BooleanExpression condition)
     add an condition to the query.
 voidiorCondition(BooleanExpression condition, boolean unionQueries)
    
 voidleftOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals, boolean unionQueries)
     Method to do a left outer join to another table, and optionally apply it to any unions for this query.
 voidleftOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals)
     Method to do a left outer join to another table.
 LogicSetExpressionnewTableExpression(DatastoreContainerObject mainTable, DatastoreIdentifier alias)
    
 LogicSetExpression[]newTableExpression(DatastoreContainerObject mainTable, DatastoreIdentifier alias, boolean unionQueries)
    
 voidreset()
    
 voidrightOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals, boolean unionQueries)
     Method to do a right outer join to another table, and optionally apply it to any unions for this query.
 voidrightOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals)
     Method to do a right outer join to another table.
 int[]select(JavaTypeMapping mapping)
    
 int[]select(JavaTypeMapping mapping, boolean unionQueries)
    
 int[]select(DatastoreIdentifier alias, JavaTypeMapping mapping)
    
 int[]select(DatastoreIdentifier alias, JavaTypeMapping mapping, boolean unionQueries)
    
 int[]selectDatastoreIdentity(String alias, boolean unionQueries)
     Select the datastore identity column.
 int[]selectField(String fieldName, String alias, boolean unionQueries)
     Select the column(s) for the specified field in the primary table of the query.
Parameters:
  fieldName - Name of the field
Parameters:
  alias - Alias to use for these column(s)
Parameters:
  unionQueries - Whether to select the field column(s) of all unioned queries.
 intselectScalarExpression(ScalarExpression expr)
    
 intselectScalarExpression(ScalarExpression expr, boolean unionQueries)
    
 int[]selectVersion(String alias, boolean unionQueries)
     Select the version column.
 voidsetCandidateInformation(Class cls, String alias)
     Method to set the candidate class and alias in use by the query.
 voidsetDistinctResults(boolean distinctResults)
     Set whether this statement returns distinct results.
 voidsetExistsSubQuery(boolean isExistsSubQuery)
     Set this query is to be used as a as set for the Exists function.
 voidsetHaving(BooleanExpression expr)
     Method to set the having clause of the statement.
 voidsetOrdering(ScalarExpression[] exprs, boolean[] descending)
     Mutator for the ordering criteria.
 voidsetParent(QueryExpression parentQueryExpr)
     Sets the parent QueryExpression of this query.
 voidsetRangeConstraint(long offset, long count)
     Method to add a range constraint on any SELECT.
 voidsetUpdates(ScalarExpression[] exprs)
     set the update condition(s) for the query.
 StatementTexttoDeleteStatementText()
     Method to convert the criteria into a delete statement text.
 StatementTexttoStatementText(boolean lock)
     Method to convert the criteria into the statement text.
 StatementTexttoUpdateStatementText()
     Method to convert the criteria into an update statement text.
 voidunion(QueryExpression qe)
     Union two QueryExpressions this and qe. Both QueryExpressions must have the same ScalarExpressions selected, and they must be in the same select order.



Method Detail
addExtension
void addExtension(String key, Object value)(Code)
Method to define an extension for this query statement allowing control over its behaviour in generating a query.
Parameters:
  key - Extension key
Parameters:
  value - Value for the key



addGroupingExpression
void addGroupingExpression(ScalarExpression expr)(Code)
Method to add a grouping clause to the statement. Grouping clauses that are implied by the selected columns will be added automatically so this provides a means to supplement them.
Parameters:
  expr - The group by expression



andCondition
void andCondition(BooleanExpression condition)(Code)
add an condition to the query.
Parameters:
  condition - the Boolean expression



andCondition
void andCondition(BooleanExpression condition, boolean unionQueries)(Code)
add an condition to the query and queries involved in the union if unionQuery is true
Parameters:
  condition - the Boolean expression
Parameters:
  unionQueries - whether to apply the condition in all queries unified by the union clause



crossJoin
void crossJoin(LogicSetExpression tableExpr, boolean unionQueries)(Code)
Method to add tables/crossJoin but no joins to they, will be output as FROM TABLE1,TABLE2,TABLE3
Parameters:
  tableExpr - table expression
Parameters:
  unionQueries - Whether to apply the alias to unions of this query.



getCandidateAlias
String getCandidateAlias()(Code)
Accessor for the candidate alias in use by the query. Candidate alias



getCandidateClass
Class getCandidateClass()(Code)
Accessor for the candidate class of the query expression. Candidate class



getClassLoaderResolver
ClassLoaderResolver getClassLoaderResolver()(Code)
Accessor for the ClassLoaderResolver to use with this query statement. ClassLoader resolver



getExtensions
HashMap getExtensions()(Code)
Accessor for the extensions for this expression. Extensions



getGroupingExpressions
ScalarExpression[] getGroupingExpressions()(Code)
Accessor for the grouping expressions of this statement. The grouping expressions



getHavingExpression
BooleanExpression getHavingExpression()(Code)
Accessor for the having expression of this statement. The having expression



getMainTableAlias
DatastoreIdentifier getMainTableAlias()(Code)
Accessor for the alias of the main table of this query. Alias for the main table in the query



getMainTableExpression
LogicSetExpression getMainTableExpression()(Code)
Accessor for the expression for the main table of this query. This is the same as the default table expression except where this is a subquery. Main table expression



getNumberOfScalarExpressions
int getNumberOfScalarExpressions()(Code)
Accessor for the number of ScalarExpression projected. The number of columns in the SELECT



getOrderingExpressions
ScalarExpression[] getOrderingExpressions()(Code)
Accessor for the ordering expressions of this statement. The ordering expressions



getParent
QueryExpression getParent()(Code)
Accessor for the parent QueryExpression if this is a nested expression. Parent expression



getStoreManager
StoreManager getStoreManager()(Code)
Accessor for the store manager associated with this query. The store manager



getTableExpression
LogicSetExpression getTableExpression(DatastoreIdentifier alias)(Code)
Accessor to the table expression for the given alias.
Parameters:
  alias - the alias the TableExpression



getValueForExtension
Object getValueForExtension(String key)(Code)
Accessor for the value for an extension.
Parameters:
  key - Key for the extension Value for the extension (if any)



hasCrossJoin
boolean hasCrossJoin(LogicSetExpression tableExpr)(Code)
Method to add tables/alias but no joins to they, will be output as FROM TABLE1,TABLE2,TABLE3 Checks parent expressions until reach the root expression
Parameters:
  tableExpr - table expression



hasMetaDataExpression
boolean hasMetaDataExpression()(Code)
Whether this query will return a meta data expression in the SELECT clause hasMetaDataExpression



innerJoin
void innerJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals, boolean unionQueries)(Code)
Method to do an inner join to another table, and optionally apply it to any unions for this query.
Parameters:
  expr - the left hand expression
Parameters:
  expr2 - the right hand expression
Parameters:
  tblExpr - the
Parameters:
  equals - if the join is applied as filter, if use equals or not equals
Parameters:
  unionQueries - whether to apply the inner join in all queries unified by the union clause



innerJoin
void innerJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals)(Code)
Method to do an inner join to another table.
Parameters:
  expr - the left hand expression
Parameters:
  expr2 - the right hand expression
Parameters:
  tblExpr - The table expression for the table to apply the join
Parameters:
  equals - if the join is applied as filter, if use equals or not equals



iorCondition
void iorCondition(BooleanExpression condition)(Code)
add an condition to the query.
Parameters:
  condition - the Boolean expression



iorCondition
void iorCondition(BooleanExpression condition, boolean unionQueries)(Code)
add an condition to the query and queries involved in the union if unionQuery is true
Parameters:
  condition - the Boolean expression
Parameters:
  unionQueries - whether to apply the condition in all queries unified by the union clause



leftOuterJoin
void leftOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals, boolean unionQueries)(Code)
Method to do a left outer join to another table, and optionally apply it to any unions for this query.
Parameters:
  expr - the left hand expression
Parameters:
  expr2 - the right hand expression
Parameters:
  tblExpr - The table expression for the table to apply the join
Parameters:
  equals - if the join is applied as filter, if use equals or not equals
Parameters:
  unionQueries - Whether to apply to unions of this query.



leftOuterJoin
void leftOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals)(Code)
Method to do a left outer join to another table.
Parameters:
  expr - the left hand expression
Parameters:
  expr2 - the right hand expression
Parameters:
  tblExpr - The table expression
Parameters:
  equals - if the join is applied as filter, if use equals or not equals



newTableExpression
LogicSetExpression newTableExpression(DatastoreContainerObject mainTable, DatastoreIdentifier alias)(Code)
Creates a table expression
Parameters:
  mainTable - the main table
Parameters:
  alias - the alias TableExpression



newTableExpression
LogicSetExpression[] newTableExpression(DatastoreContainerObject mainTable, DatastoreIdentifier alias, boolean unionQueries)(Code)
Creates a table expression
Parameters:
  mainTable - the main table
Parameters:
  alias - the alias
Parameters:
  unionQueries - Whether to add to any union TableExpression[]



reset
void reset()(Code)
Allows reseting the compiled expression



rightOuterJoin
void rightOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals, boolean unionQueries)(Code)
Method to do a right outer join to another table, and optionally apply it to any unions for this query.
Parameters:
  expr - the left hand expression
Parameters:
  expr2 - the right hand expression
Parameters:
  tblExpr - The table expression for the table to apply the join
Parameters:
  equals - if the join is applied as filter, if use equals or not equals
Parameters:
  unionQueries - Whether to apply to unions of this query.



rightOuterJoin
void rightOuterJoin(ScalarExpression expr, ScalarExpression expr2, LogicSetExpression tblExpr, boolean equals)(Code)
Method to do a right outer join to another table.
Parameters:
  expr - the left hand expression
Parameters:
  expr2 - the right hand expression
Parameters:
  tblExpr - The table expression for the table to apply the join
Parameters:
  equals - if the join is applied as filter, if use equals or not equals



select
int[] select(JavaTypeMapping mapping)(Code)
Select the columns for a mapping
Parameters:
  mapping - The mapping The index of the columns in the select



select
int[] select(JavaTypeMapping mapping, boolean unionQueries)(Code)
select a new column, add to union queries, if unionQueries is true
Parameters:
  mapping - The mapping
Parameters:
  unionQueries - Whether to add to any union The index of the columns in the select



select
int[] select(DatastoreIdentifier alias, JavaTypeMapping mapping)(Code)
Select columns, add to union queries, if unionQueries is true
Parameters:
  alias - The alias
Parameters:
  mapping - The mapping The index of the columns in the select



select
int[] select(DatastoreIdentifier alias, JavaTypeMapping mapping, boolean unionQueries)(Code)
select columns, add to union queries, if unionQueries is true
Parameters:
  alias - The alias
Parameters:
  mapping - The mapping
Parameters:
  unionQueries - Whether to add to any union The index of the column in the select



selectDatastoreIdentity
int[] selectDatastoreIdentity(String alias, boolean unionQueries)(Code)
Select the datastore identity column.
Parameters:
  alias - Alias to use for this column
Parameters:
  unionQueries - Whether to select the datastore id column of all unioned tables The position of the column in the result set



selectField
int[] selectField(String fieldName, String alias, boolean unionQueries)(Code)
Select the column(s) for the specified field in the primary table of the query.
Parameters:
  fieldName - Name of the field
Parameters:
  alias - Alias to use for these column(s)
Parameters:
  unionQueries - Whether to select the field column(s) of all unioned queries. The position of the columns in the result set.



selectScalarExpression
int selectScalarExpression(ScalarExpression expr)(Code)
select an expression; eg: "'Text' as alias"
Parameters:
  expr - The expression to add to the select statement The index of the expression in the select



selectScalarExpression
int selectScalarExpression(ScalarExpression expr, boolean unionQueries)(Code)
select an expression; eg: "'Text' as alias"
Parameters:
  expr - The expression to add to the select statement
Parameters:
  unionQueries - whether to apply the select in all queries unified by the union clause The index of the expression in the select



selectVersion
int[] selectVersion(String alias, boolean unionQueries)(Code)
Select the version column.
Parameters:
  alias - Alias to use for this column
Parameters:
  unionQueries - Whether to select the version column of all unioned tables The position of the column in the result set



setCandidateInformation
void setCandidateInformation(Class cls, String alias)(Code)
Method to set the candidate class and alias in use by the query. The expression is created with a candidate table, yet this could store more than 1 class. Additionally the "alias" of the candidate table expression is a DatastoreIdentifier whereas this alias here is a String form.
Parameters:
  cls - The candidate class
Parameters:
  alias - The alias



setDistinctResults
void setDistinctResults(boolean distinctResults)(Code)
Set whether this statement returns distinct results.
Parameters:
  distinctResults - Whether we return distinct results



setExistsSubQuery
void setExistsSubQuery(boolean isExistsSubQuery)(Code)
Set this query is to be used as a as set for the Exists function. example WHERE EXISTS( QUERY )
Parameters:
  isExistsSubQuery - The isExistsSubQuery to set.



setHaving
void setHaving(BooleanExpression expr)(Code)
Method to set the having clause of the statement.
Parameters:
  expr - The having expression



setOrdering
void setOrdering(ScalarExpression[] exprs, boolean[] descending)(Code)
Mutator for the ordering criteria.
Parameters:
  exprs - The expressions to order by
Parameters:
  descending - Whether each expression is ascending/descending



setParent
void setParent(QueryExpression parentQueryExpr)(Code)
Sets the parent QueryExpression of this query. In SQL it can be exemplified as SELECT 1 FROM PARENT WHERE EXISTS (SELECT 1 FROM THIS) The parent QueryExpression is the nesting SQL.
Parameters:
  parentQueryExpr - the parent of this query



setRangeConstraint
void setRangeConstraint(long offset, long count)(Code)
Method to add a range constraint on any SELECT. This typically will use LIMIT/OFFSET where they are supported by the underlying RDBMS.
Parameters:
  offset - The offset to start from
Parameters:
  count - The number of records to return



setUpdates
void setUpdates(ScalarExpression[] exprs)(Code)
set the update condition(s) for the query.
Parameters:
  exprs - the Boolean expression



toDeleteStatementText
StatementText toDeleteStatementText()(Code)
Method to convert the criteria into a delete statement text. The StatementText



toStatementText
StatementText toStatementText(boolean lock)(Code)
Method to convert the criteria into the statement text.
Parameters:
  lock - whether to lock the instances using this statement The StatementText



toUpdateStatementText
StatementText toUpdateStatementText()(Code)
Method to convert the criteria into an update statement text. The StatementText



union
void union(QueryExpression qe)(Code)
Union two QueryExpressions this and qe. Both QueryExpressions must have the same ScalarExpressions selected, and they must be in the same select order. valid: e.g. a) fieldA, fieldB, fieldE, fieldC b) fieldA, fieldB, fieldE, fieldC invalid: e.g. a) fieldA, fieldE, fieldB, fieldC b) fieldA, fieldB, fieldE, fieldC
Parameters:
  qe - the QueryExpression



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