package jpaoletti.jpm.hibernate.security; import java.io.Serializable; import javax.persistence.*; /** * * @author jpaoletti */ @Entity @Table(name = "sec_user_props") public class SECUserProp implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne @JoinColumn(name="user") private SECUser user; private String propName; private String propValue; @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SECUserProp other = (SECUserProp) obj; if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) { return false; } return true; } @Override public int hashCode() { int hash = 7; hash = 37 * hash + (this.id != null ? this.id.hashCode() : 0); return hash; } public SECUser getUser() { return user; } public void setUser(SECUser user) { this.user = user; } public String getPropName() { return propName; } public void setPropName(String propName) { this.propName = propName; } public String getPropValue() { return propValue; } public void setPropValue(String propValue) { this.propValue = propValue; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } }