/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package inventario.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 *
 * @author Daniel
 */
@Entity
public class Outcome implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String time_event;
    @ManyToOne(cascade = CascadeType.MERGE)
    private Person owner;
    private boolean ready;
    private ArrayList<Long>    outcome_item_id;
    private ArrayList<Integer> outcome_item_cant;
    private ArrayList<String>  outcome_item_name;
    private int quantity;

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
    

    public ArrayList<Integer> getOutcome_item_cant() {
        if (outcome_item_cant== null) {
            outcome_item_cant = new ArrayList<Integer>();
        }
        return outcome_item_cant;
    }

    public void setOutcome_item_cant(ArrayList<Integer> outcome_item_cant) {
        this.outcome_item_cant = outcome_item_cant;
    }

    public ArrayList<Long> getOutcome_item_id() {
        if (outcome_item_id== null) {
            outcome_item_id = new ArrayList<Long>();
        }
        return outcome_item_id;
    }

    public void setOutcome_item_id(ArrayList<Long> outcome_item_id) {
        this.outcome_item_id = outcome_item_id;
    }

    public ArrayList<String> getOutcome_item_name() {
        if (outcome_item_name== null) {
            outcome_item_name = new ArrayList<String>();
        }
        return outcome_item_name;
    }

    public void setOutcome_item_name(ArrayList<String> outcome_item_name) {
        this.outcome_item_name = outcome_item_name;
    }



    public Person getOwner() {
        return owner;
    }

    public void setOwner(Person owner) {
        this.owner = owner;
    }

    public boolean isReady() {
        return ready;
    }

    public void setReady(boolean ready) {
        this.ready = ready;
    }

    public String getTime_event() {
        return time_event;
    }

    public void setTime_event(String time_event) {
        this.time_event = time_event;
    }

    public Long getId() {
        return id;
    }

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

    @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 Outcome)) {
            return false;
        }
        Outcome other = (Outcome) 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 "superpyme.entity.Request[id=" + id + "]";
    }
}
