Class ProductBase.BuilderBase

  • Direct Known Subclasses:
    Product.Builder
    Enclosing class:
    ProductBase

    public abstract static class ProductBase.BuilderBase
    extends java.lang.Object
    Class 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 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.
      • setName

        public ProductBase.BuilderBase setName​(java.lang.String pName)
        Method sets attribute name.
        Parameters:
        pName - Value to which name should be set.
        Returns:
        ProductBase.BuilderBase Instance of this builder to support chaining setters. Method never returns null.
      • setLink

        public ProductBase.BuilderBase setLink​(java.net.URL pLink)
        Method sets attribute link.
        Parameters:
        pLink - Value to which link should be set.
        Returns:
        ProductBase.BuilderBase Instance of this builder to support chaining setters. Method never returns null.
      • setDescription

        @Deprecated
        public ProductBase.BuilderBase setDescription​(java.lang.String pDescription)
        Deprecated.
        Method sets attribute description.
        Parameters:
        pDescription - Value to which description should be set.
        Returns:
        ProductBase.BuilderBase Instance of this builder to support chaining setters. Method never returns null.
      • setUri

        public ProductBase.BuilderBase setUri​(java.lang.String pUri)
        Method sets attribute uri.
        Parameters:
        pUri - Value to which uri should be set.
        Returns:
        ProductBase.BuilderBase Instance 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.