KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > catalog > Dependable


1 /*
2
3    Derby - Class org.apache.derby.catalog.Dependable
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.catalog;
23
24 /**
25     
26   * A Dependable is an in-memory representation of an object managed
27   * by the Dependency System.
28   *
29   * There are two kinds of Dependables:
30   * Providers and Dependents. Dependents depend on Providers and
31   * are responsible for executing compensating logic when their
32   * Providers change.
33   * <P>
34   * The fields represent the known Dependables.
35   * <P>
36   * Persistent dependencies (those between database objects) are
37   * stored in SYS.SYSDEPENDS.
38   *
39   * @see org.apache.derby.catalog.DependableFinder
40   */

41 public interface Dependable
42 {
43     /*
44       * Universe of known Dependables.
45       */

46
47     public static final String JavaDoc ALIAS = "Alias";
48     public static final String JavaDoc CONGLOMERATE = "Conglomerate";
49     public static final String JavaDoc CONSTRAINT = "Constraint";
50     public static final String JavaDoc DEFAULT = "Default";
51     public static final String JavaDoc HEAP = "Heap";
52     public static final String JavaDoc INDEX = "Index";
53     public static final String JavaDoc PREPARED_STATEMENT = "PreparedStatement";
54     public static final String JavaDoc FILE = "File";
55     public static final String JavaDoc STORED_PREPARED_STATEMENT = "StoredPreparedStatement";
56     public static final String JavaDoc TABLE = "Table";
57     public static final String JavaDoc COLUMNS_IN_TABLE = "ColumnsInTable";
58     public static final String JavaDoc TRIGGER = "Trigger";
59     public static final String JavaDoc VIEW = "View";
60     public static final String JavaDoc SCHEMA = "Schema";
61     public static final String JavaDoc TABLE_PERMISSION = "TablePrivilege";
62     public static final String JavaDoc COLUMNS_PERMISSION = "ColumnsPrivilege";
63     public static final String JavaDoc ROUTINE_PERMISSION = "RoutinePrivilege";
64
65
66     /**
67       * Get an object which can be written to disk and which,
68       * when read from disk, will find or reconstruct this in-memory
69       * Dependable.
70       *
71       * @return A Finder object that can be written to disk if this is a
72       * Persistent Dependable.
73       * Null if this is not a persistent dependable.
74       */

75     public DependableFinder getDependableFinder();
76
77
78     /**
79       * Get the name of this Dependable OBJECT. This is useful
80       * for diagnostic messages.
81       *
82       * @return Name of Dependable OBJECT.
83       */

84     public String JavaDoc getObjectName();
85
86
87     /**
88       * Get the UUID of this Dependable OBJECT.
89       *
90       * @return UUID of this OBJECT.
91       */

92     public UUID getObjectID();
93
94
95     /**
96       * Return whether or not this Dependable is persistent. Persistent
97       * dependencies are stored in SYS.SYSDEPENDS.
98       *
99       * @return true if this Dependable is persistent.
100       */

101     public boolean isPersistent();
102
103
104     /**
105       * Get the unique class id for the Dependable.
106       * Every Dependable belongs to a class of Dependables.
107       *
108       * @return type of this Dependable.
109       */

110     public String JavaDoc getClassType();
111 }
112
Popular Tags