Source Code Cross Referenced for ForeignKey.java in  » IDE-Netbeans » sql.project » org » netbeans » modules » jdbcwizard » builder » dbmodel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » sql.project » org.netbeans.modules.jdbcwizard.builder.dbmodel 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms of the Common Development
003:         * and Distribution License (the License). You may not use this file except in
004:         * compliance with the License.
005:         * 
006:         * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007:         * or http://www.netbeans.org/cddl.txt.
008:         * 
009:         * When distributing Covered Code, include this CDDL Header Notice in each file
010:         * and include the License file at http://www.netbeans.org/cddl.txt.
011:         * If applicable, add the following below the CDDL Header, with the fields
012:         * enclosed by brackets [] replaced by your own identifying information:
013:         * "Portions Copyrighted [year] [name of copyright owner]"
014:         * 
015:         * The Original Software is NetBeans. The Initial Developer of the Original
016:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017:         * Microsystems, Inc. All Rights Reserved.
018:         */
019:
020:        /*
021:         * 
022:         * Copyright 2005 Sun Microsystems, Inc.
023:         * 
024:         * Licensed under the Apache License, Version 2.0 (the "License");
025:         * you may not use this file except in compliance with the License.
026:         * You may obtain a copy of the License at
027:         * 
028:         * 	http://www.apache.org/licenses/LICENSE-2.0
029:         * 
030:         * Unless required by applicable law or agreed to in writing, software
031:         * distributed under the License is distributed on an "AS IS" BASIS,
032:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
033:         * See the License for the specific language governing permissions and
034:         * limitations under the License.
035:         * 
036:         */
037:        package org.netbeans.modules.jdbcwizard.builder.dbmodel;
038:
039:        import java.util.List;
040:
041:        /**
042:         * Interface describing foreign-key metadata for data sources providing information in a database or
043:         * database-like format. Implementing classes must support the Cloneable interface.
044:         * 
045:         * @author
046:         */
047:        public interface ForeignKey extends Cloneable {
048:
049:            /**
050:             * Gets user-defined name for this Foreign Key.
051:             * 
052:             * @return FK name
053:             */
054:            public String getName();
055:
056:            /**
057:             * Gets name, if any, of associated primary key
058:             * 
059:             * @return name of this primary key; may be null if no name exists for the PK
060:             */
061:            public String getPKName();
062:
063:            /**
064:             * Gets read-only List of Strings (in sequential order) representing names of columns comprising
065:             * this ForeignKey.
066:             * 
067:             * @return List of column names
068:             */
069:            public List getColumnNames();
070:
071:            /**
072:             * Gets read-only List of Strings (in key sequence order) representing names of PK columns
073:             * referenced by elements of this ForeignKey.
074:             * 
075:             * @return List of PK column names referenced by this ForeignKey
076:             */
077:            public List getPKColumnNames();
078:
079:            /**
080:             * Gets name of PK column, if any, which the FK column (represented by the given column name)
081:             * references.
082:             * 
083:             * @param fkColumnName name of FK column whose referenced PK column is to be retrieved
084:             * @return name of matching PK column, or null if fkColumnName is not an FK column
085:             */
086:            public String getMatchingPKColumn(String fkColumnName);
087:
088:            /**
089:             * Gets name of table containing PK columns referenced by this ForeignKey.
090:             * 
091:             * @return PK table name
092:             */
093:            public String getPKTable();
094:
095:            /**
096:             * Gets name of schema, if any, to which PK table belongs.
097:             * 
098:             * @return schema name for PK table; null if no schema name is defined
099:             */
100:            public String getPKSchema();
101:
102:            /**
103:             * Gets name of catalog, if any, to which PK table belongs.
104:             * 
105:             * @return catalog name for PK table; null if no catalog name is defined
106:             */
107:            public String getPKCatalog();
108:
109:            /**
110:             * Gets reference to DBTable that owns this primary key.
111:             * 
112:             * @return parent DBTable
113:             */
114:            public DBTable getParent();
115:
116:            /**
117:             * Gets count of columns participating in this ForeignKey.
118:             * 
119:             * @return column count
120:             */
121:            public int getColumnCount();
122:
123:            /**
124:             * Gets name of the column positioned as the iColumn-th column, if any, participating in this
125:             * ForeignKey. iColumn ranges from 1 (first column) to n, where n is the total number of columns
126:             * in this ForeignKey.
127:             * 
128:             * @param iColumn index of column whose name is requested
129:             * @return name of iColumn-th DBColumn in this ForeignKey, or null if no column exists at the
130:             *         given position.
131:             */
132:            public String getColumnName(int iColumn);
133:
134:            /**
135:             * Gets ordinal (base-one) sequence of the given DBColumn in this FK, provided it is part of
136:             * this FK. The return value ranges from 1 (first column) to n, where n is the total number of
137:             * columns in this ForeignKey, or -1 if col is not part of the ForeignKey.
138:             * 
139:             * @param col DBColumn whose sequence is requested
140:             * @return ordinal sequence of col, starting with 1 if the column is the first in a composite
141:             *         key; -1 if col does not participate in this ForeignKey
142:             */
143:            public int getSequence(DBColumn col);
144:
145:            /**
146:             * Gets enumerated update rule associated with columns of this ForeignKey, as defined in
147:             * java.sql.DatabaseMetaData.
148:             * 
149:             * @return int value representing associated update rule
150:             * @see java.sql.DatabaseMetaData
151:             */
152:            public int getUpdateRule();
153:
154:            /**
155:             * Gets enumerated delete rule associated with columns of this ForeignKey, as defined in
156:             * java.sql.DatabaseMetaData.
157:             * 
158:             * @return int value representing associated delete rule
159:             * @see java.sql.DatabaseMetaData
160:             */
161:            public int getDeleteRule();
162:
163:            /**
164:             * Gets enumerated deferrability rule associated with columns of this ForeignKey, as defined in
165:             * java.sql.DatabaseMetaData.
166:             * 
167:             * @return int value representing associated deferrability rule
168:             * @see java.sql.DatabaseMetaData
169:             */
170:            public int getDeferrability();
171:
172:            /**
173:             * Indicates whether this ForeignKey contains the column represented by the given name.
174:             * 
175:             * @param fkColumnName name of column to test
176:             * @return true if this ForeignKey contains the column referenced by fkColumnName, false
177:             *         otherwise.
178:             */
179:            public boolean contains(String fkColumnName);
180:
181:            /**
182:             * Indicates whether this ForeignKey contains the given column.
183:             * 
184:             * @param fkCol JDBCColumn to test
185:             * @return true if this ForeignKey contains fkCol, false otherwise
186:             */
187:            public boolean contains(DBColumn fkCol);
188:
189:            /**
190:             * Indicates whether this ForeignKey references columns in the DBTable represented by the given
191:             * tuple of (table name, schema name, catalog name).
192:             * 
193:             * @param pk PrimaryKey whose relationship to this FK is to be tested
194:             * @return true if this FK references columns in pk; false otherwise
195:             */
196:            public boolean references(PrimaryKey pk);
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.