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 WorkerStructure extends Entity {

	private String description;

	private Worker worker;

	private Structure structure;
	
	protected WorkerStructure(){
		
	}
	
	public WorkerStructure(Structure structure,Worker worker,String description){
		this.worker = worker;
		this.structure = structure;
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	

	public Worker getWorker() {
		return worker;
	}

	public void setWorker(Worker worker) {
		this.worker = worker;
	}

	public Structure getStructure() {
		return structure;
	}

	public void setStructure(Structure structure) {
		this.structure = structure;
	}

	public boolean equals(final Object other) {
		if (!(other instanceof WorkerStructure))
			return false;
		WorkerStructure castOther = (WorkerStructure) other;
		return new EqualsBuilder().append(worker, castOther.getWorker()).append(
				structure, castOther.getStructure()).isEquals();
	}
	public int hashCode() {
		return new HashCodeBuilder().append(worker).append(structure)
				.toHashCode();
	}
	
}
