--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.impl.sql.execute.IndexConstantAction\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.sql.execute;\r
+\r
+import org.apache.derby.catalog.UUID;\r
+import org.apache.derby.iapi.services.sanity.SanityManager;\r
+\r
+/**\r
+ * This class is the superclass for the classes that describe actions \r
+ * that are ALWAYS performed for a CREATE/DROP INDEX Statement at Execution time.\r
+ *\r
+ */\r
+\r
+public abstract class IndexConstantAction extends DDLSingleTableConstantAction\r
+{\r
+\r
+ String indexName;\r
+ String tableName;\r
+ String schemaName;\r
+\r
+ // CONSTRUCTORS\r
+\r
+ /**\r
+ * Make the ConstantAction for a CREATE/DROP INDEX statement.\r
+ *\r
+ * @param tableId The table uuid\r
+ * @param indexName Index name.\r
+ * @param tableName The table name\r
+ * @param schemaName Schema that index lives in.\r
+ *\r
+ */\r
+ protected IndexConstantAction(\r
+ UUID tableId,\r
+ String indexName,\r
+ String tableName,\r
+ String schemaName)\r
+ {\r
+ super(tableId);\r
+ this.indexName = indexName;\r
+ this.tableName = tableName;\r
+ this.schemaName = schemaName;\r
+\r
+ if (SanityManager.DEBUG)\r
+ {\r
+ SanityManager.ASSERT(schemaName != null, "Schema name is null");\r
+ }\r
+ }\r
+\r
+ // CLASS METHODS\r
+\r
+ /**\r
+ * Get the index name.\r
+ *\r
+ * @return the name of the index\r
+ */\r
+ public String getIndexName() { return indexName; }\r
+\r
+ /**\r
+ * Set the index name at execution time.\r
+ * Useful for unnamed constraints which have a backing index.\r
+ *\r
+ * @param indexName The (generated) index name.\r
+ */\r
+ public void setIndexName(String indexName)\r
+ {\r
+ this.indexName = indexName;\r
+ }\r
+}\r