Source Code Cross Referenced for BasicQuery.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 BasicQuery {
015:
016:            OrderDirection ORDER_ASC = OrderDirection.ASC;
017:            OrderDirection ORDER_DESC = OrderDirection.DESC;
018:
019:            /**
020:             * Query states:
021:             */
022:            int STATE_NEW = 0;
023:            int STATE_ACTIVE = 1;
024:            int STATE_CLOSED = 2;
025:
026:            //
027:            // Update related:
028:            //
029:            String UPDATE = "UPDATE ";
030:
031:            //
032:            // Seelect related:
033:            //
034:            String SELECT = "SELECT ";
035:            String DISTINCT = " DISTINCT ";
036:            String COUNT = " count ";
037:            String COUNT_1 = " count(1) ";
038:            String EXISTS = " EXISTS ";
039:            String WHERE = " WHERE ";
040:            String FROM = " FROM ";
041:            String ORDER_BY = " ORDER BY ";
042:            String GROUP_BY = " GROUP BY ";
043:            String HAVING = " HAVING ";
044:            String AND = " AND ";
045:            String OR = " OR ";
046:            String ASC = " ASC ";
047:            String DESC = " DESC ";
048:            String STAR = " * ";
049:            String DOT_STAR = ".* ";
050:            String EQ = " = ";
051:            String NE = " <> ";
052:            String GT = " > ";
053:            String GE = " >= ";
054:            String LT = " < ";
055:            String LE = " <= ";
056:            String PH = "?";
057:            String PH1 = "? ";
058:            String EPH = "=?s";
059:            String EPH1 = "=? ";
060:            String MULTI_WILD = "%";
061:            String SQ = "'";
062:
063:            String LIKE = " LIKE ";
064:            String BETWEEN = " BETWEEN ";
065:            String LOWER = " LOWER";
066:            String UPPER = " UPPER";
067:
068:            /**
069:             * Returns SQL string that this query represents
070:             * 
071:             * @return SQL string that this query represents
072:             */
073:            String getSql();
074:
075:            /**
076:             * Sets SQL string that this query represents
077:             * @param sql SQL string that this query represents
078:             * @return itself
079:             */
080:            BasicQuery setSql(String sql);
081:
082:            //
083:            // Name:
084:            //
085:
086:            /**
087:             * Set query name
088:             *
089:             * @param name
090:             */
091:            void setName(String name);
092:
093:            /**
094:             * @return query name
095:             */
096:            String getName();
097:
098:            BasicQuery setParameters(Parameter[] parameters);
099:
100:            AbstractParameters getBaseParameters();
101:
102:            //
103:            // Pagination:
104:            //
105:            /**
106:             * Sets page size in records
107:             * 
108:             * @param pageSize page size in records
109:             * @return itself
110:             */
111:            BasicQuery setPageSize(long pageSize);
112:
113:            /**
114:             * Returns page size
115:             * 
116:             * @return page size
117:             */
118:            long getPageSize();
119:
120:            /**
121:             * Set 0-based offset from which records to be retrieved
122:             *
123:             * @param offset
124:             */
125:            void setOffset(long offset);
126:
127:            /**
128:             * Returns 0-based offset from which records to be retrieved
129:             *
130:             * @return 0-based offset from which records to be retrieved
131:             */
132:            long getOffset();
133:
134:            /**
135:             * Sets page parameters in terms of <code>BasicQuery.Page<code/>
136:             *
137:             * @param page
138:             * @return itself
139:             */
140:            BasicQuery setPage(Page page);
141:
142:            //
143:            // Util classes:
144:            //
145:
146:            /**
147:             * Order direction type - ascending or descending.
148:             */
149:            static class OrderDirection {
150:                protected static final OrderDirection ASC = new OrderDirection(
151:                        "ACS");
152:                protected static final OrderDirection DESC = new OrderDirection(
153:                        "DESC");
154:
155:                private String sqlString;
156:
157:                private String name;
158:
159:                private OrderDirection(String name) {
160:                    this .name = name;
161:                    this .sqlString = " " + name + " ";
162:                }
163:
164:                public String toString() {
165:                    return name;
166:                }
167:
168:                public String getSqlString() {
169:                    return sqlString;
170:                }
171:            }
172:
173:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.