Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cz.uhk.ppro.musicbook.entity;
- import java.sql.Timestamp;
- import java.util.Date;
- import javax.persistence.Basic;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- import javax.persistence.JoinColumn;
- import javax.persistence.OneToOne;
- import javax.persistence.Table;
- @Entity
- @Table(name = "UsersRegistration")
- public class UserRegistration {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Basic(optional = false)
- @Column(name = "id")
- private int id;
- @Column(name = "registration")
- @Basic(optional = false)
- private Timestamp registration;
- @Column(name = "hash", unique = true)
- @Basic(optional = false)
- private String hash;
- @OneToOne
- @JoinColumn(name = "id")
- private User user;
- public UserRegistration() {
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public Timestamp getRegistration() {
- return registration;
- }
- public void setRegistration(Timestamp registration) {
- this.registration = registration;
- }
- public String getHash() {
- return hash;
- }
- public void setHash(String hash) {
- this.hash = hash;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment