Class ProductBase.BuilderBase
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.ProductBase.BuilderBase
-
- Direct Known Subclasses:
Product.Builder
- Enclosing class:
- ProductBase
public abstract static class ProductBase.BuilderBase extends java.lang.ObjectClass implements builder to create a new instance of class Product. 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 Product.builder()} instead of protected constructor to create new builder.protectedBuilderBase(ProductBase pObject)Use {@link Product.builder(Product)} instead of protected constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Productbuild()Method creates a new instance of class Product.ProductbuildValidated()Method creates a new validated instance of class Product.ProductBase.BuilderBasesetDescription(java.lang.String pDescription)Deprecated.ProductBase.BuilderBasesetID(com.anaptecs.jeaf.xfun.api.common.ObjectIdentity<?> pObjectID)Method sets the identifier for the object created using the builder.ProductBase.BuilderBasesetImage(byte[] pImage)Method sets attributeimage.ProductBase.BuilderBasesetLink(java.net.URL pLink)Method sets attributelink.ProductBase.BuilderBasesetName(java.lang.String pName)Method sets attributename.ProductBase.BuilderBasesetProductCodes(java.util.Set<ProductCode> pProductCodes)Method sets associationproductCodes.ProductBase.BuilderBasesetProductID(java.util.UUID pProductID)Method sets attributeproductID.ProductBase.BuilderBasesetResellers(java.util.Set<Reseller> pResellers)Method sets associationresellers.ProductBase.BuilderBasesetSortiments(java.util.Set<Sortiment> pSortiments)Method sets associationsortiments.ProductBase.BuilderBasesetSupportedCurrencies(java.util.Set<CurrencyCode> pSupportedCurrencies)Method sets associationsupportedCurrencies.ProductBase.BuilderBasesetUri(java.lang.String pUri)Method sets attributeuri.
-
-
-
Constructor Detail
-
BuilderBase
protected BuilderBase()
Use {@link Product.builder()} instead of protected constructor to create new builder.
-
BuilderBase
protected BuilderBase(ProductBase pObject)
Use {@link Product.builder(Product)} instead of protected constructor to create new builder.
-
-
Method Detail
-
setID
public ProductBase.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.
-
setResellers
public ProductBase.BuilderBase setResellers(java.util.Set<Reseller> pResellers)
Method sets associationresellers.- Parameters:
pResellers- Collection to whichresellersshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setName
public ProductBase.BuilderBase setName(java.lang.String pName)
Method sets attributename.- Parameters:
pName- Value to whichnameshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setImage
public ProductBase.BuilderBase setImage(byte[] pImage)
Method sets attributeimage.- Parameters:
pImage- Value to whichimageshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setLink
public ProductBase.BuilderBase setLink(java.net.URL pLink)
Method sets attributelink.- Parameters:
pLink- Value to whichlinkshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setProductID
public ProductBase.BuilderBase setProductID(java.util.UUID pProductID)
Method sets attributeproductID.- Parameters:
pProductID- Value to whichproductIDshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setSupportedCurrencies
public ProductBase.BuilderBase setSupportedCurrencies(java.util.Set<CurrencyCode> pSupportedCurrencies)
Method sets associationsupportedCurrencies.- Parameters:
pSupportedCurrencies- Collection to whichsupportedCurrenciesshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setProductCodes
public ProductBase.BuilderBase setProductCodes(java.util.Set<ProductCode> pProductCodes)
Method sets associationproductCodes.- Parameters:
pProductCodes- Collection to whichproductCodesshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setDescription
@Deprecated public ProductBase.BuilderBase setDescription(java.lang.String pDescription)
Deprecated.Method sets attributedescription.- Parameters:
pDescription- Value to whichdescriptionshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setSortiments
public ProductBase.BuilderBase setSortiments(java.util.Set<Sortiment> pSortiments)
Method sets associationsortiments.- Parameters:
pSortiments- Collection to whichsortimentsshould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setUri
public ProductBase.BuilderBase setUri(java.lang.String pUri)
Method sets attributeuri.- Parameters:
pUri- Value to whichurishould be set.- Returns:
ProductBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
build
public Product build()
Method creates a new instance of class Product. The object will be initialized with the values of the builder.- Returns:
- Product Created object. The method never returns null.
-
buildValidated
public Product buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class Product. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- Product 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.
-
-