2. Model classes

JPA related Stuff

1. Model class annotations

@Entity
@Table(name = "user")
public class User {

 @Id
@Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;

@Column(name = "user_name")
private String userName;

@Column(name = "password")
private String password;

public User() {
super();
}

public User(int id, String userName, String password) {
super();
this.id = id;
this.userName = userName;
this.password = password;
}

}



Comments

Popular posts from this blog

3. Controller

4. DAO