Class TheReadOnlyServiceObject.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.TheReadOnlyServiceObject.Builder
-
- Enclosing class:
- TheReadOnlyServiceObject
public static class TheReadOnlyServiceObject.Builder extends java.lang.ObjectClass implements builder to create a new instance of classTheReadOnlyServiceObject.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseTheReadOnlyServiceObject.builder()instead of private constructor to create new builder.protectedBuilder(TheReadOnlyServiceObject pObject)UseTheReadOnlyServiceObject.builder(TheReadOnlyServiceObject)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TheReadOnlyServiceObjectbuild()Method creates a new instance of class TheReadOnlyServiceObject.TheReadOnlyServiceObjectbuildValidated()Method creates a new validated instance of class TheReadOnlyServiceObject.TheReadOnlyServiceObject.BuildersetBits(boolean[] pBits)Method sets attributebits.TheReadOnlyServiceObject.BuildersetBookingCodes(java.util.Set<BookingCode> pBookingCodes)Method sets associationbookingCodes.TheReadOnlyServiceObject.BuildersetInventoryType(InventoryType pInventoryType)Method sets associationinventoryType.TheReadOnlyServiceObject.BuildersetName(java.lang.String pName)Method sets attributename.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseTheReadOnlyServiceObject.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(TheReadOnlyServiceObject pObject)
UseTheReadOnlyServiceObject.builder(TheReadOnlyServiceObject)instead of private constructor to create new builder.
-
-
Method Detail
-
setName
public TheReadOnlyServiceObject.Builder setName(java.lang.String pName)
Method sets attributename.- Parameters:
pName- Value to whichnameshould be set.- Returns:
TheReadOnlyServiceObject.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setBits
public TheReadOnlyServiceObject.Builder setBits(boolean[] pBits)
Method sets attributebits.- Parameters:
pBits- Value to whichbitsshould be set.- Returns:
TheReadOnlyServiceObject.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setBookingCodes
public TheReadOnlyServiceObject.Builder setBookingCodes(java.util.Set<BookingCode> pBookingCodes)
Method sets associationbookingCodes.- Parameters:
pBookingCodes- Collection to whichbookingCodesshould be set.- Returns:
TheReadOnlyServiceObject.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setInventoryType
public TheReadOnlyServiceObject.Builder setInventoryType(InventoryType pInventoryType)
Method sets associationinventoryType.- Parameters:
pInventoryType- Value to whichinventoryTypeshould be set.- Returns:
TheReadOnlyServiceObject.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public TheReadOnlyServiceObject build()
Method creates a new instance of class TheReadOnlyServiceObject. The object will be initialized with the values of the builder.- Returns:
- TheReadOnlyServiceObject Created object. The method never returns null.
-
buildValidated
public TheReadOnlyServiceObject buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class TheReadOnlyServiceObject. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- TheReadOnlyServiceObject 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.
-
-