Class PersonBase.BuilderBase
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.Partner.Builder
-
- com.anaptecs.jeaf.junit.openapi.base.PersonBase.BuilderBase
-
- Direct Known Subclasses:
Person.Builder
- Enclosing class:
- PersonBase
public abstract static class PersonBase.BuilderBase extends Partner.Builder
Class implements builder to create a new instance of class Person. As the class has read only attributes or associations instances can not be created directly. Instead this builder class has to be used.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilderBase()Use {@link Person.builder()} instead of protected constructor to create new builder.protectedBuilderBase(PersonBase pObject)Use {@link Person.builder(Person)} instead of protected constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Personbuild()Method creates a new instance of class Person.PersonbuildValidated()Method creates a new validated instance of class Person.PersonBase.BuilderBasesetFirstName(java.lang.String pFirstName)Method sets attributefirstName.PersonBase.BuilderBasesetID(com.anaptecs.jeaf.xfun.api.common.ObjectIdentity<?> pObjectID)Method sets the identifier for the object created using the builder.PersonBase.BuilderBasesetPostalAddresses(java.util.List<PostalAddress> pPostalAddresses)Method sets associationPartner.postalAddresses.PersonBase.BuilderBasesetSurname(java.lang.String pSurname)Method sets attributesurname.
-
-
-
Constructor Detail
-
BuilderBase
protected BuilderBase()
Use {@link Person.builder()} instead of protected constructor to create new builder.
-
BuilderBase
protected BuilderBase(PersonBase pObject)
Use {@link Person.builder(Person)} instead of protected constructor to create new builder.
-
-
Method Detail
-
setID
public PersonBase.BuilderBase 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 PersonBase.BuilderBase setPostalAddresses(java.util.List<PostalAddress> pPostalAddresses)
Method sets associationPartner.postalAddresses.- Overrides:
setPostalAddressesin classPartner.Builder- Parameters:
pPostalAddresses- Collection to whichPartner.postalAddressesshould be set.- Returns:
PersonBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setSurname
public PersonBase.BuilderBase setSurname(java.lang.String pSurname)
Method sets attributesurname.- Parameters:
pSurname- Value to whichsurnameshould be set.- Returns:
PersonBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setFirstName
public PersonBase.BuilderBase setFirstName(java.lang.String pFirstName)
Method sets attributefirstName.- Parameters:
pFirstName- Value to whichfirstNameshould be set.- Returns:
PersonBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
build
public Person build()
Method creates a new instance of class Person. The object will be initialized with the values of the builder.- Overrides:
buildin classPartner.Builder- Returns:
- Person Created object. The method never returns null.
-
buildValidated
public Person buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class Person. The object will be initialized with the values of the builder and validated afterwards.- Overrides:
buildValidatedin classPartner.Builder- Returns:
- Person 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.
-
-