Source Code Cross Referenced for Query.java in  » Database-ORM » db-ojb » org » apache » ojb » broker » query » 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 » db ojb » org.apache.ojb.broker.query 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.apache.ojb.broker.query;
002:
003:        /* Copyright 2002-2005 The Apache Software Foundation
004:         *
005:         * Licensed under the Apache License, Version 2.0 (the "License");
006:         * you may not use this file except in compliance with the License.
007:         * You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        import java.util.List;
019:
020:        /**
021:         * represents Queries that can be used by the OJB PersistenceBroker
022:         * to retrieve Objects from the underlying DB.
023:         * Until now there are two implementations:
024:         * 1. QueryByCriteria, represents SELECT * FROM ... WHERE ... queries
025:         * 2. QueryByIdentity, uses Example objects or OIDs
026:         * as templates for the db lookup
027:         * there could additional implementations, e.g for user defined SQL
028:         *
029:         * For the Criteria API I reused code from the COBRA project,
030:         * as you will see by their class comments.
031:         *
032:         * I removed all stuff that relies on knowlegde of the DataDictionary
033:         * or MetaData layer. The Query and Criteria classes thus don't know
034:         * how to build SQL statements, as in the COBRA original sources.
035:         * I use the this classes as mere data-structures, that are
036:         * processed by the OJB Accesslayer (SqlGenerator, JdbcAccess).
037:         *
038:         * This design will allow to reuse the org.apache.ojb.broker.query package in other
039:         * projects without breaking any references. I hope this will be
040:         * useful for someone.
041:         *
042:         * @author Thomas Mahler
043:         * @version $Id: Query.java,v 1.17.2.3 2005/12/21 22:27:09 tomdz Exp $
044:         */
045:        public interface Query extends java.io.Serializable {
046:            static final long serialVersionUID = 7616997212439931319L;
047:
048:            public static final int NO_START_AT_INDEX = 0;
049:            public static final int NO_END_AT_INDEX = 0;
050:            public static final boolean SCROLLABLE = true;
051:            public static final boolean NOT_SCROLLABLE = false;
052:
053:            /**
054:             * return the criteria of the query if present or null.
055:             */
056:            public abstract Criteria getCriteria();
057:
058:            /**
059:             * return the criteria of the query if present or null.
060:             */
061:            public abstract Criteria getHavingCriteria();
062:
063:            /**
064:             * return the template Object if present or null
065:             */
066:            public abstract Object getExampleObject();
067:
068:            /**
069:             * return the target class, representing the extend to be searched
070:             */
071:            public abstract Class getSearchClass();
072:
073:            /**
074:             * return the base class, with respect to which all paths are done
075:             */
076:            public abstract Class getBaseClass();
077:
078:            /**
079:             *  return true if select DISTINCT should be used
080:             */
081:            public boolean isDistinct();
082:
083:            /**
084:             * Answer the orderBy of all Criteria and Sub Criteria the elements are of
085:             * class FieldHelper
086:             * @return List of FieldHelper
087:             */
088:            public List getOrderBy();
089:
090:            /**
091:             * Gets the groupby for ReportQueries of all Criteria and Sub Criteria
092:             * the elements are of class FieldHelper
093:             * @return List of FieldHelper
094:             */
095:            public List getGroupBy();
096:
097:            /**
098:             *
099:             * @return the row at which the query should start retrieving results. 
100:             * If the start at index is 0, then ignore all cursor control.
101:             */
102:            int getStartAtIndex();
103:
104:            /**
105:             * Set the row at which the query should start retrieving results, inclusive
106:             * first row is 1
107:             * @param startAtIndex starting index, inclusive.
108:             */
109:            void setStartAtIndex(int startAtIndex);
110:
111:            /**
112:             *
113:             * @return the row at which the query should stop retrieving results. 
114:             * If the end at index is 0, ignore all cursor control
115:             */
116:            int getEndAtIndex();
117:
118:            /**
119:             * Set the row at which the query should stop retrieving results, inclusive.
120:             * first row is 1
121:             * @param endAtIndex ending index, inclusive
122:             */
123:            void setEndAtIndex(int endAtIndex);
124:
125:            /**
126:             * Returns the names of Relationships to be prefetched
127:             * @return List of Strings
128:             */
129:            public List getPrefetchedRelationships();
130:
131:            /**
132:             * @deprecated 
133:             * @param size
134:             */
135:            void fullSize(int size);
136:
137:            /**
138:             * @deprecated use OJBIterator.fullSize()
139:             * @return
140:             */
141:            int fullSize();
142:
143:            void setWithExtents(boolean withExtents);
144:
145:            boolean getWithExtents();
146:
147:            /**
148:             * Answer true if start- and endIndex is set
149:             * @return
150:             */
151:            public boolean usePaging();
152:
153:            /**
154:             * Set fetchSize hint for this Query. Passed to the JDBC driver on the
155:             * Statement level. It is JDBC driver-dependant if this function has
156:             * any effect at all, since fetchSize is only a hint.
157:             * @param fetchSize the fetch size specific to this query
158:             */
159:            void setFetchSize(int fetchSize);
160:
161:            /**
162:             * Returns the fetchSize hint for this Query
163:             * @return the fetch size hint specific to this query
164:             * (or 0 if not set / using driver default)
165:             */
166:            int getFetchSize();
167:
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.