Computer Science A
Learning Goals 3
Learning Goals 3
Learning Goals 3
Learning Goals 3
Learning Goals 3
Learning Goals 3
Learning Goals 4
Learning Goals 3
Learning Goals 4
Plain Old Java Objects (POJO)
POJO and Entity
Your data object begins as a Java class. Adding JPA annotations makes it persistable; Lombok removes routine accessor, mutator, and constructor code.
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
public class Data {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
}
@Entitymaps the class to a database table.@Idand@GeneratedValuedefine the primary key.@Datagenerates getters, setters,equals,hashCode, andtoString.
Choose fields and relationships that model your own system object, then continue with the repository and controller references in Java Spring Hacks.
Course Timeline
Week 0 Chat click to open
No messages yet.
Week 1 Chat click to open
No messages yet.
Week 2 Chat click to open
No messages yet.
Week 3 Chat click to open
No messages yet.
Week 4 Chat click to open
No messages yet.
Week 5 Chat click to open
No messages yet.
Week 6 Chat click to open
No messages yet.
Week 13 Chat click to open
No messages yet.
Week 17 Chat click to open
No messages yet.
Week 18 Chat click to open
No messages yet.
Week 19 Chat click to open
No messages yet.
Week 21 Chat click to open
No messages yet.
Week 22 Chat click to open
No messages yet.
Week 25 Chat click to open
No messages yet.
Week 27 Chat click to open
No messages yet.
Week 31 Chat click to open
No messages yet.
Week 34 Chat click to open
No messages yet.