KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > db > explorer > DbMetaDataTransferProvider


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.db.explorer;
21
22 import java.awt.datatransfer.DataFlavor JavaDoc;
23 import org.netbeans.api.db.explorer.DatabaseConnection;
24 import org.netbeans.api.db.explorer.JDBCDriver;
25
26 /**
27  * This interface is a means to communicate with the db/dbapi module, which
28  * contains the actual data flavor and classes for transfer. The db/dbapi module
29  * puts an implementation of this interface in the default lookup.
30  *
31  * @author Andrei Badea
32  */

33 public interface DbMetaDataTransferProvider {
34
35     /**
36      * Returns the data flavor representing database connections.
37      */

38     DataFlavor JavaDoc getConnectionDataFlavor();
39
40     /**
41      * Returns the data flavor representing database tables.
42      */

43     DataFlavor JavaDoc getTableDataFlavor();
44     
45     /**
46      * Returns the data flavor representing database views.
47      */

48     DataFlavor JavaDoc getViewDataFlavor();
49
50     /**
51      * Returns the data flavor representing columns of database tables.
52      */

53     DataFlavor JavaDoc getColumnDataFlavor();
54
55     /**
56      * Returns an object which encapsulates a database connection.
57      */

58     Object JavaDoc createConnectionData(DatabaseConnection dbconn, JDBCDriver jdbcDriver);
59     
60     /**
61      * Returns an object which encapsulates a database table.
62      */

63     Object JavaDoc createTableData(DatabaseConnection dbconn, JDBCDriver jdbcDriver, String JavaDoc tableName);
64     
65     /**
66      * Returns an object which encapsulates a database view.
67      */

68     Object JavaDoc createViewData(DatabaseConnection dbconn, JDBCDriver jdbcDriver, String JavaDoc viewName);
69     
70     /**
71      * Returns an object which encapsulates a column of a database table.
72      */

73     Object JavaDoc createColumnData(DatabaseConnection dbconn, JDBCDriver jdbcDriver, String JavaDoc tableName, String JavaDoc columnName);
74 }
75
Popular Tags