/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package main;
import main.pattern.DBControllerCreator;
import main.pattern.DBController;
import main.pattern.mysql.MySQLController;
import main.pattern.mysql.MySQLControllerCreator;
import main.pattern.oracle.OracleController;
import main.pattern.oracle.OracleControllerCreator;
import java.io.IOException;
/**
*
* @author student
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
DBControllerCreator creator = new MySQLControllerCreator();
DBController connection = creator.create();
connection.openConnect();
connection.executeQuery("Some query.");
connection.closeConnect();
DBControllerCreator creator2 = new OracleControllerCreator();
DBController connection2 = creator2.create();
connection2.openConnect();
connection2.executeQuery("Some query.");
connection2.closeConnect();
}
}