Class AuditLogObserver.AuditLogStats
java.lang.Object
com.university.bookstore.observer.AuditLogObserver.AuditLogStats
- Enclosing class:
AuditLogObserver
Statistics for the audit log.
- Since:
- 2024-09-15
- Version:
- 3.0
- Author:
- Navid Mohaghegh
-
Constructor Summary
ConstructorsConstructorDescriptionAuditLogStats(int totalEntries, int materialAddedCount, int priceChangedCount, long oldestTimestamp, long newestTimestamp) Creates audit log statistics. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of material added events.longGets the timestamp of newest entry.longGets the timestamp of oldest entry.intGets the number of price changed events.intGets the total number of entries.toString()
-
Constructor Details
-
AuditLogStats
public AuditLogStats(int totalEntries, int materialAddedCount, int priceChangedCount, long oldestTimestamp, long newestTimestamp) Creates audit log statistics.- Parameters:
totalEntries- total number of entriesmaterialAddedCount- number of material added eventspriceChangedCount- number of price changed eventsoldestTimestamp- timestamp of oldest entrynewestTimestamp- 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
-