Class Sale.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.service1.Sale.Builder
-
- Enclosing class:
- Sale
public static class Sale.Builder extends java.lang.ObjectClass implements builder to create a new instance of classSale.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseSale.builder()instead of private constructor to create new builder.protectedBuilder(Sale pObject)UseSale.builder(Sale)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Salebuild()Method creates a new instance of class Sale.SalebuildValidated()Method creates a new validated instance of class Sale.Sale.BuildersetSale(Channel pSale)Method sets associationsale.Sale.BuildersetTransactionAmount(java.math.BigDecimal pTransactionAmount)Method sets attributetransactionAmount.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseSale.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(Sale pObject)
UseSale.builder(Sale)instead of private constructor to create new builder.
-
-
Method Detail
-
setTransactionAmount
public Sale.Builder setTransactionAmount(java.math.BigDecimal pTransactionAmount)
Method sets attributetransactionAmount.- Parameters:
pTransactionAmount- Value to whichtransactionAmountshould be set.- Returns:
Sale.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setSale
public Sale.Builder setSale(Channel pSale)
Method sets associationsale.- Parameters:
pSale- Value to whichsaleshould be set.- Returns:
Sale.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public Sale build()
Method creates a new instance of class Sale. The object will be initialized with the values of the builder.- Returns:
- Sale Created object. The method never returns null.
-
buildValidated
public Sale buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class Sale. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- Sale 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.
-
-