Package org.uploadDB.controller

Source Code of org.uploadDB.controller.ConnectController

/**
* This package contrains the controller classes, which control the application.
*/
package org.uploadDB.controller;

import org.uploadDB.Connect.DBConnection;
import org.uploadDB.ui.ConnectionScreen;

public class ConnectController {

  private DBConnection dbCon;
 
  /**
   * This method creates a database connection using the information entered in the connection screen.
   * @param cs
   */
  public void CreateConnection(ConnectionScreen cs) {
    this.setDbCon(new DBConnection(cs.getFUsername().getText(),cs.getFPassword().getPassword(),cs.getFHost().getText(),cs.getFPort().getText(),cs.getFDatabase().getText(),cs.getDBvendor(),cs.getDBvendorClassPath()));
    dbCon.Connect();
    System.out.println("Test CreateConnection Method");
  }

  /**
   * @param dbCon the dbCon to set
   */
  public void setDbCon(DBConnection dbCon) {
    this.dbCon = dbCon;
  }

  /**
   * @return the dbCon
   */
  public DBConnection getDbCon() {
    return dbCon;
 
}
TOP

Related Classes of org.uploadDB.controller.ConnectController

TOP
Copyright © 2018 www.massapi.com. 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.