Card 4 / 18: You want to write a JPA Entity class to model a databank table named COOPERATE_USER. Each user is uniquely identified in this table by his or her social security number SSN. Along with SSN the system keeps user name, job, address and birth date. How to declare such JPA Entity class?
A)
Write a CooperateUser public class
B)
Annotate the CooperateUser class with @Table(name=" COOPERATE_USER")
C)
Annotate the CooperateUser class with @Entity
D)
The CooperateUser class must implement Serializable
E)
Define private attributes ssn, job, name, addess and birthdate
F)
Annotate the ' name' attibute with @Id
Answer:
A) Write a CooperateUser public class
B) Annotate the CooperateUser class with @Table(name=" COOPERATE_USER")
C) Annotate the CooperateUser class with @Entity
E) Define private attributes ssn, job, name, addess and birthdate
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|