@Override protected void validateInstance() throws BillyValidationException, ValidationException { super.validateInstance(); ESPaymentEntity p = this.getTypeInstance(); BillyValidator.mandatory( p.getPaymentAmount(), ESPaymentBuilderImpl.LOCALIZER.getString("field.payment_amount")); BillyValidator.mandatory( p.getPaymentMethod(), ESPaymentBuilderImpl.LOCALIZER.getString("field.payment_method")); BillyValidator.mandatory( p.getPaymentDate(), ESPaymentBuilderImpl.LOCALIZER.getString("field.payment_date")); }
@Override public TBuilder setPaymentMethod(Enum<?> method) { BillyValidator.notNull( method, ESPaymentBuilderImpl.LOCALIZER.getString("field.payment_method")); this.getTypeInstance().setPaymentMethod(method); return this.getBuilder(); }
@Override public TBuilder setPaymentAmount(BigDecimal amount) { BillyValidator.notNull( amount, ESPaymentBuilderImpl.LOCALIZER.getString("field.payment_amount")); this.getTypeInstance().setPaymentAmount(amount); return this.getBuilder(); }
@Override public TBuilder setPaymentDate(Date date) { BillyValidator.notNull(date, ESPaymentBuilderImpl.LOCALIZER.getString("field.payment_date")); this.getTypeInstance().setPaymentDate(date); return this.getBuilder(); }