Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / sql / execute / ExecIndexRow.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/execute/ExecIndexRow.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/execute/ExecIndexRow.java
new file mode 100644 (file)
index 0000000..db4c8c0
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.sql.execute.ExecIndexRow\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.sql.execute;\r
+\r
+/**\r
+ * This is an extension of ExecRow for use\r
+ * with indexes and sorting.\r
+ *\r
+ */\r
+public interface ExecIndexRow extends ExecRow  {\r
+\r
+       /**\r
+        * These two methods are a sort of a hack.  The store implements ordered\r
+        * null semantics for start and stop positioning, which is correct for\r
+        * IS NULL and incorrect for everything else.  To work around this,\r
+        * TableScanResultSet will check whether the start and stop positions\r
+        * have NULL in any column position other than for an IS NULL check.\r
+        * If so, it won't do the scan (that is, it will return no rows).\r
+        *\r
+        * This method is to inform this ExecIndexRow (which can be used for\r
+        * start and stop positioning) that the given column uses ordered null\r
+        * semantics.\r
+        *\r
+        * @param columnPosition        The position of the column that uses ordered\r
+        *                                                      null semantics (zero-based).\r
+        */\r
+       void orderedNulls(int columnPosition);\r
+\r
+       /**\r
+        * Return true if orderedNulls was called on this ExecIndexRow for\r
+        * the given column position.\r
+        *\r
+        * @param columnPosition        The position of the column (zero-based) for\r
+        *                                                      which we want to check if ordered null semantics\r
+        *                                                      are used.\r
+        *\r
+        * @return      true if we are to use ordered null semantics on the given column\r
+        */\r
+       boolean areNullsOrdered(int columnPosition);\r
+\r
+       /**\r
+        * Turn the ExecRow into an ExecIndexRow.\r
+        */\r
+       public void execRowToExecIndexRow(ExecRow valueRow);\r
+}\r