Class Booking.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.Booking.Builder
-
- Enclosing class:
- Booking
public static class Booking.Builder extends java.lang.ObjectClass implements builder to create a new instance of classBooking.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseBooking.builder()instead of private constructor to create new builder.protectedBuilder(Booking pObject)UseBooking.builder(Booking)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bookingbuild()Method creates a new instance of class Booking.BookingbuildValidated()Method creates a new validated instance of class Booking.Booking.BuildersetBookingID(BookingID pBookingID)Method sets associationbookingID.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseBooking.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(Booking pObject)
UseBooking.builder(Booking)instead of private constructor to create new builder.
-
-
Method Detail
-
setBookingID
public Booking.Builder setBookingID(BookingID pBookingID)
Method sets associationbookingID.- Parameters:
pBookingID- Value to whichbookingIDshould be set.- Returns:
Booking.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public Booking build()
Method creates a new instance of class Booking. The object will be initialized with the values of the builder.- Returns:
- Booking Created object. The method never returns null.
-
buildValidated
public Booking buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class Booking. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- Booking Created and validated object. The method never returns null.
- Throws:
javax.validation.ConstraintViolationException- in case that one or more validations for the created object failed.
-
-