
package de.ivu.elect.presentation.pruefung;

import java.io.Serializable;

import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;

import de.ivu.elect.business.pruefung.boundary.ZulassungPruefer;
import de.ivu.elect.business.pruefung.boundary.ZulassungPrueferExtendedDAOFactory;

@RequestScoped
public class ZulassungPrueferRequestScope implements Serializable {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient ZulassungPrueferExtendedDAOFactory zulassungPrueferExtendedDAOFactory;

  private ZulassungPruefer zulassungPruefer;

  public ZulassungPrueferRequestScope() {
    super();
  }

  public ZulassungPruefer getZulassungPruefer() {
    if (zulassungPruefer == null) {
      zulassungPruefer = createZulassungPruefer();
    }

    return zulassungPruefer;
  }

  protected ZulassungPruefer createZulassungPruefer() {
    return zulassungPrueferExtendedDAOFactory.createZulassungPruefer();
  }
}
