openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r954905 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps: EqualTypeExpression.java NotEqualTypeExpression.java
Date Tue, 15 Jun 2010 14:16:06 GMT
Author: mikedd
Date: Tue Jun 15 14:16:06 2010
New Revision: 954905

URL: http://svn.apache.org/viewvc?rev=954905&view=rev
Log:
 OPENJPA-1696: setting eol-style

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/EqualTypeExpression.java
  (contents, props changed)
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualTypeExpression.java
  (contents, props changed)

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/EqualTypeExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/EqualTypeExpression.java?rev=954905&r1=954904&r2=954905&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/EqualTypeExpression.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/EqualTypeExpression.java
Tue Jun 15 14:16:06 2010
@@ -1,90 +1,90 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-package org.apache.openjpa.jdbc.kernel.exps;
-
-import org.apache.openjpa.jdbc.meta.ClassMapping;
-import org.apache.openjpa.jdbc.sql.SQLBuffer;
-import org.apache.openjpa.jdbc.sql.Select;
-
-/**
- * Compares two entity types.
- *
- * @author Catalina Wei
- */
-class EqualTypeExpression
-    extends CompareEqualExpression {
-
-    /**
-     * Constructor. Supply values to compare.
-     */
-    public EqualTypeExpression(Val val1, Val val2) {
-        super(val1, val2);
-    }
-
-    public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, 
-        SQLBuffer buf, boolean val1Null, boolean val2Null) {
-        if (val1Null && val2Null)
-            buf.append("1 = 1");
-        else if (val1Null || val2Null) {
-            Val val = (val1Null) ? getValue2() : getValue1();
-            ExpState state = (val1Null) ? bstate.state2 : bstate.state1;
-            if (!isDirectComparison()) {
-                int len = val.length(sel, ctx, state);
-                for (int i = 0; i < len; i++) {
-                    if (i > 0)
-                        buf.append(" AND ");
-                    val.appendTo(sel, ctx, state, buf, i);
-                    buf.append(" IS ").appendValue(null);
-                }
-            } else
-                val.appendIsNull(sel, ctx, state, buf);
-        } else {
-            Val val1 = getValue1();
-            Val val2 = getValue2();
-            if (val1.length(sel, ctx, bstate.state1) == 1 
-                && val2.length(sel, ctx, bstate.state2) == 1) {
-                String op = "=";
-                if (sel.getTablePerClassMeta() != null) {
-                    if (val1 instanceof Type) {
-                        if ((ClassMapping) val2.getMetaData() != sel.getTablePerClassMeta())
-                            op = "<>";
-                    }
-                    else {
-                        if ((ClassMapping) val1.getMetaData() != sel.getTablePerClassMeta())
-                            op = "<>";
-                    }
-                }
-                ctx.store.getDBDictionary().comparison(buf, op,
-                    new FilterValueImpl(sel, ctx, bstate.state1, val1),
-                    new FilterValueImpl(sel, ctx, bstate.state2, val2));
-            } else {
-                int len = java.lang.Math.min(val1.length(sel, ctx, 
-                    bstate.state1), val2.length(sel, ctx, bstate.state2));
-                for (int i = 0; i < len; i++) {
-                    if (i > 0)
-                        buf.append(" AND ");
-
-                    val1.appendTo(sel, ctx, bstate.state1, buf, i);
-                    buf.append(" = ");
-                    val2.appendTo(sel, ctx, bstate.state2, buf, i);
-                }
-            }
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.jdbc.kernel.exps;
+
+import org.apache.openjpa.jdbc.meta.ClassMapping;
+import org.apache.openjpa.jdbc.sql.SQLBuffer;
+import org.apache.openjpa.jdbc.sql.Select;
+
+/**
+ * Compares two entity types.
+ *
+ * @author Catalina Wei
+ */
+class EqualTypeExpression
+    extends CompareEqualExpression {
+
+    /**
+     * Constructor. Supply values to compare.
+     */
+    public EqualTypeExpression(Val val1, Val val2) {
+        super(val1, val2);
+    }
+
+    public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, 
+        SQLBuffer buf, boolean val1Null, boolean val2Null) {
+        if (val1Null && val2Null)
+            buf.append("1 = 1");
+        else if (val1Null || val2Null) {
+            Val val = (val1Null) ? getValue2() : getValue1();
+            ExpState state = (val1Null) ? bstate.state2 : bstate.state1;
+            if (!isDirectComparison()) {
+                int len = val.length(sel, ctx, state);
+                for (int i = 0; i < len; i++) {
+                    if (i > 0)
+                        buf.append(" AND ");
+                    val.appendTo(sel, ctx, state, buf, i);
+                    buf.append(" IS ").appendValue(null);
+                }
+            } else
+                val.appendIsNull(sel, ctx, state, buf);
+        } else {
+            Val val1 = getValue1();
+            Val val2 = getValue2();
+            if (val1.length(sel, ctx, bstate.state1) == 1 
+                && val2.length(sel, ctx, bstate.state2) == 1) {
+                String op = "=";
+                if (sel.getTablePerClassMeta() != null) {
+                    if (val1 instanceof Type) {
+                        if ((ClassMapping) val2.getMetaData() != sel.getTablePerClassMeta())
+                            op = "<>";
+                    }
+                    else {
+                        if ((ClassMapping) val1.getMetaData() != sel.getTablePerClassMeta())
+                            op = "<>";
+                    }
+                }
+                ctx.store.getDBDictionary().comparison(buf, op,
+                    new FilterValueImpl(sel, ctx, bstate.state1, val1),
+                    new FilterValueImpl(sel, ctx, bstate.state2, val2));
+            } else {
+                int len = java.lang.Math.min(val1.length(sel, ctx, 
+                    bstate.state1), val2.length(sel, ctx, bstate.state2));
+                for (int i = 0; i < len; i++) {
+                    if (i > 0)
+                        buf.append(" AND ");
+
+                    val1.appendTo(sel, ctx, bstate.state1, buf, i);
+                    buf.append(" = ");
+                    val2.appendTo(sel, ctx, bstate.state2, buf, i);
+                }
+            }
+        }
+    }
+}

Propchange: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/EqualTypeExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualTypeExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualTypeExpression.java?rev=954905&r1=954904&r2=954905&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualTypeExpression.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualTypeExpression.java
Tue Jun 15 14:16:06 2010
@@ -1,87 +1,87 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-package org.apache.openjpa.jdbc.kernel.exps;
-
-import org.apache.openjpa.jdbc.meta.ClassMapping;
-import org.apache.openjpa.jdbc.sql.SQLBuffer;
-import org.apache.openjpa.jdbc.sql.Select;
-
-/**
- * Compares two entity types.
- *
- * @author Catalina Wei
- */
-class NotEqualTypeExpression
-    extends CompareEqualExpression {
-
-    /**
-     * Constructor. Supply values to compare.
-     */
-    public NotEqualTypeExpression(Val val1, Val val2) {
-        super(val1, val2);
-    }
-
-    public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, 
-        SQLBuffer buf, boolean val1Null, boolean val2Null) {
-        if (val1Null && val2Null)
-            buf.append("1 <> 1");
-        else if (val1Null || val2Null) {
-            Val val = (val1Null) ? getValue2() : getValue1();
-            ExpState state = (val1Null) ? bstate.state2 : bstate.state1;
-            if (!isDirectComparison()) {
-                int len = val.length(sel, ctx, state);
-                for (int i = 0; i < len; i++) {
-                    if (i > 0)
-                        buf.append(" AND ");
-                    val.appendTo(sel, ctx, state, buf, i);
-                    buf.append(" IS NOT ").appendValue(null);
-                }
-            } else
-                val.appendIsNotNull(sel, ctx, state, buf);
-        } else {
-            Val val1 = getValue1();
-            Val val2 = getValue2();
-            if (val1.length(sel, ctx, bstate.state1) == 1 
-                && val2.length(sel, ctx, bstate.state2) == 1) {
-                String op = "<>";
-                if (val1 instanceof Type)
-                    if ((ClassMapping) val2.getMetaData() != sel.getTablePerClassMeta())
-                        op = "=";
-                else
-                    if ((ClassMapping) val1.getMetaData() != sel.getTablePerClassMeta())
-                        op = "=";
-                ctx.store.getDBDictionary().comparison(buf, op,
-                    new FilterValueImpl(sel, ctx, bstate.state1, val1),
-                    new FilterValueImpl(sel, ctx, bstate.state2, val2));
-            } else {
-                int len = java.lang.Math.max(val1.length(sel, ctx, 
-                    bstate.state1), val2.length(sel, ctx, bstate.state2));
-                buf.append("(");
-                for (int i = 0; i < len; i++) {
-                    if (i > 0)
-                        buf.append(" OR ");
-                    val1.appendTo(sel, ctx, bstate.state1, buf, i);
-                    buf.append(" <> ");
-                    val2.appendTo(sel, ctx, bstate.state2, buf, i);
-                }
-                buf.append(")");
-            }
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.jdbc.kernel.exps;
+
+import org.apache.openjpa.jdbc.meta.ClassMapping;
+import org.apache.openjpa.jdbc.sql.SQLBuffer;
+import org.apache.openjpa.jdbc.sql.Select;
+
+/**
+ * Compares two entity types.
+ *
+ * @author Catalina Wei
+ */
+class NotEqualTypeExpression
+    extends CompareEqualExpression {
+
+    /**
+     * Constructor. Supply values to compare.
+     */
+    public NotEqualTypeExpression(Val val1, Val val2) {
+        super(val1, val2);
+    }
+
+    public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, 
+        SQLBuffer buf, boolean val1Null, boolean val2Null) {
+        if (val1Null && val2Null)
+            buf.append("1 <> 1");
+        else if (val1Null || val2Null) {
+            Val val = (val1Null) ? getValue2() : getValue1();
+            ExpState state = (val1Null) ? bstate.state2 : bstate.state1;
+            if (!isDirectComparison()) {
+                int len = val.length(sel, ctx, state);
+                for (int i = 0; i < len; i++) {
+                    if (i > 0)
+                        buf.append(" AND ");
+                    val.appendTo(sel, ctx, state, buf, i);
+                    buf.append(" IS NOT ").appendValue(null);
+                }
+            } else
+                val.appendIsNotNull(sel, ctx, state, buf);
+        } else {
+            Val val1 = getValue1();
+            Val val2 = getValue2();
+            if (val1.length(sel, ctx, bstate.state1) == 1 
+                && val2.length(sel, ctx, bstate.state2) == 1) {
+                String op = "<>";
+                if (val1 instanceof Type)
+                    if ((ClassMapping) val2.getMetaData() != sel.getTablePerClassMeta())
+                        op = "=";
+                else
+                    if ((ClassMapping) val1.getMetaData() != sel.getTablePerClassMeta())
+                        op = "=";
+                ctx.store.getDBDictionary().comparison(buf, op,
+                    new FilterValueImpl(sel, ctx, bstate.state1, val1),
+                    new FilterValueImpl(sel, ctx, bstate.state2, val2));
+            } else {
+                int len = java.lang.Math.max(val1.length(sel, ctx, 
+                    bstate.state1), val2.length(sel, ctx, bstate.state2));
+                buf.append("(");
+                for (int i = 0; i < len; i++) {
+                    if (i > 0)
+                        buf.append(" OR ");
+                    val1.appendTo(sel, ctx, bstate.state1, buf, i);
+                    buf.append(" <> ");
+                    val2.appendTo(sel, ctx, bstate.state2, buf, i);
+                }
+                buf.append(")");
+            }
+        }
+    }
+}

Propchange: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/NotEqualTypeExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message