public void closeConnections() {
        try {

            if (statement != null) {
                if (!statement.isClosed()) {
                    statement.close();
                }
            }
        } catch (SQLException sqlEx) {
            Helper.logException(sqlEx);
        }
        try {
            if (connection != null) {
                if (!connection.isClosed()) {

                    connection.close();
                }
            }
        } catch (SQLException sqlEx) {
            Helper.logException(sqlEx);
        }
    }