Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / sql / dictionary / TupleDescriptor.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/dictionary/TupleDescriptor.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/dictionary/TupleDescriptor.java
new file mode 100644 (file)
index 0000000..55b5775
--- /dev/null
@@ -0,0 +1,127 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.sql.dictionary.TupleDescriptor\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.dictionary;\r
+\r
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+import org.apache.derby.catalog.DependableFinder;\r
+import org.apache.derby.iapi.services.sanity.SanityManager;\r
+\r
+import org.apache.derby.iapi.reference.SQLState;\r
+\r
+// is it OK to do this?\r
+import org.apache.derby.impl.sql.catalog.DDdependableFinder;\r
+import org.apache.derby.impl.sql.catalog.DDColumnDependableFinder;\r
+\r
+/**\r
+ * This is the superclass of all Descriptors. Users of DataDictionary should use\r
+ * the specific descriptor.\r
+ *\r
+ */\r
+\r
+public class TupleDescriptor\r
+{\r
+       //////////////////////////////////////////////////////////////////\r
+       //\r
+       //      CONSTANTS\r
+       //\r
+       //////////////////////////////////////////////////////////////////\r
+\r
+\r
+       //////////////////////////////////////////////////////////////////\r
+       //\r
+       //      STATE\r
+       //\r
+       //////////////////////////////////////////////////////////////////\r
+\r
+       private     DataDictionary      dataDictionary;\r
+\r
+       //////////////////////////////////////////////////////////////////\r
+       //\r
+       //      CONSTRUCTOR\r
+       //\r
+       //////////////////////////////////////////////////////////////////\r
+\r
+       public  TupleDescriptor() {}\r
+\r
+       public TupleDescriptor(DataDictionary dataDictionary) \r
+       {\r
+               this.dataDictionary = dataDictionary;\r
+       }\r
+\r
+       protected DataDictionary getDataDictionary()\r
+       {\r
+               return dataDictionary;\r
+       }\r
+\r
+       protected void setDataDictionary(DataDictionary dd) \r
+       {\r
+               dataDictionary = dd;\r
+       }\r
+\r
+       /**\r
+        * Is this provider persistent?  A stored dependency will be required\r
+        * if both the dependent and provider are persistent.\r
+        *\r
+        * @return boolean              Whether or not this provider is persistent.\r
+        */\r
+       public boolean isPersistent()\r
+       {\r
+               return true;\r
+       }\r
+\r
+\r
+       //////////////////////////////////////////////////////////////////\r
+       //\r
+       //      BEHAVIOR. These are only used by Replication!!\r
+       //\r
+       //////////////////////////////////////////////////////////////////\r
+\r
+\r
+       public DependableFinder getDependableFinder(int formatId)\r
+       {\r
+               return  new DDdependableFinder(formatId);\r
+       }\r
+\r
+       DependableFinder getColumnDependableFinder(int formatId, byte[]\r
+                                                                                                         columnBitMap)\r
+       {\r
+               return new DDColumnDependableFinder(formatId, columnBitMap);\r
+       }\r
+       \r
+       /** Each descriptor must identify itself with its type; i.e index, check\r
+        * constraint whatever.\r
+        */\r
+       public String getDescriptorType()\r
+       {\r
+               if (SanityManager.DEBUG) {SanityManager.NOTREACHED(); }\r
+               return null; \r
+       }\r
+       /* each descriptor has a name\r
+        */\r
+       public String getDescriptorName()\r
+       {\r
+               if (SanityManager.DEBUG) {SanityManager.NOTREACHED(); }\r
+               return null; \r
+       }\r
+}\r