KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > dbschema > jdbcimpl > wizard > DBSchemaWizardData


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.dbschema.jdbcimpl.wizard;
21
22 import java.beans.*;
23 import java.util.LinkedList JavaDoc;
24 import java.util.Vector JavaDoc;
25 import org.netbeans.api.db.explorer.DatabaseConnection;
26
27 import org.openide.loaders.DataFolder;
28
29 import org.netbeans.modules.dbschema.jdbcimpl.ConnectionProvider;
30
31 public class DBSchemaWizardData {
32
33     private DataFolder destinationPackage;
34     private String JavaDoc name;
35     private String JavaDoc driver;
36     private DatabaseConnection dbconn;
37     private boolean existingConn;
38     private ConnectionProvider cp;
39     private LinkedList JavaDoc tables;
40     private LinkedList JavaDoc views;
41     private boolean connected;
42     private String JavaDoc schema;
43     private Vector JavaDoc schemas;
44     private boolean all;
45
46     private PropertyChangeSupport propertySupport;
47
48     /** Creates new DBSchemaWizardData */
49     public DBSchemaWizardData() {
50         schemas = new Vector JavaDoc();
51         propertySupport = new PropertyChangeSupport(this);
52     }
53
54     public void setName(String JavaDoc name) {
55         this.name = name;
56     }
57
58     public String JavaDoc getName() {
59         return name;
60     }
61
62     public void setDestinationPackage(DataFolder destinationPackage) {
63         this.destinationPackage = destinationPackage;
64     }
65
66     public DataFolder getDestinationPackage() {
67         return destinationPackage;
68     }
69
70     public void setDriver(String JavaDoc driver) {
71         this.driver = driver;
72     }
73
74     public String JavaDoc getDriver() {
75         return driver;
76     }
77     
78     public void setDatabaseConnection(DatabaseConnection dbconn) {
79         this.dbconn = dbconn;
80     }
81     
82     public DatabaseConnection getDatabaseConnection() {
83         return dbconn;
84     }
85
86     public void setExistingConn(boolean existingConn) {
87         this.existingConn = existingConn;
88     }
89
90     public boolean isExistingConn() {
91         return existingConn;
92     }
93
94     public void setConnectionProvider(ConnectionProvider cp) {
95         this.cp = cp;
96     }
97
98     public ConnectionProvider getConnectionProvider() {
99         return cp;
100     }
101
102     public void setTables(LinkedList JavaDoc tables) {
103         this.tables = tables;
104     }
105
106     public LinkedList JavaDoc getTables() {
107         return tables;
108     }
109
110     public void setViews(LinkedList JavaDoc views) {
111         this.views = views;
112     }
113
114     public LinkedList JavaDoc getViews() {
115         return views;
116     }
117
118     public void setConnected(boolean connected) {
119         this.connected = connected;
120     }
121
122     public boolean isConnected() {
123         return connected;
124     }
125
126     public void setSchemas(Vector JavaDoc schemas) {
127         this.schemas = schemas;
128     }
129
130     public Vector JavaDoc getSchemas() {
131         return schemas;
132     }
133
134     public void setSchema(String JavaDoc schema) {
135         this.schema = schema;
136     }
137
138     public String JavaDoc getSchema() {
139         return schema;
140     }
141
142     public void setAllTables(boolean all) {
143         this.all = all;
144     }
145
146     public boolean isAllTables() {
147         return all;
148     }
149
150     //==== property change support needed for schemas ====
151
public PropertyChangeSupport getPropertySupport() {
152         return propertySupport;
153     }
154
155     public void addPropertyChangeListener(PropertyChangeListener l) {
156         propertySupport.addPropertyChangeListener (l);
157     }
158
159     public void removePropertyChangeListener(PropertyChangeListener l) {
160         propertySupport.removePropertyChangeListener (l);
161     }
162 }
163
Popular Tags