Record Class HolidayDto
java.lang.Object
java.lang.Record
com.app.controller.dto.holiday.HolidayDto
- Record Components:
id
- the unique identifier of the holiday requestuserId
- the ID of the user who submitted the holiday requeststartDate
- the start date and time of the holidayendDate
- the end date and time of the holidaystatus
- the current status of the holiday request
public record HolidayDto(Long id, Long userId, LocalDateTime startDate, LocalDateTime endDate, Status status)
extends Record
Data Transfer Object (DTO) representing a holiday request with full details.
Includes identifiers, dates, and the current status of the request.
-
Constructor Summary
ConstructorsConstructorDescriptionHolidayDto
(Long id, Long userId, LocalDateTime startDate, LocalDateTime endDate, Status status) Creates an instance of aHolidayDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionendDate()
Returns the value of theendDate
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of thestartDate
record component.status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.userId()
Returns the value of theuserId
record component.
-
Constructor Details
-
HolidayDto
public HolidayDto(Long id, Long userId, LocalDateTime startDate, LocalDateTime endDate, Status status) Creates an instance of aHolidayDto
record class.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
id
-
userId
-
startDate
-
endDate
-
status
-