Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- public class User extends LightEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @SequenceGenerator(name="USER_UID_GENERATOR", sequenceName="U_ID")
- @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="USER_UID_GENERATOR")
- @Column(name="u_id")
- private Long uId;
- private String email;
- private Boolean enabled;
- private String password;
- private String role;
- private String username;
- //bi-directional many-to-one association to Comment
- @OneToMany(mappedBy="user", fetch=FetchType.EAGER)
- private Set<Comment> comments = new HashSet<Comment>();
- public User() {
- }
- public Long getUId() {
- return this.uId;
- }
- public void setUId(Long uId) {
- this.uId = uId;
- }
- public String getEmail() {
- return this.email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public Boolean getEnabled() {
- return this.enabled;
- }
- public void setEnabled(Boolean enabled) {
- this.enabled = enabled;
- }
- public String getPassword() {
- return this.password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getRole() {
- return this.role;
- }
- public void setRole(String role) {
- this.role = role;
- }
- public String getUsername() {
- return this.username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public Set<Comment> getComments() {
- return this.comments;
- }
- public void setComments(Set<Comment> comments) {
- this.comments = comments;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement