01: /*
02:
03: Derby - Class org.apache.derby.iapi.sql.dictionary.ConsInfo
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.iapi.sql.dictionary;
23:
24: import org.apache.derby.iapi.services.io.Formatable;
25:
26: import org.apache.derby.iapi.error.StandardException;
27:
28: /**
29: * This interface describes the columns in a referenced constraint. Added
30: * to be the protocol version of ConstraintInfo.
31: *
32: * @version 0.1
33: * @author Rick Hillegas
34: */
35:
36: public interface ConsInfo extends Formatable {
37: /**
38: * This ConsInfo describes columns in a referenced table. What is
39: * the schema that the referenced table lives in?
40: *
41: * @param dd data dictionary to search for schema
42: *
43: * @return schema that referenced table lives in
44: * @exception StandardException thrown on oops
45: */
46: public SchemaDescriptor getReferencedTableSchemaDescriptor(
47: DataDictionary dd) throws StandardException;
48:
49: /**
50: * This ConsInfo describes columns in a referenced table. What is
51: * that table?
52: *
53: * @param dd data dictionary to search for table
54: *
55: * @return referenced table
56: * @exception StandardException thrown on oops
57: */
58: public TableDescriptor getReferencedTableDescriptor(
59: DataDictionary dd) throws StandardException;
60:
61: /**
62: * This ConsInfo describes columns in a referenced table. What are
63: * their names?
64: *
65: * @return array of referenced column names
66: */
67: public String[] getReferencedColumnNames();
68:
69: /**
70: * Get the name of the table that these column live in.
71: *
72: * @return referenced table name
73: */
74: public String getReferencedTableName();
75:
76: /**
77: * Get the referential Action for an Update.
78: *
79: * @return referential Action for update
80: */
81:
82: public int getReferentialActionUpdateRule();
83:
84: /**
85: * Get the referential Action for a Delete.
86: *
87: * @return referential Action Delete rule
88: */
89: public int getReferentialActionDeleteRule();
90:
91: }
|