Class Company.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.Partner.Builder
-
- com.anaptecs.jeaf.junit.openapi.base.Company.Builder
-
- Enclosing class:
- Company
public static class Company.Builder extends Partner.Builder
Class implements builder to create a new instance of classCompany.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseCompany.builder()instead of private constructor to create new builder.protectedBuilder(Company pObject)UseCompany.builder(Company)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Companybuild()Method creates a new instance of class Company.CompanybuildValidated()Method creates a new validated instance of class Company.Company.BuildersetID(com.anaptecs.jeaf.xfun.api.common.ObjectIdentity<?> pObjectID)Method sets the identifier for the object created using the builder.Company.BuildersetName(java.lang.String pName)Method sets attributename.Company.BuildersetPostalAddresses(java.util.List<PostalAddress> pPostalAddresses)Method sets associationPartner.postalAddresses.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseCompany.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(Company pObject)
UseCompany.builder(Company)instead of private constructor to create new builder.
-
-
Method Detail
-
setID
public Company.Builder setID(com.anaptecs.jeaf.xfun.api.common.ObjectIdentity<?> pObjectID)
Method sets the identifier for the object created using the builder. The reference may be null since an id is not mandatory.- Overrides:
setIDin classPartner.Builder
-
setPostalAddresses
public Company.Builder setPostalAddresses(java.util.List<PostalAddress> pPostalAddresses)
Method sets associationPartner.postalAddresses.- Overrides:
setPostalAddressesin classPartner.Builder- Parameters:
pPostalAddresses- Collection to whichPartner.postalAddressesshould be set.- Returns:
Company.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setName
public Company.Builder setName(java.lang.String pName)
Method sets attributename.- Parameters:
pName- Value to whichnameshould be set.- Returns:
Company.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public Company build()
Method creates a new instance of class Company. The object will be initialized with the values of the builder.- Overrides:
buildin classPartner.Builder- Returns:
- Company Created object. The method never returns null.
-
buildValidated
public Company buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class Company. The object will be initialized with the values of the builder and validated afterwards.- Overrides:
buildValidatedin classPartner.Builder- Returns:
- Company 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.
-
-