Class 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 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:
        setID in class Partner.Builder
      • setSurname

        public PersonBase.BuilderBase setSurname​(java.lang.String pSurname)
        Method sets attribute surname.
        Parameters:
        pSurname - Value to which surname should be set.
        Returns:
        PersonBase.BuilderBase Instance 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:
        build in class Partner.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:
        buildValidated in class Partner.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.