Class StandardDesignatedRelationEntityValidatorContribution
java.lang.Object
ch.tocco.nice2.persist.core.api.validation.StandardDesignatedRelationEntityValidatorContribution
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setEntityName
(String entityName) void
setErrorMessage
(String errorMessage) void
setRelationName
(String relationName)
-
Constructor Details
-
StandardDesignatedRelationEntityValidatorContribution
public StandardDesignatedRelationEntityValidatorContribution()
-
-
Method Details
-
getEntityName
-
setEntityName
-
getRelationName
-
setRelationName
-
getErrorMessage
-
setErrorMessage
-