Source Code Cross Referenced for BinaryExpression.java in  » Database-ORM » JPOX » org » jpox » store » expression » 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 » JPOX » org.jpox.store.expression 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************
002:        Copyright (c) 2003 Andy Jefferson and others. All rights reserved. 
003:        Licensed under the Apache License, Version 2.0 (the "License");
004:        you may not use this file except in compliance with the License.
005:        You may obtain a copy of the License at
006:
007:            http://www.apache.org/licenses/LICENSE-2.0
008:
009:        Unless required by applicable law or agreed to in writing, software
010:        distributed under the License is distributed on an "AS IS" BASIS,
011:        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012:        See the License for the specific language governing permissions and
013:        limitations under the License. 
014:         
015:
016:        Contributors:
017:            ...
018:         **********************************************************************/package org.jpox.store.expression;
019:
020:        import java.util.List;
021:
022:        import org.jpox.store.mapping.JavaTypeMapping;
023:
024:        /**
025:         * Expression for binary object.
026:         *
027:         * @version $Revision: 1.6 $
028:         **/
029:        public class BinaryExpression extends ScalarExpression {
030:            /**
031:             * Constructor
032:             * @param qs the QueryExpression
033:             */
034:            protected BinaryExpression(QueryExpression qs) {
035:                super (qs);
036:            }
037:
038:            /**
039:             * 
040:             * @param qs the QueryExpression
041:             * @param mapping the mapping associated to this expression
042:             * @param te the TableExpression where this expression refers to
043:             */
044:            public BinaryExpression(QueryExpression qs,
045:                    JavaTypeMapping mapping, LogicSetExpression te) {
046:                super (qs, mapping, te);
047:            }
048:
049:            /**
050:             * Generates statement as e.g. FUNCTION_NAME(arg[,argN])
051:             * @param functionName
052:             * @param args ScalarExpression list
053:             */
054:            public BinaryExpression(String functionName, List args) {
055:                super (functionName, args);
056:            }
057:
058:            /**
059:             * Performs a function on two binary expressions.
060:             * op(operand1,operand2)
061:             * operand1 op operand2 
062:             * @param operand1 the first expression
063:             * @param op the operator between operands
064:             * @param operand2 the second expression
065:             */
066:            public BinaryExpression(ScalarExpression operand1,
067:                    DyadicOperator op, ScalarExpression operand2) {
068:                super (operand1, op, operand2);
069:            }
070:
071:            public BooleanExpression eq(ScalarExpression expr) {
072:                if (expr instanceof  NullLiteral) {
073:                    return expr.eq(this );
074:                } else if (expr instanceof  BinaryExpression) {
075:                    return new BooleanExpression(this , OP_EQ, expr);
076:                } else {
077:                    return super .eq(expr);
078:                }
079:            }
080:
081:            public BooleanExpression noteq(ScalarExpression expr) {
082:                if (expr instanceof  NullLiteral) {
083:                    return expr.noteq(this );
084:                } else if (expr instanceof  BinaryExpression) {
085:                    return new BooleanExpression(this , OP_NOTEQ, expr);
086:                } else {
087:                    return super .noteq(expr);
088:                }
089:            }
090:
091:            public BooleanExpression lt(ScalarExpression expr) {
092:                if (expr instanceof  BinaryExpression) {
093:                    return new BooleanExpression(this , OP_LT, expr);
094:                } else {
095:                    return super .lt(expr);
096:                }
097:            }
098:
099:            public BooleanExpression lteq(ScalarExpression expr) {
100:                if (expr instanceof  BinaryExpression) {
101:                    return new BooleanExpression(this , OP_LTEQ, expr);
102:                } else {
103:                    return super .lteq(expr);
104:                }
105:            }
106:
107:            public BooleanExpression gt(ScalarExpression expr) {
108:                if (expr instanceof  BinaryExpression) {
109:                    return new BooleanExpression(this , OP_GT, expr);
110:                } else {
111:                    return super .gt(expr);
112:                }
113:            }
114:
115:            public BooleanExpression gteq(ScalarExpression expr) {
116:                if (expr instanceof  BinaryExpression) {
117:                    return new BooleanExpression(this , OP_GTEQ, expr);
118:                } else {
119:                    return super .gteq(expr);
120:                }
121:            }
122:
123:            public ScalarExpression add(ScalarExpression expr) {
124:                if (expr instanceof  BinaryExpression) {
125:                    return new BinaryExpression(this , OP_CONCAT, expr);
126:                } else {
127:                    return super .add(expr);
128:                }
129:            }
130:
131:            public BooleanExpression in(ScalarExpression expr) {
132:                return new BooleanExpression(this, OP_IN, expr);
133:            }
134:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.