package nl.ordina.cookbook.ejb3.course.domain; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Version; import nl.ordina.cookbook.ejb3.listener.SimpleEntityListener; @Entity //@EntityListeners(SimpleEntityListener.class) public class Course implements Serializable{ @Id @GeneratedValue private Long id; @Version private Long version; @Column(length=40, unique=true, nullable=false) private String name; public Course() {} public Course(String name) { super(); this.name = name; } public Long getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }