
package de.ivu.elect.business.system.boundary;

import org.apache.deltaspike.core.api.scope.ConversationGroup;
import org.apache.deltaspike.core.api.scope.GroupedConversationScoped;

import de.ivu.elect.business.mandant.entity.Mandant;
import de.ivu.elect.business.system.entity.SystemLog;

@GroupedConversationScoped
@ConversationGroup(AbstractSystemLogSearchParameters.class)
public class SystemLogSearchParameters extends AbstractSystemLogSearchParameters {

  private static final long serialVersionUID = 1L;

  private SystemLog systemLog;

  private Mandant mandant;

  public Mandant getMandant() {
    return mandant;
  }

  public void setMandant(Mandant mandant) {
    this.mandant = mandant;
  }

  public SystemLogSearchParameters() {
    super();
  }

  @Override
  protected Long getDefaultLimit() {
    return GLOBAL_MASSENDATEN_DEFAULT_LIMIT;
  }

  public SystemLog getSystemLog() {
    if (systemLog == null) {
      systemLog = new SystemLog();
      systemLog.setStatus(null);
    }

    return systemLog;
  }

  @Override
  public void reset() {
    super.reset();
    systemLog = null;
    mandant = null;
  }
}
