//y.kwarteng

package stockInformation;

public class OrdlinementKey implements java.io.Serializable{
 private static final long serialVersionUID = 1L;

    private Long itmid;
	//private Long cusid;
	private Long ordID;
	//private Orderent orderent;
	//private Iteamdetailsent iteamdetailsent;
    //private Customerent customerent;

	public OrdlinementKey(){}


	//public OrdlinementKey(Long itmid, Long cusid){
	
		//this.setItmid(itmid);
		//this.setCusid(cusid);}


   public Long getItmid(){
		return itmid;}

	public void setItmid(Long itmid){
		this.itmid=itmid;}
/**
	public Long getCusid()
   	{return cusid;}

   	public void setCusid(Long cusid){
       	this.cusid=cusid;
   	}
*/
	public Long getOrdID(){
		return ordID;}

	public void setOrdID(Long ordID){
		this.ordID=ordID;}
    /**
    public Orderent getOrderent() {
        return orderent;
    }

    public void setOrderent(Orderent orderent) {
        this.orderent = orderent;
    }

    public Iteamdetailsent getIteamdetailsent() {
        return iteamdetailsent;
    }

    public void setIteamdetailsent(Iteamdetailsent iteamdetailsent) {
        this.iteamdetailsent = iteamdetailsent;
    }
    public Customerent getCustomerent() {
        return customerent;
    }

    public void setCustomerent(Customerent customerent) {
        this.customerent = customerent;
    }
*/


    @Override
      public int hashCode() {
            if (this. getOrdID() == null || this.getItmid() == null) {
                 return 0;
            } else {
                return (this. getOrdID().hashCode() ^ this.getItmid().hashCode());
               }
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final OrdlinementKey other = (OrdlinementKey) obj;
        if (this.itmid != other.itmid && (this.itmid == null || !this.itmid.equals(other.itmid))) {
            return false;
        }
        //if (this.cusid != other.cusid && (this.cusid == null || !this.cusid.equals(other.cusid))) {
            //return false;
        ///}
        if (this.ordID != other.ordID && (this.ordID == null || !this.ordID.equals(other.ordID))) {
            return false;
        }
        return true;
    }
/**
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final OrdlinementKey other = (OrdlinementKey) obj;
        if (this.orderent != other.orderent && (this.orderent == null || !this.orderent.equals(other.orderent))) {
            return false;
        }
        if (this.iteamdetailsent != other.iteamdetailsent && (this.iteamdetailsent == null || !this.iteamdetailsent.equals(other.iteamdetailsent))) {
            return false;
        }
        if (this.customerent != other.customerent && (this.customerent == null || !this.customerent.equals(other.customerent))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 29 * hash + (this.orderent != null ? this.orderent.hashCode() : 0);
        hash = 29 * hash + (this.iteamdetailsent != null ? this.iteamdetailsent.hashCode() : 0);
        hash = 29 * hash + (this.customerent != null ? this.customerent.hashCode() : 0);
        return hash;
    }
/**
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final OrdlinementKey other = (OrdlinementKey) obj;
        if (this.itmid != other.itmid && (this.itmid == null || !this.itmid.equals(other.itmid))) {
            return false;
        }
        if ((this.cusid == null) ? (other.cusid != null) : !this.cusid.equals(other.cusid)) {
            return false;
        }
        if ((this.ordID == null) ? (other.ordID != null) : !this.ordID.equals(other.ordID)) {
            return false;
        }
        return true;
    }

  

	*/
	  @Override
    public String toString() {
        return "" + getItmid() + "-" + getOrdID();
    }


}