Also this is my entity class. But ı think there is no error here because it is a automated.
@Entity
@Table(name = "users")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Users.findAll", query = "SELECT u FROM Users u")})
public class Users implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "user_id")
private Integer userId;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "user_name")
private String userName;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "user_password")
private String userPassword;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "name")
private String name;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "surname")
private String surname;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "mail_adress")
private String mailAdress;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "blood")
private String blood;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "tel_number")
private String telNumber;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 255)
@Column(name = "adress")
private String adress;
@Basic(optional = false)
@NotNull
@Column(name = "active_deactive")
private int activeDeactive;
public Users() {
}
public Users(Integer userId) {
this.userId = userId;
}
public Users(Integer userId, String userName, String userPassword, String name, String surname, String mailAdress, String blood, String telNumber, String adress, int activeDeactive) {
this.userId = userId;
this.userName = userName;
this.userPassword = userPassword;
this.name = name;
this.surname = surname;
this.mailAdress = mailAdress;
this.blood = blood;
this.telNumber = telNumber;
this.adress = adress;
this.activeDeactive = activeDeactive;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPassword() {
return userPassword;
}
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public String getMailAdress() {
return mailAdress;
}
public void setMailAdress(String mailAdress) {
this.mailAdress = mailAdress;
}
public String getBlood() {
return blood;
}
public void setBlood(String blood) {
this.blood = blood;
}
public String getTelNumber() {
return telNumber;
}
public void setTelNumber(String telNumber) {
this.telNumber = telNumber;
}
public String getAdress() {
return adress;
}
public void setAdress(String adress) {
this.adress = adress;
}
public int getActiveDeactive() {
return activeDeactive;
}
public void setActiveDeactive(int activeDeactive) {
this.activeDeactive = activeDeactive;
}
@Override
public int hashCode() {
int hash = 0;
hash += (userId != null ? userId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Users)) {
return false;
}
Users other = (Users) object;
if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.entity.Users[ userId=" + userId + " ]";
}
}