Class Sale.Builder

  • Enclosing class:
    Sale

    public static class Sale.Builder
    extends java.lang.Object
    Class implements builder to create a new instance of class Sale.
    • Constructor Detail

      • Builder

        protected Builder()
        Use Sale.builder() instead of private constructor to create new builder.
      • Builder

        protected Builder​(Sale pObject)
        Use Sale.builder(Sale) instead of private constructor to create new builder.
    • Method Detail

      • setTransactionAmount

        public Sale.Builder setTransactionAmount​(java.math.BigDecimal pTransactionAmount)
        Method sets attribute transactionAmount.
        Parameters:
        pTransactionAmount - Value to which transactionAmount should be set.
        Returns:
        Sale.Builder Instance of this builder to support chaining setters. Method never returns null.
      • setSale

        public Sale.Builder setSale​(Channel pSale)
        Method sets association sale.
        Parameters:
        pSale - Value to which sale should be set.
        Returns:
        Sale.Builder Instance of this builder to support chaining setters. Method never returns null.
      • build

        public Sale build()
        Method creates a new instance of class Sale. The object will be initialized with the values of the builder.
        Returns:
        Sale Created object. The method never returns null.
      • buildValidated

        public Sale buildValidated()
                            throws javax.validation.ConstraintViolationException
        Method creates a new validated instance of class Sale. The object will be initialized with the values of the builder and validated afterwards.
        Returns:
        Sale 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.