Advertisement
Guest User

Untitled

a guest
May 14th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.30 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package javafxapplication.models;
  7.  
  8. import java.io.Serializable;
  9. import javax.persistence.Entity;
  10. import javax.persistence.GeneratedValue;
  11. import javax.persistence.GenerationType;
  12. import javax.persistence.Id;
  13.  
  14. /**
  15.  *
  16.  * @author Admin
  17.  */
  18. @Entity
  19. public class UserFx implements Serializable {
  20.  
  21.     private static final long serialVersionUID = 1L;
  22.     @Id
  23.     @GeneratedValue(strategy = GenerationType.AUTO)
  24.     private Long id;
  25. private String background;
  26.     public Long getId() {
  27.         return id;
  28.     }
  29.  
  30.     public void setId(Long id) {
  31.         this.id = id;
  32.     }
  33.    
  34.     private String username;
  35.     private String password;
  36.     private String phone;
  37.     private String country;
  38.     private String city;
  39.     private Boolean admin = false;
  40.     private Boolean banned = false;
  41.  
  42.     public Boolean getBanned() {
  43.         return banned;
  44.     }
  45.  
  46.     public void setBanned(Boolean banned) {
  47.         this.banned = banned;
  48.     }
  49.  
  50.  
  51.     @Override
  52.     public int hashCode() {
  53.         int hash = 0;
  54.         hash += (id != null ? id.hashCode() : 0);
  55.         return hash;
  56.     }
  57.  
  58.     @Override
  59.     public boolean equals(Object object) {
  60.         // TODO: Warning - this method won't work in the case the id fields are not set
  61.         if (!(object instanceof UserFx)) {
  62.             return false;
  63.         }
  64.         UserFx other = (UserFx) object;
  65.         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
  66.             return false;
  67.         }
  68.         return true;
  69.     }
  70.  
  71.     @Override
  72.     public String toString() {
  73.         return "javafxapplication.models.UserFx[ id=" + id + " ]";
  74.     }
  75.  
  76.     public String getUsername() {
  77.         return username;
  78.     }
  79.  
  80.     public void setUsername(String username) {
  81.         this.username = username;
  82.     }
  83.  
  84.     public String getPassword() {
  85.         return password;
  86.     }
  87.  
  88.     public void setPassword(String password) {
  89.         this.password = password;
  90.     }
  91.  
  92.     public String getPhone() {
  93.         return phone;
  94.     }
  95.  
  96.     public void setPhone(String phone) {
  97.         this.phone = phone;
  98.     }
  99.  
  100.     public String getCountry() {
  101.         return country;
  102.     }
  103.  
  104.     public void setCountry(String country) {
  105.         this.country = country;
  106.     }
  107.  
  108.     public String getCity() {
  109.         return city;
  110.     }
  111.  
  112.     public void setCity(String city) {
  113.         this.city = city;
  114.     }
  115.  
  116.     public Boolean getAdmin() {
  117.         return admin;
  118.     }
  119.  
  120.     public void setAdmin(Boolean admin) {
  121.         this.admin = admin;
  122.     }
  123.    
  124.     public void setBackground(String uri){
  125.     this.background = uri;
  126.     }
  127.    
  128.  
  129.     public String getBackground(){
  130.     return this.background;
  131.     }
  132.  
  133.     public UserFx(String username, String password, String phone, String country, String city, Boolean admin, Boolean banned) {
  134.         this.username = username;
  135.         this.password = password;
  136.         this.phone = phone;
  137.         this.country = country;
  138.         this.city = city;
  139.         this.admin = admin;
  140.         this.banned = banned;
  141.     }
  142.  
  143.     public UserFx() {
  144.     }
  145.  
  146.    
  147.    
  148.    
  149.  
  150.  
  151.  
  152.    
  153.    
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement