package net.ihe.xcpd.init.action;

import net.ihe.gazelle.simulator.common.model.ContextualInformation;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

/**
 * 
 * @author abderrazek boufahja
 *
 */
@Name("contextualInformationHome")
public class ContextualInformationHome
		extends
			EntityHome<ContextualInformation> {

	public void setContextualInformationId(Integer id) {
		setId(id);
	}

	public Integer getContextualInformationId() {
		return (Integer) getId();
	}

	@Override
	protected ContextualInformation createInstance() {
		ContextualInformation contextualInformation = new ContextualInformation();
		return contextualInformation;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public ContextualInformation getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
