package org.snomed.otf.scheduler.domain;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
public class WhiteListedConcept {

	@EmbeddedId
	@JsonIgnore
	WhiteListedConceptId id;
	
	String fsn;

	public String getFsn() {
		return fsn;
	}
	
	public String getSctId() {
		return id.getSctId();
	}

	public void setSctId(String sctId) {
		if (id == null) {
			id = new WhiteListedConceptId();
		}
		id.setSctId(sctId);
	}

	public void setFsn(String fsn) {
		this.fsn = fsn;
	}
	
	public WhiteListedConceptId getId() {
		return id;
	}
	
	@Override
	public boolean equals (Object obj) {
		if (obj instanceof WhiteListedConcept) {
			return this.id.equals(((WhiteListedConcept)obj).getId());
		}
		return false;
	}
	
	@Override
	public int hashCode() {
		return id.hashCode();
	}
	
}

@@ -852,10 +852,115 @@
 );%0A%09%7D%0A%09%0A
+%09@Override%0A%09public String toString() %7B%0A%09%09return id.getSctId() + %22%7C%22 + fsn + %22%7C - %22 + id.getJobId();%0A%09%7D%0A%09%0A
 %7D%0A

Add toString for WhiteListedConcept