April 2018
Intermediate to advanced
202 pages
4h 48m
English
The data model is based on a simple SQL table, Call, that contains columns for the ID, client name, phone number, city, start time, duration, and status. The following is a JPA Entity representing this table:
@Entity@Datapublic class Call { @Id @GeneratedValue private Long id; private String client; private String phoneNumber; @Enumerated(EnumType.STRING) private City city; private LocalDateTime startTime; private Integer duration; @Enumerated(EnumType.STRING) private Status status;}
Status and City are simple Java enums that define some test values:
public enum Status { RECEIVED, MISSED}public enum City { BOGOTA, TURKU, LONDON, BERLIN, HELSINKI, TOKYO, SAN_FRANCISCO, SIDNEY, LAGOS, VANCOUVER, SANTIAGO, BEIJING}
Notice the ...
Read now
Unlock full access