
package de.ivu.elect.presentation.system.menu;

import javax.inject.Inject;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.system.boundary.HibernateStatistik;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractHibernateStatistikMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Inject
  protected transient HibernateStatistik hibernateStatistik;

  public AbstractHibernateStatistikMenuItemEntry() {
    super();
  }

  @Override
  protected AbstractGebietSecurity getGebietSecurity() {
    return KEINE_GEBIET_SECURITY;
  }

  @Override
  public boolean isRendered() {
    return hasUseCasePermission(UseCasePermission.HIBERNATE_STATISTIK_SEARCH) && hibernateStatistik.isStatistikVerfuegbar();
  }

  @Override
  public boolean isDisabledInternal() {
    return false;
  }
}
