java.lang.Object
com.wellnessapp.model.mood.MoodEntry
- All Implemented Interfaces:
IMoodEntry
-
Constructor Summary
ConstructorDescriptionMoodEntry
(com.wellnessapp.enums.MoodType mood) Constructs a mood entry with only the mood specified, using the current time as the timestamp and no comment.MoodEntry
(com.wellnessapp.enums.MoodType mood, LocalDateTime timestamp, String comment) Represents an entry in the mood log with various constructors for different use cases. -
Method Summary
Modifier and TypeMethodDescriptionint
getId()
com.wellnessapp.enums.MoodType
getMood()
void
setComment
(String comment) void
setId
(int id) void
setMood
(com.wellnessapp.enums.MoodType value) void
setTimestamp
(LocalDateTime timestamp)
-
Constructor Details
-
MoodEntry
Represents an entry in the mood log with various constructors for different use cases. Each mood entry records the user's mood at a specific time along with optional comments.- Parameters:
mood
- The mood recorded in this entry. Should be one of the enumMoodType
.timestamp
- (*) The date and time when the mood changed. This parameter is optional and defaults to the current system time if not specified.comment
- (*) Additional text provided by the user about their mood at the time of the entry. This parameter is optional and defaults to an empty string if not specified.
-
MoodEntry
public MoodEntry(com.wellnessapp.enums.MoodType mood) Constructs a mood entry with only the mood specified, using the current time as the timestamp and no comment.- Parameters:
mood
- The mood recorded in this entry.- See Also:
-
-
Method Details
-
getId
public int getId()- Specified by:
getId
in interfaceIMoodEntry
-
setId
public void setId(int id) - Specified by:
setId
in interfaceIMoodEntry
-
getTimestamp
- Specified by:
getTimestamp
in interfaceIMoodEntry
-
setTimestamp
- Specified by:
setTimestamp
in interfaceIMoodEntry
-
getMood
public com.wellnessapp.enums.MoodType getMood()- Specified by:
getMood
in interfaceIMoodEntry
-
setMood
public void setMood(com.wellnessapp.enums.MoodType value) - Specified by:
setMood
in interfaceIMoodEntry
-
getComment
- Specified by:
getComment
in interfaceIMoodEntry
-
setComment
- Specified by:
setComment
in interfaceIMoodEntry
-