package com.revature.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="ie_batch")
public class Batch {
	
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="batch_sequence")
	@SequenceGenerator(allocationSize=1, name="batch_sequence", sequenceName="batch_seq")
	@Column(name="b_id")
	private int id;
	
	@Column(name="b_name")
	private String name;

	public Batch() {}
		
	public Batch(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Batch other = (Batch) obj;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Batch [id=" + id + ", name=" + name + "]";
	}
	
	
	

}

@@ -23,16 +23,45 @@
 omain;%0A%0A
+import java.io.Serializable;%0A
 import j
@@ -357,16 +357,41 @@
 s Batch 
+implements Serializeable 
 %7B%0A%09%0A%09@Id

Update Batch.java