Record Class SessionDAO.SessionEntity
java.lang.Object
java.lang.Record
com.serinity.exercicecontrol.dao.SessionDAO.SessionEntity
- Enclosing class:
SessionDAO
public static record SessionDAO.SessionEntity(int id, SessionStatus status, LocalDateTime startedAt, LocalDateTime completedAt, String feedback, int activeSeconds, LocalDateTime lastResumedAt)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSessionEntity(int id, SessionStatus status, LocalDateTime startedAt, LocalDateTime completedAt, String feedback, int activeSeconds, LocalDateTime lastResumedAt) Creates an instance of aSessionEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveSecondsrecord component.Returns the value of thecompletedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.feedback()Returns the value of thefeedbackrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.Returns the value of thelastResumedAtrecord component.Returns the value of thestartedAtrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SessionEntity
public SessionEntity(int id, SessionStatus status, LocalDateTime startedAt, LocalDateTime completedAt, String feedback, int activeSeconds, LocalDateTime lastResumedAt) Creates an instance of aSessionEntityrecord class.- Parameters:
id- the value for theidrecord componentstatus- the value for thestatusrecord componentstartedAt- the value for thestartedAtrecord componentcompletedAt- the value for thecompletedAtrecord componentfeedback- the value for thefeedbackrecord componentactiveSeconds- the value for theactiveSecondsrecord componentlastResumedAt- the value for thelastResumedAtrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
completedAt
Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-
feedback
Returns the value of thefeedbackrecord component.- Returns:
- the value of the
feedbackrecord component
-
activeSeconds
public int activeSeconds()Returns the value of theactiveSecondsrecord component.- Returns:
- the value of the
activeSecondsrecord component
-
lastResumedAt
Returns the value of thelastResumedAtrecord component.- Returns:
- the value of the
lastResumedAtrecord component
-