package in.cdac.medinfo.csnotk.csnolib.disb.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * @author root
 * {@link SubstanceDetail} contains detail information about Substance
 */
public class SubstanceDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	private String id;

	private Date dateOfCreation;

	private String molecularWeight;

	private String substanceInfo;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

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

	private String toxicity;

	private int version;
	
	private Date dateOfModification;
	
	public SubstanceDetail() {
	}
	
	public SubstanceDetail(String id)
	{
		this.id=id;
	}

	private List<ChemicalRepresentation> chemicalRepresentations=new ArrayList<>();

	private List<CompositionDetail> compositionDetails=new ArrayList<>();

	private List<SubstanceDescription> substanceDescriptions=new ArrayList<>();

	private RecordStatus recordStatus;
	
	private List<SubstanceIdentifier> substanceIdentifiers=new ArrayList<>();

	public String getId() {
		return id;
	}

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

	public Date getDateOfCreation() {
		return dateOfCreation;
	}

	public void setDateOfCreation(Date dateOfCreation) {
		this.dateOfCreation = dateOfCreation;
	}


	public String getMolecularWeight() {
		return molecularWeight;
	}

	public void setMolecularWeight(String molecularWeight) {
		this.molecularWeight = molecularWeight;
	}

	public String getSubstanceInfo() {
		return substanceInfo;
	}

	public void setSubstanceInfo(String substanceInfo) {
		this.substanceInfo = substanceInfo;
	}

	public String getToxicity() {
		return toxicity;
	}

	public void setToxicity(String toxicity) {
		this.toxicity = toxicity;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public List<ChemicalRepresentation> getChemicalRepresentations() {
		return chemicalRepresentations;
	}

	public void setChemicalRepresentations(List<ChemicalRepresentation> chemicalRepresentations) {
		this.chemicalRepresentations = chemicalRepresentations;
	}

	public List<CompositionDetail> getCompositionDetails() {
		return compositionDetails;
	}

	public void setCompositionDetails(List<CompositionDetail> compositionDetails) {
		this.compositionDetails = compositionDetails;
	}
	
	public List<SubstanceDescription> getSubstanceDescriptions() {
		return substanceDescriptions;
	}

	public void setSubstanceDescriptions(List<SubstanceDescription> substanceDescriptions) {
		this.substanceDescriptions = substanceDescriptions;
	}

	public RecordStatus getRecordStatus() {
		return recordStatus;
	}

	public void setRecordStatus(RecordStatus recordStatus) {
		this.recordStatus = recordStatus;
	}

	public List<SubstanceIdentifier> getSubstanceIdentifiers() {
		return substanceIdentifiers;
	}

	public void setSubstanceIdentifiers(List<SubstanceIdentifier> substanceIdentifiers) {
		this.substanceIdentifiers = substanceIdentifiers;
	}

	public Date getDateOfModification() {
		return dateOfModification;
	}

	public void setDateOfModification(Date dateOfModification) {
		this.dateOfModification = dateOfModification;
	}

	@Override
	public String toString() {
		return "SubstanceDetail [id=" + id + ", dateOfCreation=" + dateOfCreation + ", molecularWeight="
				+ molecularWeight + ", substanceInfo=" + substanceInfo + ", toxicity=" + toxicity + ", version="
				+ version + ", dateOfModification=" + dateOfModification + ", chemicalRepresentations="
				+ chemicalRepresentations + ", compositionDetails=" + compositionDetails + ", substanceDescriptions="
				+ substanceDescriptions + ", recordStatus=" + recordStatus + ", substanceIdentifiers="
				+ substanceIdentifiers + "]";
	}

	
	
}