If you are not familiar with JPA, refer to the JPA concepts section in Chapter 4, Creating JEE Database Applications.
We will now create Course.java in the packt.book.jeeeclipse.wildflyswarm.coursemanagement.rest package:
package packt.book.jeeeclipse.wildflyswarm.coursemanagement.rest;// skipping imports to save space@Entity@Table(name="\"Course\"")@NamedQuery(name="Course.findAll", query="SELECT c FROM Course c")public class Course implements Serializable { private static final long serialVersionUID = 2550281519279297343L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") private int id; @NotNull @Column(name="name") private String name; @Min(1) @Column(name="credits") ...