Class CompositeIDBase.BuilderBase
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.CompositeIDBase.BuilderBase
-
- Direct Known Subclasses:
CompositeID.Builder
- Enclosing class:
- CompositeIDBase
public abstract static class CompositeIDBase.BuilderBase extends java.lang.ObjectClass implements builder to create a new instance of class CompositeID. 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 CompositeID.builder()} instead of protected constructor to create new builder.protectedBuilderBase(CompositeIDBase pObject)Use {@link CompositeID.builder(CompositeID)} instead of protected constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeIDbuild()Method creates a new instance of class CompositeID.CompositeIDbuildValidated()Method creates a new validated instance of class CompositeID.CompositeIDBase.BuilderBasesetPrimaryCode(long pPrimaryCode)Method sets attributeprimaryCode.CompositeIDBase.BuilderBasesetSecondaryCode(long pSecondaryCode)Method sets attributesecondaryCode.
-
-
-
Constructor Detail
-
BuilderBase
protected BuilderBase()
Use {@link CompositeID.builder()} instead of protected constructor to create new builder.
-
BuilderBase
protected BuilderBase(CompositeIDBase pObject)
Use {@link CompositeID.builder(CompositeID)} instead of protected constructor to create new builder.
-
-
Method Detail
-
setPrimaryCode
public CompositeIDBase.BuilderBase setPrimaryCode(long pPrimaryCode)
Method sets attributeprimaryCode.- Parameters:
pPrimaryCode- Value to whichprimaryCodeshould be set.- Returns:
CompositeIDBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setSecondaryCode
public CompositeIDBase.BuilderBase setSecondaryCode(long pSecondaryCode)
Method sets attributesecondaryCode.- Parameters:
pSecondaryCode- Value to whichsecondaryCodeshould be set.- Returns:
CompositeIDBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
build
public CompositeID build()
Method creates a new instance of class CompositeID. The object will be initialized with the values of the builder.- Returns:
- CompositeID Created object. The method never returns null.
-
buildValidated
public CompositeID buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class CompositeID. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- CompositeID 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.
-
-