JPA JAVA EE
@Entitypublic class MyEntity3 { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int myId; public int getMyId() { return myId; } public void setMyId(int myId) { this.myId = myId; }}
@Entitypublic class MyEntity4 { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int myId; public int getMyId() { return myId; } public void setMyId(int myId) { this.myId = myId; }}
@Entitypublic class MyEntity2 { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int myId; public int getMyId() { return myId; } public void setMyId(int myId) { this.myId = myId; }}
@Entitypublic class MyEntity1 { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) private int myId; public int getMyId() { return myId; } public void setMyId(int myId) { this.myId = myId; }}