--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.sql.dictionary.SubCheckConstraintDescriptor\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
+\r
+import org.apache.derby.catalog.ReferencedColumns;\r
+import org.apache.derby.catalog.UUID;\r
+\r
+import org.apache.derby.iapi.services.sanity.SanityManager;\r
+/**\r
+ * This interface is used to get information from a SubCheckConstraintDescriptor.\r
+ * A SubCheckConstraintDescriptor is used within the DataDictionary to \r
+ * get auxiliary constraint information from the system table\r
+ * that is auxiliary to sysconstraints.\r
+ *\r
+ * @version 0.1\r
+ */\r
+\r
+public class SubCheckConstraintDescriptor extends SubConstraintDescriptor\r
+{\r
+ /** public interface to this class:\r
+ <ol>\r
+ <li>public String getConstraintText();</li>\r
+ <li>public ReferencedColumns getReferencedColumnsDescriptor();</li>\r
+ </ol>\r
+ */\r
+\r
+ // Implementation\r
+ private ReferencedColumns referencedColumns;\r
+ private String constraintText;\r
+\r
+ /**\r
+ * Constructor for a SubCheckConstraintDescriptor\r
+ *\r
+ * @param constraintId The UUID of the constraint.\r
+ * @param constraintText The text of the constraint definition.\r
+ * @param referencedColumns The columns referenced by the check constraint\r
+ */\r
+\r
+ public SubCheckConstraintDescriptor(UUID constraintId, String constraintText,\r
+ ReferencedColumns referencedColumns)\r
+ {\r
+ super(constraintId);\r
+ this.constraintText = constraintText;\r
+ this.referencedColumns = referencedColumns;\r
+ }\r
+\r
+ /**\r
+ * Get the text of the check constraint definition.\r
+ *\r
+ * @return The text of the check constraint definition.\r
+ */\r
+ public String getConstraintText()\r
+ {\r
+ return constraintText;\r
+ }\r
+\r
+ /**\r
+ * Get the ReferencedColumns.\r
+ *\r
+ * @return The ReferencedColumns.\r
+ */\r
+ public ReferencedColumns getReferencedColumnsDescriptor()\r
+ {\r
+ return referencedColumns;\r
+ }\r
+\r
+ /**\r
+ * Does this constraint have a backing index?\r
+ *\r
+ * @return boolean Whether or not there is a backing index for this constraint.\r
+ */\r
+ public boolean hasBackingIndex()\r
+ {\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Convert the SubCheckConstraintDescriptor to a String.\r
+ *\r
+ * @return A String representation of this SubCheckConstraintDescriptor\r
+ */\r
+\r
+ public String toString()\r
+ {\r
+ if (SanityManager.DEBUG)\r
+ {\r
+ return "constraintText: " + constraintText + "\n" +\r
+ super.toString();\r
+ }\r
+ else\r
+ {\r
+ return "";\r
+ }\r
+ }\r
+\r
+}\r