--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.catalog.Dependable\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.catalog;\r
+\r
+/**\r
+ \r
+ * A Dependable is an in-memory representation of an object managed\r
+ * by the Dependency System.\r
+ * \r
+ * There are two kinds of Dependables:\r
+ * Providers and Dependents. Dependents depend on Providers and\r
+ * are responsible for executing compensating logic when their\r
+ * Providers change.\r
+ * <P>\r
+ * The fields represent the known Dependables.\r
+ * <P>\r
+ * Persistent dependencies (those between database objects) are\r
+ * stored in SYS.SYSDEPENDS.\r
+ *\r
+ * @see org.apache.derby.catalog.DependableFinder\r
+ */\r
+public interface Dependable\r
+{\r
+ /*\r
+ * Universe of known Dependables. \r
+ */\r
+\r
+ public static final String ALIAS = "Alias";\r
+ public static final String CONGLOMERATE = "Conglomerate";\r
+ public static final String CONSTRAINT = "Constraint";\r
+ public static final String DEFAULT = "Default";\r
+ public static final String HEAP = "Heap";\r
+ public static final String INDEX = "Index";\r
+ public static final String PREPARED_STATEMENT = "PreparedStatement";\r
+ public static final String FILE = "File";\r
+ public static final String STORED_PREPARED_STATEMENT = "StoredPreparedStatement";\r
+ public static final String TABLE = "Table";\r
+ public static final String COLUMNS_IN_TABLE = "ColumnsInTable";\r
+ public static final String TRIGGER = "Trigger";\r
+ public static final String VIEW = "View";\r
+ public static final String SCHEMA = "Schema";\r
+ public static final String TABLE_PERMISSION = "TablePrivilege";\r
+ public static final String COLUMNS_PERMISSION = "ColumnsPrivilege";\r
+ public static final String ROUTINE_PERMISSION = "RoutinePrivilege";\r
+\r
+\r
+ /**\r
+ * Get an object which can be written to disk and which,\r
+ * when read from disk, will find or reconstruct this in-memory\r
+ * Dependable.\r
+ *\r
+ * @return A Finder object that can be written to disk if this is a\r
+ * Persistent Dependable.\r
+ * Null if this is not a persistent dependable.\r
+ */\r
+ public DependableFinder getDependableFinder();\r
+\r
+\r
+ /**\r
+ * Get the name of this Dependable OBJECT. This is useful\r
+ * for diagnostic messages.\r
+ *\r
+ * @return Name of Dependable OBJECT.\r
+ */\r
+ public String getObjectName();\r
+\r
+\r
+ /**\r
+ * Get the UUID of this Dependable OBJECT.\r
+ *\r
+ * @return UUID of this OBJECT.\r
+ */\r
+ public UUID getObjectID();\r
+\r
+\r
+ /**\r
+ * Return whether or not this Dependable is persistent. Persistent\r
+ * dependencies are stored in SYS.SYSDEPENDS.\r
+ *\r
+ * @return true if this Dependable is persistent.\r
+ */\r
+ public boolean isPersistent();\r
+\r
+\r
+ /**\r
+ * Get the unique class id for the Dependable.\r
+ * Every Dependable belongs to a class of Dependables. \r
+ *\r
+ * @return type of this Dependable.\r
+ */\r
+ public String getClassType();\r
+}\r