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

import org.hibernate.stat.QueryStatistics;

public class ActivatedHibernateQueryStatistik extends HibernateQueryStatistik {

  private final QueryStatistics statistics;

  public ActivatedHibernateQueryStatistik(String name, QueryStatistics statistics) {
    super(name);
    this.statistics = statistics;
  }

  public long getAnzahlAusfuehrungen() {
    return statistics.getExecutionCount();
  }

  public long getAnzahlSpalten() {
    return statistics.getExecutionRowCount();
  }

  public long getZeitInMsDurchschnitt() {
    return statistics.getExecutionAvgTime();
  }

  public long getZeitInMsMin() {
    return statistics.getExecutionMinTime();
  }

  public long getZeitInMsMax() {
    return statistics.getExecutionMaxTime();
  }

  public long getCacheMissCount() {
    return statistics.getCacheMissCount();
  }

  public long getCacheHitCount() {
    return statistics.getCacheHitCount();
  }

  public long getCachePutCount() {
    return statistics.getCachePutCount();
  }

}
