Source Code Cross Referenced for QueryFactory.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *  Objective Database Abstraction Layer (ODAL)
003:         *  Copyright (c) 2004, The ODAL Development Group
004:         *  All rights reserved.
005:         *  For definition of the ODAL Development Group please refer to LICENCE.txt file
006:         *
007:         *  Distributable under LGPL license.
008:         *  See terms of license at gnu.org.
009:         */package com.completex.objective.components.persistency;
010:
011:        /**
012:         * @author Gennady Krizhevsky
013:         */
014:        public interface QueryFactory extends BasicQueryFactory,
015:                QueryFactoryCtl, QueryFactoryBase {
016:
017:            /**
018:             * Creates preset query object
019:             *
020:             * @param sql SQL statement
021:             * @return new <code>Query</code> instance
022:             */
023:            Query newQuery(String sql);
024:
025:            /**
026:             * Creates preset query object
027:             *
028:             * @param singularResultFactory singular result factory
029:             * @return new <code>Query</code> instance
030:             */
031:            Query newQuery(PersistentObjectFactory singularResultFactory);
032:
033:            //
034:            // Paginated "disconnected" queries:
035:            //
036:
037:            /**
038:             * Creates preset query object which when executed brings only one page of results
039:             *
040:             * @param singularResultFactory singular result factory
041:             * @param offset                0-based offset
042:             * @param pageSize              page size
043:             * @return new <code>Query</code> instance
044:             */
045:            Query newDisconnectedPageQuery(
046:                    AbstractPersistentObject singularResultFactory,
047:                    long offset, long pageSize);
048:
049:            /**
050:             * Creates preset query object which when executed brings only one page of results
051:             *
052:             * @param sql      SQL statement
053:             * @param offset   0-based offset
054:             * @param pageSize page size
055:             * @return new <code>Query</code> instance
056:             */
057:            Query newDisconnectedPageQuery(String sql, long offset,
058:                    long pageSize);
059:
060:            /**
061:             * Creates preset query object which when executed brings only one page of results
062:             *
063:             * @param offset   0-based offset
064:             * @param pageSize page size
065:             * @return new <code>Query</code> instance
066:             */
067:            Query newDisconnectedPageQuery(long offset, long pageSize);
068:
069:            /**
070:             * Creates preset query object which when executed brings only one page of results
071:             *
072:             * @param query    query object
073:             * @param offset   0-based offset
074:             * @param pageSize page size
075:             * @return new <code>Query</code> instance
076:             */
077:            Query newDisconnectedPageQuery(Query query, long offset,
078:                    long pageSize);
079:
080:            /**
081:             * Creates preset query object which when executed brings only one page of results
082:             *
083:             * @param singularResultFactory
084:             * @param page                  Page attributes
085:             * @return new <code>Query</code> instance
086:             * @see Page
087:             */
088:            Query newDisconnectedPageQuery(
089:                    AbstractPersistentObject singularResultFactory, Page page);
090:
091:            /**
092:             * Creates preset query object which when executed brings only one page of results
093:             *
094:             * @param query
095:             * @param page  Page attributes
096:             * @return new <code>Query</code> instance
097:             * @see Page
098:             */
099:            Query newDisconnectedPageQuery(Query query, Page page);
100:
101:            /**
102:             * Creates preset query object which when executed brings only one page of results
103:             *
104:             * @param page  Page attributes
105:             * @return new <code>Query</code> instance
106:             * @see Page
107:             */
108:            Query newDisconnectedPageQuery(Page page);
109:
110:            /**
111:             * Creates preset query object which when executed brings only one page of results
112:             *
113:             * @param sql SQL statement
114:             * @param page  Page attributes
115:             * @return new <code>Query</code> instance
116:             */
117:            Query newDisconnectedPageQuery(String sql, Page page);
118:
119:            //
120:            // Paginated "connected" queries:
121:            //
122:
123:            /**
124:             * Creates preset query object which when executed brings only one page of results
125:             * and does not disconnect from the database. It keeps cursor/result set open and only closes it either
126:             * when there is nothing to retrieve or on transaction commit.
127:             * <br><p>The following snippet shows how to use it:</br></p>
128:             * <PRE>
129:             * Query query = persistency.getQueryFactory().newConnectedForwardPageQuery(new Person(),  1000);
130:             * <p/>
131:             * List persons;
132:             * while ((persons = persistency.select(query).size() > 0 ) {
133:             * // Do your processing here
134:             * }
135:             * </PRE>
136:             *
137:             * @param singularResultFactory singular result factory
138:             * @param pageSize              page size
139:             * @return new <code>Query</code> instance
140:             */
141:            Query newConnectedForwardPageQuery(
142:                    AbstractPersistentObject singularResultFactory,
143:                    long pageSize);
144:
145:            /**
146:             * Creates preset query object which when executed brings only one page of results
147:             * and does not disconnect from the database. It keeps cursor/result set open and only closes it either
148:             * when there is nothing to retrieve or on transaction commit.
149:             * <br><p>The following snippet shows how to use it:</br></p>
150:             * <PRE>
151:             * Query query = persistency.getQueryFactory().newConnectedForwardPageQuery("select * from person",  1000);
152:             * <p/>
153:             * List persons;
154:             * while ((persons = persistency.select(query).size() > 0 ) {
155:             * // Do your processing here
156:             * }
157:             * </PRE>
158:             *
159:             * @param sql      SQL statement
160:             * @param pageSize page size
161:             * @return new <code>Query</code> instance
162:             */
163:            Query newConnectedForwardPageQuery(String sql, long pageSize);
164:
165:            /**
166:             * Creates preset query object which when executed brings only one page of results
167:             * and does not disconnect from the database. It keeps cursor/result set open and only closes it either
168:             * when there is nothing to retrieve or on transaction commit.
169:             * <br><p>The following snippet shows how to use it:</br></p>
170:             * <PRE>
171:             * Query query = persistency.getQueryFactory().newConnectedForwardPageQuery(1000);
172:             * // query setup
173:             * <p/>
174:             * List persons;
175:             * while ((persons = persistency.select(query).size() > 0 ) {
176:             * // Do your processing here
177:             * }
178:             * </PRE>
179:             *
180:             * @param pageSize page size
181:             * @return new <code>Query</code> instance
182:             */
183:            Query newConnectedForwardPageQuery(long pageSize);
184:
185:            /**
186:             * Creates preset query object which when executed brings only one page of results
187:             * and does not disconnect from the database. It keeps cursor/result set open and only closes it either
188:             * when there is nothing to retrieve or on transaction commit.
189:             * <br><p>The following snippet shows how to use it:</br></p>
190:             * <PRE>
191:             * <p/>
192:             * Query nonPaginatedQuery = persistency.getQueryFactory().newQuery(new Person());
193:             * // nonPaginatedQuery setup ...
194:             * <p/>
195:             * Query query = persistency.getQueryFactory().newConnectedForwardPageQuery(nonPaginatedQuery,  1000);
196:             * <p/>
197:             * List persons;
198:             * while ((persons = persistency.select(query).size() > 0 ) {
199:             * // Do your processing here
200:             * }
201:             * </PRE>
202:             *
203:             * @param query    non-paginated Query object
204:             * @param pageSize page size
205:             * @return new <code>Query</code> instance
206:             */
207:            Query newConnectedForwardPageQuery(Query query, long pageSize);
208:
209:            //
210:            // Queries By Example:
211:            //
212:
213:            /**
214:             * Creates preset query object by <code>PersistentObject</code> with set values which are used in where clause
215:             *
216:             * @param persistentObject <code>PersistentObject</code> with set values
217:             * @return new <code>Query</code> instance
218:             */
219:            Query newQueryByExample(PersistentObject persistentObject);
220:
221:            /**
222:             * Creates preset query object by <code>Compound</code> with set values which are used in where clause
223:             *
224:             * @param compound <code>Compound</code> with set values
225:             * @return new <code>Query</code> instance
226:             */
227:            Query newQueryByCompoundExample(Compound compound);
228:
229:            /**
230:             * Creates new QBE out of compound object. Entries are joined explicitely in joinMode.
231:             * Mode set to compound object initially gets reset.
232:             *
233:             * @param compound compound object which values are used in SQL condition
234:             * @param joinMode Compound.INNER, Compound.OUTER or Compound.NONE
235:             * @return new Query
236:             */
237:            Query newQueryByCompoundExample(Compound compound,
238:                    Compound.ImplicitJoinMode joinMode);
239:
240:            Query newQueryByExample(PersistentObject persistentObject,
241:                    CompoundColumnFilter filters);
242:
243:            Query newQueryByCompoundExample(Compound compound,
244:                    CompoundColumnFilter filters);
245:
246:            Query newQueryByCompoundExample(Compound compound,
247:                    Compound.ImplicitJoinMode joinMode,
248:                    CompoundColumnFilter filters);
249:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.