01: /*
02:
03: Derby - Class org.apache.derby.catalog.DependableFinder
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to You under the Apache License, Version 2.0
09: (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;
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: * Get the in-memory object associated with the passed-in object ID.
44: *
45: * @param dependableObjectID the ID of a Dependable. Used to locate that Dependable.
46: *
47: * @return the associated Dependable
48: * @exception SQLException thrown on error
49: */
50: public Dependable getDependable(UUID dependableObjectID)
51: throws SQLException;
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 dependableObjectID)
63: throws SQLException;
64:
65: /**
66: * The name of the class of Dependables as a "SQL Object" which this
67: * Finder can find.
68: * This is a value like "Table", "View", or "Publication".
69: * Every DependableFinder can find some class of Dependables.
70: *
71: *
72: * @return String type of the "SQL Object" which this Finder can find.
73: * @see Dependable
74: */
75: public String getSQLObjectType();
76:
77: /**
78: * Get the name of the SQL Object that corresponds to the specified
79: * UUID String. For example, if getSQLObjectType() returns "Table",
80: * this will return the table name.
81: *
82: * @param idString the UUID String of a Dependable. Used to locate that Dependable.
83: *
84: * @return String Name of the associated Dependable
85: * @exception SQLException thrown on error
86: */
87: public String getSQLObjectName(String idString) throws SQLException;
88:
89: }
|