com.eyem.entity.Usuario.java Source code

Java tutorial

Introduction

Here is the source code for com.eyem.entity.Usuario.java

Source

/*
 * 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 com.eyem.entity;

import java.util.Objects;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection = "usuario")
public class Usuario {

    //@Id
    private String email;
    private String nombre;
    private String imagen;
    private String imagenCover;
    private String pass;

    public Usuario() {
    }

    public Usuario(String email, String imagen, String nombre, String pass, String imagenCover) {
        this.email = email;
        this.imagen = imagen;
        this.nombre = nombre;
        this.pass = pass;
        this.imagenCover = imagenCover;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getImagen() {
        return imagen;
    }

    public void setImagen(String imagen) {
        this.imagen = imagen;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getImagenCover() {
        return imagenCover;
    }

    public void setImagenCover(String imagenCover) {
        this.imagenCover = imagenCover;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Usuario other = (Usuario) obj;
        if (!Objects.equals(this.email, other.email)) {
            return false;
        }
        if (!Objects.equals(this.nombre, other.nombre)) {
            return false;
        }
        if (!Objects.equals(this.imagen, other.imagen)) {
            return false;
        }
        return true;
    }

}