Interface Reservation
public interface Reservation
Reservation
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Reservation reservation = Reservation.builder()
.quantity(1)
.owner(ownerBuilder -> ownerBuilder)
.createdAt("{createdAt}")
.checkoutStartedAt("{checkoutStartedAt}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReservationBuilder
builder()
builder factory method for Reservationstatic ReservationBuilder
builder
(Reservation template) create builder for Reservation instancestatic Reservation
deepCopy
(Reservation template) factory method to create a deep copy of Reservation@NotNull String
@NotNull String
@NotNull @Valid Reference
getOwner()
@NotNull Integer
static Reservation
of()
factory methodstatic Reservation
of
(Reservation template) factory method to create a shallow copy Reservationvoid
setCheckoutStartedAt
(String checkoutStartedAt) set checkoutStartedAtvoid
setCreatedAt
(String createdAt) set createdAtvoid
set ownervoid
setQuantity
(Integer quantity) set quantitystatic com.fasterxml.jackson.core.type.TypeReference<Reservation>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReservation
(Function<Reservation, T> helper) accessor map function
-
Method Details
-
getQuantity
- Returns:
- quantity
-
getOwner
- Returns:
- owner
-
getCreatedAt
- Returns:
- createdAt
-
getCheckoutStartedAt
- Returns:
- checkoutStartedAt
-
setQuantity
set quantity- Parameters:
quantity
- value to be set
-
setOwner
set owner- Parameters:
owner
- value to be set
-
setCreatedAt
set createdAt- Parameters:
createdAt
- value to be set
-
setCheckoutStartedAt
set checkoutStartedAt- Parameters:
checkoutStartedAt
- value to be set
-
of
factory method- Returns:
- instance of Reservation
-
of
factory method to create a shallow copy Reservation- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Reservation- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Reservation- Returns:
- builder
-
builder
create builder for Reservation instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withReservation
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-