KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Derby - Class org.apache.derby.catalog.DependableFinder
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 import java.sql.SQLException JavaDoc;
25
26 /**
27     
28   A DependableFinder is an object that can find an in-memory
29   Dependable, given the Dependable's ID.
30   
31   
32   <P>
33   The DependableFinder is able to write itself to disk and,
34   once read back into memory, locate the in-memory Dependable that it
35   represents.
36
37   <P>
38   DependableFinder objects are stored in SYS.SYSDEPENDS to record
39   dependencies between database objects.
40   */

41 public interface DependableFinder
42 {
43     /**
44       * Get the in-memory object associated with the passed-in object ID.
45       *
46       * @param dependableObjectID the ID of a Dependable. Used to locate that Dependable.
47       *
48       * @return the associated Dependable
49       * @exception SQLException thrown on error
50       */

51     public Dependable getDependable(UUID dependableObjectID) throws SQLException JavaDoc;
52
53     /**
54       * Get the in-memory object associated with the passed-in object ID.
55       *
56       * @param dependableObjectID the UUID of the Dependable as a String.
57       * Used to locate that Dependable
58       *
59       * @return the associated Dependable
60       * @exception SQLException thrown on error
61       */

62     public Dependable getDependable(String JavaDoc dependableObjectID) throws SQLException JavaDoc;
63
64     /**
65       * The name of the class of Dependables as a "SQL Object" which this
66       * Finder can find.
67       * This is a value like "Table", "View", or "Publication".
68       * Every DependableFinder can find some class of Dependables.
69       *
70       *
71       * @return String type of the "SQL Object" which this Finder can find.
72       * @see Dependable
73       */

74     public String JavaDoc getSQLObjectType();
75
76     /**
77       * Get the name of the SQL Object that corresponds to the specified
78       * UUID String. For example, if getSQLObjectType() returns "Table",
79       * this will return the table name.
80       *
81       * @param idString the UUID String of a Dependable. Used to locate that Dependable.
82       *
83       * @return String Name of the associated Dependable
84       * @exception SQLException thrown on error
85       */

86     public String JavaDoc getSQLObjectName(String JavaDoc idString) throws SQLException JavaDoc;
87
88 }
89
Popular Tags