package com.arrebol.taxiservicios.wrapper;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 *
 * @author Carlos Janitzio Zavala Lopez
 */
public class PersonWrapper implements Serializable {

    private static final long serialVersionUID = 7482157259192538492L;

    private String id;
    private String completeName;
    private String firstName;
    private String secondName;
    private String lastName;
    private String middleName;
    private Date admissionDate;
    private String address;
    private String mobile;
    private String localPhone;
    private String taxisByCustomer;
    private float adeudoByCustomer;

    public PersonWrapper() {
    }

    public PersonWrapper(String id, String firstName, String secondName, String lastName, String middleName, Date admissionDate) {
        this.id = id;
        this.firstName = firstName;
        this.secondName = secondName;
        this.lastName = lastName;
        this.middleName = middleName;
        this.admissionDate = admissionDate;
    }

    public PersonWrapper(String id, String firstName, String secondName, String lastName, String middleName, String address, String mobile, String localPhone) {
        this.id = id;
        this.firstName = firstName;
        this.secondName = secondName;
        this.lastName = lastName;
        this.middleName = middleName;
        this.address = address;
        this.mobile = mobile;
        this.localPhone = localPhone;
    }

    public float getAdeudoByCustomer() {
        return adeudoByCustomer;
    }

    public void setAdeudoByCustomer(float adeudoByCustomer) {
        this.adeudoByCustomer = adeudoByCustomer;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCompleteName() {
        if (null != getFirstName()) {
            return getFirstName() + " " + getSecondName() + " " + getLastName() + " " + getMiddleName();
        }
        return completeName;
    }

    public void setCompleteName(String completeName) {
        this.completeName = completeName;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getSecondName() {
        return secondName;
    }

    public void setSecondName(String secondName) {
        this.secondName = secondName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getMiddleName() {
        return middleName;
    }

    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }

    public Date getAdmissionDate() {
        return admissionDate;
    }

    public void setAdmissionDate(Date admissionDate) {
        this.admissionDate = admissionDate;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getLocalPhone() {
        return localPhone;
    }

    public void setLocalPhone(String localPhone) {
        this.localPhone = localPhone;
    }

    public String getTaxisByCustomer() {
        return taxisByCustomer;
    }

    public void setTaxisByCustomer(String taxisByCustomer) {
        this.taxisByCustomer = taxisByCustomer;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 23 * hash + Objects.hashCode(this.id);
        return hash;
    }

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

}
