Java Doc for QueryDefinition.java in  » Database-ORM » ODAL » com » completex » objective » components » persistency » 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 » ODAL » com.completex.objective.components.persistency 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.completex.objective.components.persistency.QueryDefinition

All known Subclasses:   com.completex.objective.components.persistency.core.impl.query.QueryDefinitionImpl,
QueryDefinition
public interface QueryDefinition (Code)

author:
   Gennady Krizhevsky

Inner Class :public static class ChainedColumn implements Serializable,Mappable

Field Summary
final public static  BasicQuery.OrderDirectionDIR_ASC
    
final public static  BasicQuery.OrderDirectionDIR_DESC
    


Method Summary
 JoinaddJoin(String firstTableName)
    
 voidaddToChainedColumns(int columnIndex, String tableName, String columnName)
    
 QueryDefinitionaddToFrom(String tableExpression)
    
 QueryDefinitionaddToGroupBy(String columnExpression)
    
 QueryDefinitionaddToHaving(String sql)
    
 QueryDefinitionaddToOrderBy(String columnExpression, Query.OrderDirection direction)
    
 QueryDefinitionaddToOrderBy(String columnExpression)
    
 QueryDefinitionaddToSelect(String columnExpression)
    
 QueryDefinitionaddToSelect(PersistentObjectFactory persistentObject)
    
 QueryDefinitionaddToWhere(String sql)
    
public  QueryDefinitionaddToWhere(PersistentObject persistentObject)
    
 QueryDefinitionandToHaving(String sql)
    
 QueryDefinitionandToWhere(String sql)
    
public  QueryDefinitionandToWhere(PersistentObject persistentObject)
    
 voidclearChainedColumns()
    
 CompoundColumnFiltercolumnFilters()
     Returns current CompoundColumnFilter.
 QueryDefinitioncompile(DatabasePolicy databasePolicy)
    
 QueryDefinitioncompile()
    
 QueryDefinitioncompileCall(DatabasePolicy databasePolicy)
    
 QueryDefinitioncompileCall()
    
 voiddecompile()
     Decompiles query which makes it mutable.
 String[]extractNonUsedTableAliases()
    
 StringgetCallBody()
     Returns call body which is internal part of call SQL: "sp( ?, ? )", for instance.
 ChainedColumn[]getChainedColumns()
    
 CompoundColumnFiltergetCompoundColumnFilter()
    
 DatabasePolicygetDatabasePolicy()
    
 String[]getForUpdateOf()
    
 String[]getFrom()
     Represents SQL FROM clause.
 ListgetFromAsList()
    
 String[]getGroupBy()
    
 StringgetHaving()
    
 JoingetJoin()
    
 intgetLimitMax()
    
 intgetLimitMin()
    
 CollectionFactorygetMultipleResultFactory()
    
 String[]getOrderBy()
    
 String[]getSelect()
    
 PersistentObjectFactorygetSingularResultFactory()
     Returns singular result factory.
 StringgetSql()
    
 longgetTimeout()
     Gets lock timeout.
 UniongetUnion()
    
 SetgetUsedTableAliases()
    
 StringgetWhere()
    
 booleanhasChainedColumns()
    
 booleanisAdHoc()
    
 booleanisColumnFiltersEmpty()
    
 booleanisCombinedInline()
    
 booleanisCompiled()
    
 booleanisDisconnectedPageQuery()
     Returns true if query is of Disconnected Page Query type.
 booleanisDistinct()
    
 booleanisExternallySetSql()
    
 booleanisFunction()
    
 booleanisLocked()
    
 booleanisUnion()
    
 booleanisUseColumnNames()
    
 booleanisUseSelectStar()
    
 booleanisWait()
    
 JoinnewJoin(String firstTableName)
    
 voidnullifySingularResultFactory()
    
 QueryDefinitionorToHaving(String sql)
    
 QueryDefinitionorToWhere(String sql)
    
public  QueryDefinitionorToWhere(PersistentObject persistentObject)
    
 voidsetCallBody(String callBody)
     Sets call body which is internal part of call SQL: "sp( ?, ? )", for instance.
 voidsetCombinedInline()
    
 voidsetCompoundColumnFilter(CompoundColumnFilter columnFilter)
    
 voidsetDisconnectedPageQuery(boolean disconnectedPageQuery)
     Sets flag if query is of Disconnected Page Query type.
 QueryDefinitionsetDistinct(boolean distinct)
    
 voidsetExcludedFields(Set excludeFields)
     Set set of fields excluded from being populated.
 QueryDefinitionsetFrom(String[] from)
     Represents SQL FROM clause.
 voidsetFunction(boolean function)
    
 QueryDefinitionsetGroupBy(String[] groupBy)
     Represents SQL GROUP BY clause.
 QueryDefinitionsetHaving(String sql)
    
 QueryDefinitionsetJoin(Join join)
    
 QueryDefinitionsetLimit(int min, int max)
    
 QueryDefinitionsetLimit(int max)
    
 QueryDefinitionsetLocked(LockType lockType)
    
 QueryDefinitionsetLocked(LockType lockType, String[] forUpdateOf)
    
 voidsetMultipleResultFactory(CollectionFactory multipleResultFactory)
     Sets multiple result factory.
 QueryDefinitionsetOrderBy(String[] orderBy)
     Represents SQL ORDER BY clause.
 QueryDefinitionsetOrderBy(List orderBy)
     Represents SQL ORDER BY clause.
 QueryDefinitionsetSelect(String[] select)
     Represents SQL SELECT clause.
 QueryDefinitionsetSelect(List select)
     Represents SQL SELECT clause.
 voidsetSingularResultFactory(PersistentObjectFactory singularResultFactory)
     Sets singular result factory.
 voidsetSqlInternal(String sql)
    
 voidsetTimeout(long timeout)
     Sets lock timeout.
 voidsetUseColumnNames(boolean useColumnNames)
    
 voidsetUseSelectStar(boolean useSelectStar)
     Sets mode of select.
 QueryDefinitionsetWhere(String sql)
    
 Unionunion(QueryDefinition queryDefinition)
     Creates and adds Union - representation of UNION clause - to this query.
 Unionunion(QueryDefinition queryDefinition, UnionMode mode)
     Creates and adds Union - representation of UNION clause - to this query.
 UnionunionAll(QueryDefinition queryDefinition)
     Creates and adds Union - representation of UNION clause - to this query.
 intunionSize()
    
 voidunuseStarAndColumnNames()
     Unsets use of star in select clauses and names of PersistentObject columns when retrieving from ResultSet.
 voiduseStarAndColumnNames()
     Sets query to use star in select clauses and names of PersistentObject columns when retrieving from ResultSet.

Field Detail
DIR_ASC
final public static BasicQuery.OrderDirection DIR_ASC(Code)



DIR_DESC
final public static BasicQuery.OrderDirection DIR_DESC(Code)





Method Detail
addJoin
Join addJoin(String firstTableName)(Code)
Addes new Join object to this query
Parameters:
  firstTableName - new Join object
See Also:   Join



addToChainedColumns
void addToChainedColumns(int columnIndex, String tableName, String columnName)(Code)



addToFrom
QueryDefinition addToFrom(String tableExpression)(Code)
Adds tableExpression SQL fragment to SQL FROM tables
Parameters:
  tableExpression - itself



addToGroupBy
QueryDefinition addToGroupBy(String columnExpression)(Code)
Adds columnExpression SQL fragment to SQL GROUP BY columns
Parameters:
  columnExpression - itself



addToHaving
QueryDefinition addToHaving(String sql)(Code)
Adds SQL fragment to HAVING clause
Parameters:
  sql - itself



addToOrderBy
QueryDefinition addToOrderBy(String columnExpression, Query.OrderDirection direction)(Code)
Adds columnExpression SQL fragment to SQL ORDER BY columns
Parameters:
  columnExpression -
Parameters:
  direction - Ascending or descending itself



addToOrderBy
QueryDefinition addToOrderBy(String columnExpression)(Code)
Adds columnExpression SQL fragment to SQL ORDER BY columns with default direction
Parameters:
  columnExpression - itself



addToSelect
QueryDefinition addToSelect(String columnExpression)(Code)
Adds columnExpression SQL fragment to SQL SELECT columns
Parameters:
  columnExpression - itself



addToSelect
QueryDefinition addToSelect(PersistentObjectFactory persistentObject)(Code)
Adds columnExpression SQL fragment to SQL SELECT columns
Parameters:
  persistentObject - persistentObject which MetaTable is used to get columns itself



addToWhere
QueryDefinition addToWhere(String sql)(Code)
Adds SQL fragment to WHERE clause
Parameters:
  sql - itself



addToWhere
public QueryDefinition addToWhere(PersistentObject persistentObject)(Code)
Adds SQL fragment to WHERE clause based on PersistentObject values which are joined by "AND"
Parameters:
  persistentObject - itself



andToHaving
QueryDefinition andToHaving(String sql)(Code)
Adds SQL fragment to HAVING clause prepended with " AND "
Parameters:
  sql - itself



andToWhere
QueryDefinition andToWhere(String sql)(Code)
Adds SQL fragment to WHERE clause prepended with " AND "
Parameters:
  sql - itself



andToWhere
public QueryDefinition andToWhere(PersistentObject persistentObject)(Code)
Adds SQL fragment to WHERE clause based on PersistentObject values which are joined by "AND" and prepended with " AND "
Parameters:
  persistentObject - itself



clearChainedColumns
void clearChainedColumns()(Code)



columnFilters
CompoundColumnFilter columnFilters()(Code)
Returns current CompoundColumnFilter. If filter is not set - creates a new instance of it before that. CompoundColumnFilter



compile
QueryDefinition compile(DatabasePolicy databasePolicy)(Code)
Compiles query which makes it immutable
Parameters:
  databasePolicy - compiled query (itself)



compile
QueryDefinition compile()(Code)
Compiles query which makes it immutable compiled query (itself)
throws:
  OdalRuntimePersistencyException - if DatabasePolicy is not set but is required for compillation



compileCall
QueryDefinition compileCall(DatabasePolicy databasePolicy)(Code)
Compiles call which makes it immutable
Parameters:
  databasePolicy - itself



compileCall
QueryDefinition compileCall()(Code)
Compiles call which makes it immutable itself
throws:
  OdalRuntimePersistencyException - if DatabasePolicy is not set but is required for compillation



decompile
void decompile()(Code)
Decompiles query which makes it mutable. Resets internal sql string to null.



extractNonUsedTableAliases
String[] extractNonUsedTableAliases()(Code)



getCallBody
String getCallBody()(Code)
Returns call body which is internal part of call SQL: "sp( ?, ? )", for instance. call body body which is internal part of call SQL:"sp( ?, ? )", for instance.



getChainedColumns
ChainedColumn[] getChainedColumns()(Code)



getCompoundColumnFilter
CompoundColumnFilter getCompoundColumnFilter()(Code)
Return column filter set for this query column filter set for this query



getDatabasePolicy
DatabasePolicy getDatabasePolicy()(Code)
Return DatabasePolicy used DatabasePolicy used



getForUpdateOf
String[] getForUpdateOf()(Code)
Returns set of columns of lock clause set of columns of lock clause



getFrom
String[] getFrom()(Code)
Represents SQL FROM clause. set of SQL FROM columns



getFromAsList
List getFromAsList()(Code)



getGroupBy
String[] getGroupBy()(Code)
Returns set of SQL GROUP BY columns set of SQL GROUP BY columns



getHaving
String getHaving()(Code)
SQL HAVING clause



getJoin
Join getJoin()(Code)
Join object or null if not set or added



getLimitMax
int getLimitMax()(Code)
max value in LIMIT clause



getLimitMin
int getLimitMin()(Code)
min value in LIMIT clause



getMultipleResultFactory
CollectionFactory getMultipleResultFactory()(Code)
Returns multiple result factory multiple result factory



getOrderBy
String[] getOrderBy()(Code)
Returns set of SQL ORDER BY columns set of SQL ORDER BY columns



getSelect
String[] getSelect()(Code)
set of SQL SELECT columns



getSingularResultFactory
PersistentObjectFactory getSingularResultFactory()(Code)
Returns singular result factory. Used when retrieving data from ResultSet.
See Also:   PersistentObjectFactory singular result factory



getSql
String getSql()(Code)
Return sql that is produced by this definition sql that is produced by this definition



getTimeout
long getTimeout()(Code)
Gets lock timeout. In future may be used as query timeout as well timeout



getUnion
Union getUnion()(Code)
Returns Union object of this query Returns Union object of this query



getUsedTableAliases
Set getUsedTableAliases()(Code)



getWhere
String getWhere()(Code)
Returns SQL WHERE clause w/o 'WHERE' keyword SQL WHERE clause



hasChainedColumns
boolean hasChainedColumns()(Code)



isAdHoc
boolean isAdHoc()(Code)
Returns true if sql != null && join == null && from == null && singularResultFactory == null; true if sql != null && join == null && from == null && singularResultFactory == null;



isColumnFiltersEmpty
boolean isColumnFiltersEmpty()(Code)



isCombinedInline
boolean isCombinedInline()(Code)



isCompiled
boolean isCompiled()(Code)
Returns true if query is copiled true if query is copiled



isDisconnectedPageQuery
boolean isDisconnectedPageQuery()(Code)
Returns true if query is of Disconnected Page Query type. true if query is of Disconnected Page Query type.



isDistinct
boolean isDistinct()(Code)
true if query is to return unique values



isExternallySetSql
boolean isExternallySetSql()(Code)
Returns true if SQL is set by "user" true if SQL is set by "user"



isFunction
boolean isFunction()(Code)
Returns true if this call represents database function true if this call represents database function



isLocked
boolean isLocked()(Code)
Returns true if query has lock clause true if query has lock clause



isUnion
boolean isUnion()(Code)
Returns true if this is UNION query true if this is UNION query



isUseColumnNames
boolean isUseColumnNames()(Code)



isUseSelectStar
boolean isUseSelectStar()(Code)
true then select clause will look like:"SELECT * ..."



isWait
boolean isWait()(Code)
Returns true if lock clause of type that will wait untinl another process will free resource true if lock clause of type that will wait untinl another process will free resource



newJoin
Join newJoin(String firstTableName)(Code)
Creates new Join object
Parameters:
  firstTableName - new Join object
See Also:   Join



nullifySingularResultFactory
void nullifySingularResultFactory()(Code)
Nullifies singular result factory



orToHaving
QueryDefinition orToHaving(String sql)(Code)
Adds SQL fragment to HAVING clause prepended with " OR "
Parameters:
  sql - itself



orToWhere
QueryDefinition orToWhere(String sql)(Code)
Adds SQL fragment to WHERE clause prepended with " OR "
Parameters:
  sql - itself



orToWhere
public QueryDefinition orToWhere(PersistentObject persistentObject)(Code)
Adds SQL fragment to WHERE clause based on PersistentObject values which are joined by "AND" and prepended with " OR "
Parameters:
  persistentObject - itself



setCallBody
void setCallBody(String callBody)(Code)
Sets call body which is internal part of call SQL: "sp( ?, ? )", for instance.
Parameters:
  callBody -



setCombinedInline
void setCombinedInline()(Code)



setCompoundColumnFilter
void setCompoundColumnFilter(CompoundColumnFilter columnFilter)(Code)
Sets column filter that allows for sparsely populated result objects
See Also:   CompoundColumnFilter
Parameters:
  columnFilter -



setDisconnectedPageQuery
void setDisconnectedPageQuery(boolean disconnectedPageQuery)(Code)
Sets flag if query is of Disconnected Page Query type. Disconnected Page Query object when executed brings only one page of results.
Parameters:
  disconnectedPageQuery - flag if query is of Disconnected Page Query type.



setDistinct
QueryDefinition setDistinct(boolean distinct)(Code)

Parameters:
  distinct - true if query is to return unique values itself



setExcludedFields
void setExcludedFields(Set excludeFields)(Code)
Set set of fields excluded from being populated. Field names coincide with column names if singularResultFactory is set or those of ResultSet if not
Parameters:
  excludeFields -



setFrom
QueryDefinition setFrom(String[] from)(Code)
Represents SQL FROM clause. Each element of from parameter will be joined by comma when compiling.
Parameters:
  from - set of SQL FROM columns (No 'SELECT' keyword necessary) itself



setFunction
void setFunction(boolean function)(Code)
Sets the flag to indicate if this call represents database function
Parameters:
  function - indicates if this call represents database function



setGroupBy
QueryDefinition setGroupBy(String[] groupBy)(Code)
Represents SQL GROUP BY clause. Each element of groupBy parameter will be joined by comma when compiling.
Parameters:
  groupBy - set of SQL GROUP BY columns (No 'GROUP BY' keyword necessary) itself



setHaving
QueryDefinition setHaving(String sql)(Code)
Sets SQL HAVING clause
Parameters:
  sql - itself



setJoin
QueryDefinition setJoin(Join join)(Code)

Parameters:
  join - Join object itself



setLimit
QueryDefinition setLimit(int min, int max)(Code)
Set min and max values in LIMIT clause
Parameters:
  min -
Parameters:
  max - itself



setLimit
QueryDefinition setLimit(int max)(Code)
Set max value in LIMIT clause
Parameters:
  max - itself



setLocked
QueryDefinition setLocked(LockType lockType)(Code)
Sets query lock
Parameters:
  lockType - itself
See Also:   LockType



setLocked
QueryDefinition setLocked(LockType lockType, String[] forUpdateOf)(Code)
Sets query lock
Parameters:
  lockType -
Parameters:
  forUpdateOf - itself
See Also:   LockType



setMultipleResultFactory
void setMultipleResultFactory(CollectionFactory multipleResultFactory)(Code)
Sets multiple result factory. Multiple result factory is used when retrieving data from ResultSet to instantiate proper Collection type.
Parameters:
  multipleResultFactory - multiple result factory



setOrderBy
QueryDefinition setOrderBy(String[] orderBy)(Code)
Represents SQL ORDER BY clause. Each element of orderBy parameter will be joined by comma when compiling.
Parameters:
  orderBy - set of SQL ORDER BY columns (No 'ORDER BY' keyword necessary) itself



setOrderBy
QueryDefinition setOrderBy(List orderBy)(Code)
Represents SQL ORDER BY clause. Each element of orderBy parameter will be joined by comma when compiling.
Parameters:
  orderBy - set of SQL ORDER BY columns (No 'ORDER BY' keyword necessary) itself



setSelect
QueryDefinition setSelect(String[] select)(Code)
Represents SQL SELECT clause. Each element of select parameter will be joined by comma when compiling.
Parameters:
  select - set of SQL SELECT columns (No 'SELECT' keyword necessary) itself



setSelect
QueryDefinition setSelect(List select)(Code)
Represents SQL SELECT clause. Each element of select parameter will be joined by comma when compiling.
Parameters:
  select - set of SQL SELECT columns (No 'SELECT' keyword necessary) itself



setSingularResultFactory
void setSingularResultFactory(PersistentObjectFactory singularResultFactory)(Code)
Sets singular result factory.
Parameters:
  singularResultFactory - singular result factory



setSqlInternal
void setSqlInternal(String sql)(Code)
Sets SQL statement and indicates that it is done by internal process
Parameters:
  sql -



setTimeout
void setTimeout(long timeout)(Code)
Sets lock timeout. In future may be used as query timeout as well
Parameters:
  timeout -



setUseColumnNames
void setUseColumnNames(boolean useColumnNames)(Code)



setUseSelectStar
void setUseSelectStar(boolean useSelectStar)(Code)
Sets mode of select. If useSelectStar set true then select clause will look like: "SELECT * ...". Should be used carefully since if SQL has column that does not exist in the object used as data container then execution will fail
Parameters:
  useSelectStar -



setWhere
QueryDefinition setWhere(String sql)(Code)
Set SQL WHERE clause w/o 'WHERE' keyword
Parameters:
  sql - itself



union
Union union(QueryDefinition queryDefinition)(Code)
Creates and adds Union - representation of UNION clause - to this query.
Parameters:
  queryDefinition - QueryDefinition to be added with UNION clause created Union
See Also:   Union



union
Union union(QueryDefinition queryDefinition, UnionMode mode)(Code)
Creates and adds Union - representation of UNION clause - to this query.
Parameters:
  queryDefinition - QueryDefinition to be added with UNION or UNION ALL clause
Parameters:
  mode - Parameter to control if this is UNION or UNION ALL clause created Union
See Also:   Union



unionAll
Union unionAll(QueryDefinition queryDefinition)(Code)
Creates and adds Union - representation of UNION clause - to this query.
Parameters:
  queryDefinition - QueryDefinition to be added with UNION ALL clause created Union
See Also:   Union



unionSize
int unionSize()(Code)
Returns number of union sub-queries number of union sub-queries



unuseStarAndColumnNames
void unuseStarAndColumnNames()(Code)
Unsets use of star in select clauses and names of PersistentObject columns when retrieving from ResultSet.



useStarAndColumnNames
void useStarAndColumnNames()(Code)
Sets query to use star in select clauses and names of PersistentObject columns when retrieving from ResultSet. It should be used carefully since if there are repetitive SQL names it can cause incorrect results



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