# Class AuditLogObserver.AuditLogStats

java.lang.Object
com.university.bookstore.observer.AuditLogObserver.AuditLogStats

Enclosing class:
  `AuditLogObserver`

public static class AuditLogObserver.AuditLogStats extends Object
Statistics for the audit log.

Since:
  2024-09-15
Version:
  3.0
Author:
  Navid Mohaghegh

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AuditLogStats(int totalEntries, int materialAddedCount, int priceChangedCount, long oldestTimestamp, long newestTimestamp)`
  Creates audit log statistics.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getMaterialAddedCount()`
  Gets the number of material added events.
  `long`
  `getNewestTimestamp()`
  Gets the timestamp of newest entry.
  `long`
  `getOldestTimestamp()`
  Gets the timestamp of oldest entry.
  `int`
  `getPriceChangedCount()`
  Gets the number of price changed events.
  `int`
  `getTotalEntries()`
  Gets the total number of entries.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AuditLogStats

    public AuditLogStats(int totalEntries, int materialAddedCount, int priceChangedCount, long oldestTimestamp, long newestTimestamp)
    Creates audit log statistics.
    Parameters:
      `totalEntries` - total number of entries
      `materialAddedCount` - number of material added events
      `priceChangedCount` - number of price changed events
      `oldestTimestamp` - timestamp of oldest entry
      `newestTimestamp` - timestamp of newest entry

- ## Method Details

  - ### getTotalEntries

    public int getTotalEntries()
    Gets the total number of entries. @return total number of entries

  - ### getMaterialAddedCount

    public int getMaterialAddedCount()
    Gets the number of material added events. @return number of material added events

  - ### getPriceChangedCount

    public int getPriceChangedCount()
    Gets the number of price changed events. @return number of price changed events

  - ### getOldestTimestamp

    public long getOldestTimestamp()
    Gets the timestamp of oldest entry. @return timestamp of oldest entry

  - ### getNewestTimestamp

    public long getNewestTimestamp()
    Gets the timestamp of newest entry. @return timestamp of newest entry

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`