Class ParentClass.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.ParentClass.Builder
-
- Direct Known Subclasses:
ChildA.Builder,ChildB.Builder
- Enclosing class:
- ParentClass
public static class ParentClass.Builder extends java.lang.ObjectClass implements builder to create a new instance of classParentClass.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseParentClass.builder()instead of private constructor to create new builder.protectedBuilder(ParentClass pObject)UseParentClass.builder(ParentClass)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ParentClassbuild()Method creates a new instance of class ParentClass.ParentClassbuildValidated()Method creates a new validated instance of class ParentClass.ParentClass.BuildersetIbans(java.util.Set<IBAN> pIbans)Method sets associationibans.ParentClass.BuildersetLegacyBankAccounts(java.util.List<BankAccount> pLegacyBankAccounts)Deprecated.ParentClass.BuildersetParentAttribute(java.lang.String pParentAttribute)Method sets attributeparentAttribute.ParentClass.BuildersetTheBankAccount(BankAccount pTheBankAccount)Deprecated.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseParentClass.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(ParentClass pObject)
UseParentClass.builder(ParentClass)instead of private constructor to create new builder.
-
-
Method Detail
-
setParentAttribute
public ParentClass.Builder setParentAttribute(java.lang.String pParentAttribute)
Method sets attributeparentAttribute.- Parameters:
pParentAttribute- Value to whichparentAttributeshould be set.- Returns:
ParentClass.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setIbans
public ParentClass.Builder setIbans(java.util.Set<IBAN> pIbans)
Method sets associationibans.- Parameters:
pIbans- Collection to whichibansshould be set.- Returns:
ParentClass.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setTheBankAccount
@Deprecated public ParentClass.Builder setTheBankAccount(BankAccount pTheBankAccount)
Deprecated.Method sets associationtheBankAccount.- Parameters:
pTheBankAccount- Value to whichtheBankAccountshould be set.- Returns:
ParentClass.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setLegacyBankAccounts
@Deprecated public ParentClass.Builder setLegacyBankAccounts(java.util.List<BankAccount> pLegacyBankAccounts)
Deprecated.Method sets associationlegacyBankAccounts.- Parameters:
pLegacyBankAccounts- Collection to whichlegacyBankAccountsshould be set.- Returns:
ParentClass.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public ParentClass build()
Method creates a new instance of class ParentClass. The object will be initialized with the values of the builder.- Returns:
- ParentClass Created object. The method never returns null.
-
buildValidated
public ParentClass buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class ParentClass. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- ParentClass 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.
-
-