Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package javafxapplication.models;
- import java.io.Serializable;
- import javafx.scene.Node;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- /**
- *
- * @author Admin
- */
- @Entity
- public class UserFx implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
- private String background;
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- private String username;
- private String password;
- private String phone;
- private String country;
- private String city;
- private Boolean admin = false;
- private Boolean banned = false;
- public Boolean getBanned() {
- return banned;
- }
- public void setBanned(Boolean banned) {
- this.banned = banned;
- }
- @Override
- public int hashCode() {
- int hash = 0;
- hash += (id != null ? id.hashCode() : 0);
- return hash;
- }
- @Override
- public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
- if (!(object instanceof UserFx)) {
- return false;
- }
- UserFx other = (UserFx) object;
- if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
- return false;
- }
- return true;
- }
- @Override
- public String toString() {
- return "javafxapplication.models.UserFx[ id=" + id + " ]";
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getPhone() {
- return phone;
- }
- public void setPhone(String phone) {
- this.phone = phone;
- }
- public String getCountry() {
- return country;
- }
- public void setCountry(String country) {
- this.country = country;
- }
- public String getCity() {
- return city;
- }
- public void setCity(String city) {
- this.city = city;
- }
- public Boolean getAdmin() {
- return admin;
- }
- public void setAdmin(Boolean admin) {
- this.admin = admin;
- }
- public void setBackground(String uri){
- this.background = uri;
- }
- public String getBackground(){
- return this.background;
- }
- public UserFx(String username, String password, String phone, String country, String city, Boolean admin, Boolean banned) {
- this.username = username;
- this.password = password;
- this.phone = phone;
- this.country = country;
- this.city = city;
- this.admin = admin;
- this.banned = banned;
- }
- public UserFx() {
- }
- private String style;
- private String baseColor;
- public String getStyle() {
- return style;
- }
- public void setStyle(String style) {
- this.style = style;
- }
- public String getBaseColor() {
- return baseColor;
- }
- public void setBaseColor(String baseColor) {
- this.baseColor = baseColor;
- }
- /* private void setBackgroundStyle(Node node, String url, String color){
- node.setStyle("-fx-background-image: url('" + url + "');-fx-background-position: center center; -fx-background-repeat: stretch;-fx-background-size: contain;-fx-base: " + color + ";");
- }*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement