/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.familyTree.importer;

import javax.persistence.EntityManager;

import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * @author Joe Hendrix
 */
public abstract class Importer
{

    /**
     *
     */
    protected FileReader file;

    /**
     *
     */
    protected EntityManager em;

    /**
     * @param fileName
     *
     * @throws FileNotFoundException
     */
    public Importer(String fileName) throws FileNotFoundException
    {
        this(new FileReader(fileName));
    }

    /**
     * @param file
     */
    public Importer(FileReader file)
    {
        this.file = file;
    }

    /**
     * @param em
     */
    public abstract void processData(EntityManager em);

    protected abstract void processData();
}

@@ -469,39 +469,16 @@
 rter%0A%7B%0A%0A
-    /**%0A     *%0A     */%0A
     prot
@@ -504,31 +504,75 @@
 le;%0A
-%0A
     
-/**%0A     *%0A     */
+protected EntityManager em;%0A    protected String nextLine = %22%22;
 %0A   
@@ -582,33 +582,36 @@
 otected 
-EntityManager em;
+int lineNumber;%0A    
 %0A%0A    /*
@@ -940,17 +940,28 @@
 @param e
-m
+ntityManager
 %0A     */
@@ -976,52 +976,218 @@
 lic 
-abstract void processData(EntityManager em);
+void processData(EntityManager entityManager)%0A    %7B%0A        this.em = entityManager;%0A        entityManager.getTransaction().begin();%0A        processData();%0A        entityManager.getTransaction().commit();%0A    %7D
 %0A%0A  

Update Importer.java