Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / impl / store / access / UTFQualifier.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/impl/store/access/UTFQualifier.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/impl/store/access/UTFQualifier.java
new file mode 100644 (file)
index 0000000..e720a10
--- /dev/null
@@ -0,0 +1,125 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.impl.store.access.UTFQualifier\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.impl.store.access;\r
+\r
+import org.apache.derby.iapi.types.DataValueDescriptor;\r
+\r
+import org.apache.derby.iapi.store.access.Qualifier;\r
+\r
+/**\r
+*/\r
+public class UTFQualifier implements Qualifier\r
+{\r
+    private UTF      value;\r
+       private int              columnId;\r
+\r
+       public UTFQualifier(int columnId, String value) {\r
+\r
+               this.columnId = columnId;\r
+               this.value = new UTF(value);\r
+       }\r
+\r
+       /*\r
+       ** Qualifier interface\r
+       */\r
+\r
+       /** Get the id of the column to be qualified. **/\r
+       public int getColumnId() {\r
+               return columnId;\r
+       }\r
+\r
+       /**\r
+        * Get the value that the column is to be compared to.\r
+        *\r
+        * @exception StandardException         Thrown on error\r
+        */\r
+       public DataValueDescriptor getOrderable() {\r
+               return value;\r
+       }\r
+\r
+       /** Get the operator to use in the comparison. \r
+     *\r
+     *  @see DataValueDescriptor#compare\r
+     **/\r
+       public int getOperator() {\r
+               return DataValueDescriptor.ORDER_OP_EQUALS;\r
+\r
+       }\r
+\r
+       /** \r
+     *  Determine if the result from the compare operation is to be negated.  \r
+     *  <p>\r
+     *  If true then only rows which fail the compare operation will qualify.\r
+     *\r
+     *  @see DataValueDescriptor#compare\r
+     **/\r
+       public boolean negateCompareResult() {\r
+               return false;\r
+       }\r
+\r
+       /** \r
+     *  \r
+     *  @see Qualifier#getOrderedNulls\r
+     **/\r
+    public boolean getOrderedNulls() {\r
+               return false;\r
+       }\r
+\r
+       /** Get the getOrderedNulls argument to use in the comparison.\r
+     *  \r
+     *  @see DataValueDescriptor#compare\r
+     **/\r
+    public boolean getUnknownRV() {\r
+               return false;\r
+       }\r
+\r
+       /** Clear the DataValueDescriptor cache, if one exists.\r
+        *  (The DataValueDescriptor can be 1 of 3 types:\r
+        *              o  VARIANT                - cannot be cached as its value can \r
+        *                                                      vary within a scan\r
+        *              o  SCAN_INVARIANT - can be cached within a scan as its\r
+        *                                                      value will not change within a scan\r
+        *              o  QUERY_INVARIANT- can be cached across the life of the query\r
+        *                                                      as its value will never change\r
+        *              o  CONSTANT           - can be cached across executions\r
+     *  \r
+     *  @see Qualifier#getUnknownRV\r
+        */\r
+       public void clearOrderableCache()\r
+       {\r
+       }\r
+\r
+       /** \r
+        * This method reinitializes all the state of\r
+        * the Qualifier.  It is used to distinguish between\r
+        * resetting something that is query invariant\r
+        * and something that is constant over every\r
+        * execution of a query.  Basically, clearOrderableCache()\r
+        * will only clear out its cache if it is a VARIANT\r
+        * or SCAN_INVARIANT value.  However, each time a\r
+        * query is executed, the QUERY_INVARIANT qualifiers need\r
+        * to be reset.\r
+        */\r
+       public void reinitialize()\r
+       {\r
+       }\r
+}\r