Record Class HolidaySpecificationDto
java.lang.Object
java.lang.Record
com.app.controller.dto.holiday.HolidaySpecificationDto
- Record Components:
id
- the unique identifier of the holiday request (optional)userId
- the ID of the user who submitted the holiday request (optional)startDate
- the start date and time of the holiday (optional)endDate
- the end date and time of the holiday (optional)status
- the status of the holiday request (optional)
public record HolidaySpecificationDto(Long id, Long userId, LocalDateTime startDate, LocalDateTime endDate, Status status)
extends Record
Data Transfer Object (DTO) used to encapsulate filtering criteria
for querying holiday requests based on various parameters.
-
Constructor Summary
ConstructorsConstructorDescriptionHolidaySpecificationDto
(Long id, Long userId, LocalDateTime startDate, LocalDateTime endDate, Status status) Creates an instance of aHolidaySpecificationDto
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.Converts this DTO into aHolidaySpecification
, which can be used for dynamic querying of holiday requests based on provided criteria.final String
toString()
Returns a string representation of this record class.userId()
Returns the value of theuserId
record component.
-
Constructor Details
-
HolidaySpecificationDto
public HolidaySpecificationDto(Long id, Long userId, LocalDateTime startDate, LocalDateTime endDate, Status status) Creates an instance of aHolidaySpecificationDto
record class.
-
-
Method Details
-
toHolidaySpecification
Converts this DTO into aHolidaySpecification
, which can be used for dynamic querying of holiday requests based on provided criteria.- Returns:
- a new
HolidaySpecification
instance based on this DTO
-
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
-