Interface Reservation


public interface Reservation
Reservation
Example to create an instance using the builder pattern

     Reservation reservation = Reservation.builder()
             .quantity(1)
             .owner(ownerBuilder -> ownerBuilder)
             .createdAt("{createdAt}")
             .checkoutStartedAt("{checkoutStartedAt}")
             .build()
 
  • Method Details

    • getQuantity

      @NotNull @NotNull Integer getQuantity()
      Returns:
      quantity
    • getOwner

      @NotNull @Valid @NotNull @Valid Reference getOwner()
      Returns:
      owner
    • getCreatedAt

      @NotNull @NotNull String getCreatedAt()
      Returns:
      createdAt
    • getCheckoutStartedAt

      @NotNull @NotNull String getCheckoutStartedAt()
      Returns:
      checkoutStartedAt
    • setQuantity

      void setQuantity(Integer quantity)
      set quantity
      Parameters:
      quantity - value to be set
    • setOwner

      void setOwner(Reference owner)
      set owner
      Parameters:
      owner - value to be set
    • setCreatedAt

      void setCreatedAt(String createdAt)
      set createdAt
      Parameters:
      createdAt - value to be set
    • setCheckoutStartedAt

      void setCheckoutStartedAt(String checkoutStartedAt)
      set checkoutStartedAt
      Parameters:
      checkoutStartedAt - value to be set
    • of

      static Reservation of()
      factory method
      Returns:
      instance of Reservation
    • of

      static Reservation of(Reservation template)
      factory method to create a shallow copy Reservation
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Reservation deepCopy(@Nullable Reservation template)
      factory method to create a deep copy of Reservation
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ReservationBuilder builder()
      builder factory method for Reservation
      Returns:
      builder
    • builder

      static ReservationBuilder builder(Reservation template)
      create builder for Reservation instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReservation

      default <T> T withReservation(Function<Reservation,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Reservation> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference