Advertisement
Guest User

Untitled

a guest
Sep 16th, 2017
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.26 KB | None | 0 0
  1.  
  2. package com.oblivionsoftware.raid;
  3.  
  4. /**
  5.  * Imports
  6.  */
  7. import java.io.Serializable;
  8. import java.util.Date;
  9. import javax.persistence.Column;
  10. import javax.persistence.Entity;
  11. import javax.persistence.GeneratedValue;
  12. import javax.persistence.GenerationType;
  13. import javax.persistence.Id;
  14. import javax.persistence.Table;
  15. import javax.persistence.Temporal;
  16. import javax.persistence.TemporalType;
  17.  
  18. /**
  19.  * User.
  20.  *
  21.  * @author Dustin Dobervich <ddobervich@gmail.com>
  22.  */
  23. @Entity
  24. @Table(name="raid_users")
  25. public class User implements Serializable {
  26.    
  27.     @Id
  28.     @GeneratedValue(strategy=GenerationType.SEQUENCE)
  29.     @Column(name="id")
  30.     private int id;
  31.    
  32.     @Column(name="username", unique=true)
  33.     private String username;
  34.    
  35.     @Column(name="email", unique=true)
  36.     private String email;
  37.    
  38.     @Column(name="password")
  39.     private String password;
  40.    
  41.     @Column(name="salt")
  42.     private String salt;
  43.    
  44.     @Temporal(TemporalType.TIMESTAMP)
  45.     @Column(name="created_at")
  46.     private Date createdAt;
  47.    
  48.     @Temporal(TemporalType.TIMESTAMP)
  49.     @Column(name="updated_at")
  50.     private Date updatedAt;
  51.    
  52.     /**
  53.      * Gets the id.
  54.      *
  55.      * @return The id
  56.      */
  57.     public int getId() {
  58.         return this.id;
  59.     }
  60.    
  61.     /**
  62.      * Sets the id.
  63.      *
  64.      * @param id The id
  65.      */
  66.     public void setId(int id) {
  67.         this.id = id;
  68.     }
  69.    
  70.     /**
  71.      * Gets the username.
  72.      *
  73.      * @return The username
  74.      */
  75.     public String getUsername() {
  76.         return this.username;
  77.     }
  78.    
  79.     /**
  80.      * Sets the username.
  81.      *
  82.      * @param username The username
  83.      */
  84.     public void setUsername(String username) {
  85.         this.username = username;
  86.     }
  87.    
  88.     /**
  89.      * Gets the email.
  90.      *
  91.      * @return The email
  92.      */
  93.     public String getEmail() {
  94.         return this.email;
  95.     }
  96.    
  97.     /**
  98.      * Sets the email.
  99.      *
  100.      * @param email The email
  101.      */
  102.     public void setEmail(String email) {
  103.         this.email = email;
  104.     }
  105.    
  106.     /**
  107.      * Gets the password.
  108.      *
  109.      * @return The password
  110.      */
  111.     public String getPassword() {
  112.         return this.password;
  113.     }
  114.    
  115.     /**
  116.      * Sets the password.
  117.      *
  118.      * @param password The password
  119.      */
  120.     public void setPassword(String password) {
  121.         this.password = password;
  122.     }
  123.    
  124.     /**
  125.      * Gets the salt.
  126.      *
  127.      * @return The salt
  128.      */
  129.     public String getSalt() {
  130.         return this.salt;
  131.     }
  132.    
  133.     /**
  134.      * Sets the salt.
  135.      *
  136.      * @param salt The salt
  137.      */
  138.     public void setSalt(String salt) {
  139.         this.salt = salt;
  140.     }
  141.    
  142.     /**
  143.      * Gets the date created.
  144.      *
  145.      * @return The date created
  146.      */
  147.     public Date getCreatedAt() {
  148.         return this.createdAt;
  149.     }
  150.    
  151.     /**
  152.      * Sets the date created.
  153.      *
  154.      * @param createdAt The date created
  155.      */
  156.     public void setCreatedAt(Date createdAt) {
  157.         this.createdAt = createdAt;
  158.     }
  159.    
  160.     /**
  161.      * Gets the date updated.
  162.      *
  163.      * @return The date updated
  164.      */
  165.     public Date getUpdatedAt() {
  166.         return this.updatedAt;
  167.     }
  168.    
  169.     /**
  170.      * Sets the date updated.
  171.      *
  172.      * @param createdAt The date updated
  173.      */
  174.     public void setUpdatedAt(Date updatedAt) {
  175.         this.updatedAt = updatedAt;
  176.     }
  177.    
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement