tuxmartin

Untitled

Jan 21st, 2014
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.28 KB | None | 0 0
  1. package cz.uhk.ppro.musicbook.entity;
  2.  
  3. import java.sql.Timestamp;
  4. import java.util.Date;
  5.  
  6. import javax.persistence.Basic;
  7. import javax.persistence.Column;
  8. import javax.persistence.Entity;
  9. import javax.persistence.GeneratedValue;
  10. import javax.persistence.GenerationType;
  11. import javax.persistence.Id;
  12. import javax.persistence.JoinColumn;
  13. import javax.persistence.OneToOne;
  14. import javax.persistence.Table;
  15.  
  16. @Entity
  17. @Table(name = "UsersRegistration")
  18. public class UserRegistration {
  19.    
  20.     @Id
  21.     @GeneratedValue(strategy = GenerationType.IDENTITY)
  22.     @Basic(optional = false)
  23.     @Column(name = "id")
  24.     private int id;
  25.  
  26.     @Column(name = "registration")
  27.     @Basic(optional = false)
  28.     private Timestamp registration;
  29.  
  30.     @Column(name = "hash", unique = true)
  31.     @Basic(optional = false)
  32.     private String hash;
  33.    
  34.     @OneToOne
  35.     @JoinColumn(name = "id")
  36.     private User user;
  37.            
  38.     public UserRegistration() {
  39.     }
  40.  
  41.     public int getId() {
  42.         return id;
  43.     }
  44.  
  45.     public void setId(int id) {
  46.         this.id = id;
  47.     }
  48.  
  49.     public Timestamp getRegistration() {
  50.         return registration;
  51.     }
  52.  
  53.     public void setRegistration(Timestamp registration) {
  54.         this.registration = registration;
  55.     }
  56.  
  57.     public String getHash() {
  58.         return hash;
  59.     }
  60.  
  61.     public void setHash(String hash) {
  62.         this.hash = hash;
  63.     }
  64.    
  65.    
  66.    
  67.    
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment