Interface Validated


public interface Validated
A document/catalog that declares typed validation rules, checked before write and before posting. Implement it and return your BusinessRules — the Java-native replacement for @BusinessRule annotations.
 public List<BusinessRule> rules() {
     return List.of(
         new BusinessRule("client-required", "Client is required", () -> client != null),
         new BusinessRule("gross-positive", "Gross must be positive",
                 () -> gross != null && gross.signum() > 0));
 }
 
  • Method Summary

    Modifier and Type
    Method
    Description