Package com.enhancedechest.log
Record Class LogEntry
java.lang.Object
java.lang.Record
com.enhancedechest.log.LogEntry
- Record Components:
id- row id, used to fetch the snapshot on clickopenedAt- epoch millis the chest was openedclosedAt- epoch millis it was closedactorName- last-known name of who did it, ornullindex- 1-based chest indexsize- slot count of the chestdiff- the change summary (always non-empty for a stored visit)
public record LogEntry(long id, long openedAt, long closedAt, @Nullable String actorName, int index, int size, List<DiffLine> diff)
extends Record
One row of the chest log as shown in the
/ee log GUI — everything a pane needs except
the snapshot blob, which is left in the database and fetched only when the pane is actually clicked.
Keeping the (potentially multi-KB) blob out of the list query is what lets a page of 45 entries load
cheaply.
One entry is one visit: opened, changed, closed. There is no separate open/close event any more.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of theactorNamerecord component.longclosedAt()Returns the value of theclosedAtrecord component.diff()Returns the value of thediffrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.intindex()Returns the value of theindexrecord component.longopenedAt()Returns the value of theopenedAtrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LogEntry
public LogEntry(long id, long openedAt, long closedAt, @Nullable @Nullable String actorName, int index, int size, List<DiffLine> diff) Creates an instance of aLogEntryrecord class.- Parameters:
id- the value for theidrecord componentopenedAt- the value for theopenedAtrecord componentclosedAt- the value for theclosedAtrecord componentactorName- the value for theactorNamerecord componentindex- the value for theindexrecord componentsize- the value for thesizerecord componentdiff- the value for thediffrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
openedAt
public long openedAt()Returns the value of theopenedAtrecord component.- Returns:
- the value of the
openedAtrecord component
-
closedAt
public long closedAt()Returns the value of theclosedAtrecord component.- Returns:
- the value of the
closedAtrecord component
-
actorName
Returns the value of theactorNamerecord component.- Returns:
- the value of the
actorNamerecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
diff
Returns the value of thediffrecord component.- Returns:
- the value of the
diffrecord component
-