package vut.msa.pojos;
// Generated 8.3.2012 20:22:30 by Hibernate Tools 3.2.1.GA

/**
 * User generated by hbm2java
 */
public class User implements java.io.Serializable {

    private Short id;
    private Integer version;
    private String username;
    private String rights;
    private String password;
    private String email;

    public User() {
        this.username = "";
        this.password = "";
        this.rights = "";
        this.email = "";
        this.version = 1;
    }

    public User(String username, String rights, String password, String email) {
        this.username = username;
        this.rights = rights;
        this.password = password;
        this.email = email;
    }

    // PROPERTY: id
    public Short getId() { return this.id; }
    public void setId(Short id) { this.id = id; }

    //PROPERTY: version
    public Integer getVersion() { return this.version; }
    public void setVersion(Integer version) { this.version = version; }

    //PROPERTY: username
    public String getUsername() { return this.username; }
    public void setUsername(String username) { this.username = username; }

    //PROPERTY: rights
    public String getRights() { return this.rights; }
    public void setRights(String rights) { this.rights = rights; }

    //PROPERTY: password
    public String getPassword() { return this.password; }
    public void setPassword(String password) { this.password = password; }

    //PROPERTY: email
    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final User other = (User) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 89 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 89 * hash + (this.password != null ? this.password.hashCode() : 0);
        return hash;
    }
}
