// Path: projects/03_batch/batch-processing/src/main/java/org/jboss/as/quickstarts/batch/model/Contact.java
// @Entity
// public class Contact {
// 
//     @Id
//     private Integer id;
// 
//     @NotNull
//     @Column(unique = true)
//     private String name;
// 
//     @NotNull
//     private String phone;
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(Integer id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getPhone() {
//         return phone;
//     }
// 
//     public void setPhone(String phone) {
//         this.phone = phone;
//     }
// 
//     @Override
//     public String toString() {
//         return "Contact [id=" + id + ", name=" + name + ", phone=" + phone + "]";
//     }
// 
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.Serializable;
import java.util.logging.Logger;
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemReader;
import javax.inject.Inject;
import javax.inject.Named;
import org.jboss.as.quickstarts.batch.model.Contact;
        else {
            this.checkpoint = (ChunkCheckpoint) previousCheckpoint;
        }
        br = new BufferedReader(new FileReader(new File(System.getProperty("java.io.tmpdir"), fileName)));
        long lineNumber = checkpoint.getLineNumber();
        if (lineNumber > 0) {
            log.info("Skipping to line " + lineNumber + " as marked by previous checkpoint");
        }
        for (long i = 0; i < lineNumber; i++) {
            br.readLine();
        }
    }

    @Override
    public Contact readItem() throws Exception {
        String line = br.readLine();
        if (line != null) {
            String[] fields = line.split(separatorRegex);
            Contact contact = new Contact();
            contact.setId(Integer.parseInt(fields[0]));
            contact.setName(fields[1]);
            contact.setPhone(fields[2]);
            // update the checkpoint
            checkpoint.increase();
            return contact;
        }
        return null;
    }

    @Override
// Path: projects/03_batch/batch-processing/src/main/java/org/jboss/as/quickstarts/batch/model/Contact.java
// @Entity
// public class Contact {
// 
//     @Id
//     private Integer id;
// 
//     @NotNull
//     @Column(unique = true)
//     private String name;
// 
//     @NotNull
//     private String phone;
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(Integer id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getPhone() {
//         return phone;
//     }
// 
//     public void setPhone(String phone) {
//         this.phone = phone;
//     }
// 
//     @Override
//     public String toString() {
//         return "Contact [id=" + id + ", name=" + name + ", phone=" + phone + "]";
//     }
// 
// }


// Path: projects/03_batch/batch-processing/src/main/java/org/jboss/as/quickstarts/batch/job/RecordsReader.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.Serializable;
import java.util.logging.Logger;
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemReader;
import javax.inject.Inject;
import javax.inject.Named;
import org.jboss.as.quickstarts.batch.model.Contact;

        else {
            this.checkpoint = (ChunkCheckpoint) previousCheckpoint;
        }
        br = new BufferedReader(new FileReader(new File(System.getProperty("java.io.tmpdir"), fileName)));
        long lineNumber = checkpoint.getLineNumber();
        if (lineNumber > 0) {
            log.info("Skipping to line " + lineNumber + " as marked by previous checkpoint");
        }
        for (long i = 0; i < lineNumber; i++) {
            br.readLine();
        }
    }

    @Override
    public Contact readItem() throws Exception {
        String line = br.readLine();
        if (line != null) {
            String[] fields = line.split(separatorRegex);
            Contact contact = new Contact();
            contact.setId(Integer.parseInt(fields[0]));
            contact.setName(fields[1]);
            contact.setPhone(fields[2]);
            // update the checkpoint
            checkpoint.increase();
            return contact;
        }
        return null;
    }

    @Override
    public Serializable checkpointInfo() throws Exception {