/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package database.connection;


import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Ani
 */

public class DatabaseConnection {
    private Connection connection;

    public DatabaseConnection() throws SQLException, IOException {
        createConnection();
    }



    private void createConnection() throws SQLException, IOException{
            connection = DriverManager.getConnection("jdbc:mysql://localhost:3307/woaley",
                    "root", "Aniko");

            connection.setAutoCommit(true);
    }

    public Connection getConnection() throws SQLException, IOException {
        return connection;
    }


}
