View Javadoc
1   package com.entity;
2   
3   /*
4    * #%L
5    * Gateway
6    * %%
7    * Copyright (C) 2015 Powered by Sergey
8    * %%
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   * 
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * #L%
21   */
22  
23  
24  import org.hibernate.envers.Audited;
25  import org.springframework.data.jpa.domain.support.AuditingEntityListener;
26  
27  import javax.persistence.*;
28  
29  /**
30   * Created by aautushk on 8/30/2015.
31   */
32  @Entity
33  @Table(name = "users")
34  @EntityListeners(AuditingEntityListener.class)
35  @Audited
36  public class UserEntity extends BaseEntity {
37      @Id
38      @Column(name = "username")
39      private String username;
40  
41      @Column(name = "first_name")
42      private String firstName;
43  
44      @Column(name = "last_name")
45      private String lastName;
46  
47      @Column(name = "password")
48      private String password;
49  
50      @Column(name = "enabled")
51      private boolean enabled;
52  
53      @Column(name = "email_verification_token")
54      private String emailVerificationToken;
55  
56      @Column(name = "reset_password_token")
57      private String resetPasswordToken;
58  
59      public String getUsername() {
60          return username;
61      }
62  
63      public void setUsername(String value){
64          this.username = value;
65      }
66  
67      public String getFirstName() {
68          return firstName;
69      }
70      public void setFirstName(String value){
71          this.firstName = value;
72      }
73  
74      public String getLastName() {
75          return lastName;
76      }
77      public void setLastName(String value){
78          this.lastName = value;
79      }
80  
81      public String getPassword() {
82          return password;
83      }
84      public void setPassword(String value){
85          this.password =  value;
86      }
87  
88      public boolean isEnabled() {return enabled;}
89      public void setEnabled(boolean enabled) {
90          this.enabled = enabled;
91      }
92  
93      public String getEmailVerificationToken() {
94          return emailVerificationToken;
95      }
96  
97      public void setEmailVerificationToken(String emailVerificationToken) {
98          this.emailVerificationToken = emailVerificationToken;
99      }
100 
101     public String getResetPasswordToken() {
102         return resetPasswordToken;
103     }
104 
105     public void setResetPasswordToken(String resetPasswordToken) {
106         this.resetPasswordToken = resetPasswordToken;
107     }
108 }