Class Company.Builder

  • Enclosing class:
    Company

    public static class Company.Builder
    extends Partner.Builder
    Class implements builder to create a new instance of class Company.
    • Constructor Detail

      • Builder

        protected Builder()
        Use Company.builder() 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:
        setID in class Partner.Builder
      • setName

        public Company.Builder setName​(java.lang.String pName)
        Method sets attribute name.
        Parameters:
        pName - Value to which name should be set.
        Returns:
        Company.Builder Instance 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:
        build in class Partner.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:
        buildValidated in class Partner.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.