Server-side Java
Our Java EE application for the caseworker system is built around RESTful services, Java WebSocket, JSON-P, and Java Persistence.
Tip
This section of the book relies on a prior understanding of Java EE development from the elementary level. I recommend that you read the sister book Java EE 7 Development Handbook, especially if you find some of these topics difficult to follow.
Entity objects
The server-side would be nothing without a couple of domain objects. It should not be surprising that these are called CaseRecord and Task.
The following is the extracted CaseRecord entity object with full annotations:
@NamedQueries({
@NamedQuery(name="CaseRecord.findAllCases",
query = "select c from CaseRecord c order by c.lastName, c.firstName"),
/* ... */
})
@Entity
@Table(name = "CASE_RECORD")
public class CaseRecord {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@NotEmpty @Size(max=64) private String lastName;
@NotEmpty @Size(max=64) private...