Package net.sf.jabref.sql

Examples of net.sf.jabref.sql.DBStrings


            boolean connectToDB = false;

            // run first, in EDT:
            public void init() {

                DBStrings dbs = metaData.getDBStrings();

                // get DBStrings from user if necessary
                if (!dbs.isConfigValid()) {

                    // init DB strings if necessary
                    if (! dbs.isInitialized()) {
                        dbs.initialize();
                    }

                    // show connection dialog
                    DBConnectDialog dbd = new DBConnectDialog(frame(), dbs);
                    Util.placeDialog(dbd, BasePanel.this );
                    dbd.setVisible(true);

                    connectToDB = dbd.getConnectToDB();

                    // store database strings
                    if (connectToDB) {
                        dbs = dbd.getDBStrings();
                        metaData.setDBStrings(dbs);
                        dbd.dispose();
                    }

                } else {

                    connectToDB  = true;

                }

            }

            // run second, on a different thread:
            public void run() {

                if (connectToDB) {

                    DBStrings dbs = metaData.getDBStrings();

                    try {

                        frame.output(Globals.lang("Attempting SQL export..."));
                        SQLutil.exportDatabase(database, metaData, null, dbs);
                        dbs.isConfigValid(true);

                    } catch (Exception ex) {

                        errorMessage = SQLutil.getExceptionMessage(ex,SQLutil.DBTYPE.MYSQL);
                        dbs.isConfigValid(false);

                    }

                    metaData.setDBStrings(dbs);
View Full Code Here

TOP

Related Classes of net.sf.jabref.sql.DBStrings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.