package com.dev.swms.server.model.base;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

import com.dev.energy.server.model.Entity;

public class BOMComponent extends Entity {
	private Item bom;
	private Item component;
	private double quantity;
//	private double bomQuantity;
	
//	public double getBomQuantity() {
//		return bomQuantity;
//	}
//	public void setBomQuantity(double bomQuantity) {
//		this.bomQuantity = bomQuantity;
//	}
	public int hashCode() {
		return new HashCodeBuilder().append(bom).append(component).toHashCode();
	}
	public boolean equals(final Object other) {
		if (!(other instanceof BOMComponent))
			return false;
		BOMComponent castOther = (BOMComponent) other;
		return new EqualsBuilder().append(bom, castOther.getBom()).append(
				component, castOther.getComponent()).isEquals();
	}
	public Item getBom() {
		return bom;
	}
	public void setBom(Item bom) {
		this.bom = bom;
	}
	public Item getComponent() {
		return component;
	}
	public void setComponent(Item component) {
		this.component = component;
	}
	public double getQuantity() {
		return quantity;
	}
	public void setQuantity(double quantity) {
		this.quantity = quantity;
	}

}
