Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / types / Orderable.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/types/Orderable.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/types/Orderable.java
new file mode 100644 (file)
index 0000000..3447774
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.types.Orderable\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.types;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+/** \r
+\r
+  The Orderable interface represents a value that can\r
+  be linearly ordered.\r
+  <P>\r
+  Currently only supports linear (<, =, <=) operations.\r
+  Eventually we may want to do other types of orderings,\r
+  in which case there would probably be a number of interfaces\r
+  for each "class" of ordering.\r
+  <P>\r
+  The implementation must handle the comparison of null\r
+  values.  This may require some changes to the interface,\r
+  since (at least in some contexts) comparing a value with\r
+  null should return unknown instead of true or false.\r
+\r
+**/\r
+\r
+public interface Orderable\r
+{\r
+\r
+       /**      Ordering operation constant representing '<' **/\r
+       static final int ORDER_OP_LESSTHAN = 1;\r
+       /**      Ordering operation constant representing '=' **/\r
+       static final int ORDER_OP_EQUALS = 2;\r
+       /**      Ordering operation constant representing '<=' **/\r
+       static final int ORDER_OP_LESSOREQUALS = 3;\r
+\r
+       /** \r
+        * These 2 ordering operations are used by the language layer\r
+        * when flipping the operation due to type precedence rules.\r
+        * (For example, 1 < 1.1 -> 1.1 > 1)\r
+        */\r
+       /**      Ordering operation constant representing '>' **/\r
+       static final int ORDER_OP_GREATERTHAN = 4;\r
+       /**      Ordering operation constant representing '>=' **/\r
+       static final int ORDER_OP_GREATEROREQUALS = 5;\r
+\r
+\r
+}\r