package kuzumeji.action.home.erp.mng;
import java.util.ArrayList;
import java.util.List;
import kuzumeji.action.home.BaseEntityHome;
import kuzumeji.entity.erp.mng.ActualPeriod;
import kuzumeji.entity.erp.mng.Period;
import org.jboss.seam.annotations.Name;
@Name("periodHome")
public class PeriodHome extends BaseEntityHome<Period> {
    public void setPeriodId(Long id) {
        setId(id);
    }
    public Long getPeriodId() {
        return (Long) getId();
    }
    @Override
    protected Period createInstance() {
        Period period = new Period();
        return period;
    }
    public void load() {
        if (isIdDefined()) {
            wire();
        }
    }
    public void wire() {
        getInstance();
    }
    public boolean isWired() {
        return true;
    }
    public Period getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }
    public List<ActualPeriod> getActualPeriods() {
        return getInstance() == null ? null : new ArrayList<ActualPeriod>(getInstance().getActualPeriods());
    }
}
