Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / sql / ResultColumnDescriptor.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/ResultColumnDescriptor.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/ResultColumnDescriptor.java
new file mode 100644 (file)
index 0000000..237127f
--- /dev/null
@@ -0,0 +1,111 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.sql.ResultColumnDescriptor\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;\r
+\r
+import org.apache.derby.iapi.types.DataTypeDescriptor;\r
+\r
+/**\r
+ * A ResultColumnDescriptor describes a result column in a ResultSet.\r
+ *\r
+ */\r
+\r
+public interface ResultColumnDescriptor\r
+{\r
+       /**\r
+        * Returns a DataTypeDescriptor for the column. This DataTypeDescriptor\r
+        * will not represent an actual value, it will only represent the type\r
+        * that all values in the column will have.\r
+        *\r
+        * @return      A DataTypeDescriptor describing the type of the column.\r
+        */\r
+       DataTypeDescriptor      getType();\r
+\r
+       /**\r
+        * Returns the name of the Column.\r
+        *\r
+        * @return      A String containing the name of the column.\r
+        */\r
+       String  getName();\r
+\r
+       /**\r
+        * Get the name of the schema for the Column's base table, if any.\r
+        * Following example queries will all return APP (assuming user is in schema APP)\r
+        * select t.a from t\r
+        * select b.a from t as b\r
+        * select app.t.a from t\r
+        *\r
+        * @return      The name of the schema of the Column's base table. If the column\r
+        *              is not in a schema (i.e. is a derived column), it returns NULL.\r
+        */\r
+       String  getSourceSchemaName();\r
+\r
+       /**\r
+        * Get the name of the underlying(base) table this column comes from, if any.\r
+        * Following example queries will all return T\r
+        * select a from t\r
+        * select b.a from t as b\r
+        * select t.a from t\r
+        *\r
+        * @return      A String containing the name of the base table of the Column\r
+        *              is in. If the column is not in a table (i.e. is a\r
+        *              derived column), it returns NULL.\r
+        * @return      The name of the Column's base table. If the column\r
+        *              is not in a schema (i.e. is a derived column), it returns NULL.\r
+        */\r
+       String  getSourceTableName();\r
+\r
+       /**\r
+        * Return true if the column is wirtable by a positioned update.\r
+        *\r
+        * @return TRUE, if the column is a base column of a table and is \r
+        * writable by a positioned update.\r
+        */\r
+       boolean updatableByCursor();\r
+\r
+       /**\r
+        * Get the position of the Column.\r
+        * NOTE - position is 1-based.\r
+        *\r
+        * @return      An int containing the position of the Column\r
+        *              within the table.\r
+        */\r
+       int     getColumnPosition();\r
+\r
+       /**\r
+        * Tell us if the column is an autoincrement column or not.\r
+        * \r
+        * @return TRUE, if the column is a base column of a table and is an\r
+        * autoincrement column.\r
+        */\r
+       boolean isAutoincrement();\r
+\r
+       /*\r
+        * NOTE: These interfaces are intended to support JDBC. There are some\r
+        * JDBC methods on java.sql.ResultSetMetaData that have no equivalent\r
+        * here, mainly because they are of questionable use to us.  They are:\r
+        * getCatalogName() (will we support catalogs?), getColumnLabel(),\r
+        * isCaseSensitive(), isCurrency(),\r
+        * isDefinitelyWritable(), isReadOnly(), isSearchable(), isSigned(),\r
+        * isWritable()). The JDBC driver implements these itself, using\r
+        * the data type information and knowing data type characteristics.\r
+        */\r
+}\r