Class StandardDesignatedRelationEntityValidatorContribution

java.lang.Object
ch.tocco.nice2.persist.core.api.validation.StandardDesignatedRelationEntityValidatorContribution

public class StandardDesignatedRelationEntityValidatorContribution extends Object
example: checks if an Effort entity is either linked to exactly one Task or one Case entity

 @Bean
 public StandardDesignatedRelationEntityValidatorContribution effortStandardDesignatedRelationEntityValidatorContribution() {
     StandardDesignatedRelationEntityValidatorContribution contribution = new StandardDesignatedRelationEntityValidatorContribution();
     contribution.setEntityName("Effort");
     contribution.setRelationName("relCase");
     contribution.setErrorMessage("entities.Effort.validate.assignment");
     return contribution;
 }
 
  • Constructor Details

    • StandardDesignatedRelationEntityValidatorContribution

      public StandardDesignatedRelationEntityValidatorContribution()
  • Method Details

    • getEntityName

      public String getEntityName()
    • setEntityName

      public void setEntityName(String entityName)
    • getRelationName

      public String getRelationName()
    • setRelationName

      public void setRelationName(String relationName)
    • getErrorMessage

      public String getErrorMessage()
    • setErrorMessage

      public void setErrorMessage(String errorMessage)