Source Code Cross Referenced for FieldCriteria.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:        /**
019:         * Abstract superclass for Criteria using a field to compare with
020:         * 
021:         * @author <a href="mailto:jbraeuchi@gmx.ch">Jakob Braeuchi</a>
022:         * @version $Id: FieldCriteria.java,v 1.9.2.1 2005/12/21 22:27:09 tomdz Exp $
023:         */
024:        public class FieldCriteria extends SelectionCriteria {
025:            // PAW
026:            //	static FieldCriteria buildEqualToCriteria(Object anAttribute, Object aValue, String anAlias)
027:            static FieldCriteria buildEqualToCriteria(Object anAttribute,
028:                    Object aValue, UserAlias anAlias) {
029:                return new FieldCriteria(anAttribute, aValue, EQUAL, anAlias);
030:            }
031:
032:            // PAW
033:            //	static FieldCriteria buildNotEqualToCriteria(Object anAttribute, Object aValue, String anAlias)
034:            static FieldCriteria buildNotEqualToCriteria(Object anAttribute,
035:                    Object aValue, UserAlias anAlias) {
036:                return new FieldCriteria(anAttribute, aValue, NOT_EQUAL,
037:                        anAlias);
038:            }
039:
040:            // PAW
041:            //	static FieldCriteria buildGreaterCriteria(Object anAttribute, Object aValue, String anAlias)
042:            static FieldCriteria buildGreaterCriteria(Object anAttribute,
043:                    Object aValue, UserAlias anAlias) {
044:                return new FieldCriteria(anAttribute, aValue, GREATER, anAlias);
045:            }
046:
047:            // PAW
048:            //	static FieldCriteria buildNotGreaterCriteria(Object anAttribute, Object aValue, String anAlias)
049:            static FieldCriteria buildNotGreaterCriteria(Object anAttribute,
050:                    Object aValue, UserAlias anAlias) {
051:                return new FieldCriteria(anAttribute, aValue, NOT_GREATER,
052:                        anAlias);
053:            }
054:
055:            // PAW
056:            //	static FieldCriteria buildLessCriteria(Object anAttribute, Object aValue, String anAlias)
057:            static FieldCriteria buildLessCriteria(Object anAttribute,
058:                    Object aValue, UserAlias anAlias) {
059:                return new FieldCriteria(anAttribute, aValue, LESS, anAlias);
060:            }
061:
062:            // PAW
063:            //	static FieldCriteria buildNotLessCriteria(Object anAttribute, Object aValue, String anAlias)
064:            static FieldCriteria buildNotLessCriteria(Object anAttribute,
065:                    Object aValue, UserAlias anAlias) {
066:                return new FieldCriteria(anAttribute, aValue, NOT_LESS, anAlias);
067:            }
068:
069:            // BRJ: indicate whether field name should be translated into column name
070:            private boolean m_translateField = true;
071:            private String m_clause;
072:
073:            /**
074:             * Constructor declaration
075:             *
076:             * @param anAttribute  column- or fieldName
077:             * @param aValue  the value to compare with
078:             * @param negative  criteria is negated (ie NOT LIKE instead of LIKE)
079:             * @param alias  use alias to link anAttribute to
080:             */
081:            // PAW
082:            //	FieldCriteria(Object anAttribute, Object aValue, String aClause, String alias)
083:            FieldCriteria(Object anAttribute, Object aValue, String aClause,
084:                    UserAlias alias) {
085:                super (anAttribute, aValue, alias);
086:                m_clause = aClause;
087:            }
088:
089:            /**
090:             * @see SelectionCriteria#isBindable()
091:             */
092:            protected boolean isBindable() {
093:                return false;
094:            }
095:
096:            /**
097:             * @return true if field name should be translated into column name
098:             */
099:            public boolean isTranslateField() {
100:                return m_translateField;
101:            }
102:
103:            /**
104:             * @param b
105:             */
106:            void setTranslateField(boolean b) {
107:                m_translateField = b;
108:            }
109:
110:            /* (non-Javadoc)
111:             * @see org.apache.ojb.broker.query.SelectionCriteria#getClause()
112:             */
113:            public String getClause() {
114:                return m_clause;
115:            }
116:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.