public interface IEntityValidationService extends IService<EntityValidation>, IEntityValidationCrud
Modifier and Type | Method and Description |
---|---|
void |
deleteEntityValidation(java.lang.String validatedEntityClass,
int validatedEntityId)
Delete validation result for the specified entity, presumably because it has become
obsolete.
|
java.util.List<EntityValidation> |
getEntitiesViolatingConstraint(java.lang.String validatorClass)
Get all entities that violated a particular constraint.
|
java.util.List<EntityValidation> |
getEntityValidations(java.lang.String validatedEntityClass)
Get all validation results for all validated entities of the specified type.
|
EntityValidation |
getValidationResult(java.lang.String validatedEntityClass,
int validatedEntityId)
Get the validation result for a particular entity.
|
java.util.List<EntityValidation> |
getValidationResults()
Get all validation results for all validated entities.
|
java.util.List<EntityValidation> |
getValidationResults(Severity severity)
Get all validation results.
|
java.util.List<EntityValidation> |
getValidationResults(java.lang.String validatedEntityClass,
Severity severity)
Get all validation results for all entities of the specified type.
|
<T extends ICdmBase> |
saveEntityValidation(T validatedEntity,
java.util.Set<javax.validation.ConstraintViolation<T>> errors,
CRUDEventType crudEventType,
java.lang.Class<?>[] validationGroups)
Save the result of an entity validation to the error tables.
|
clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
<T extends ICdmBase> void saveEntityValidation(T validatedEntity, java.util.Set<javax.validation.ConstraintViolation<T>> errors, CRUDEventType crudEventType, java.lang.Class<?>[] validationGroups)
saveEntityValidation
in interface IEntityValidationCrud
validatedEntity
- The validated entityerrors
- All constraints violated by the specified entitycrudEventType
- The CRUD operation triggering the validationvoid deleteEntityValidation(java.lang.String validatedEntityClass, int validatedEntityId)
deleteEntityValidation
in interface IEntityValidationCrud
validatedEntityClass
- The fully qualified class name of the entity's class.validatedEntityId
- The id of the entityEntityValidation getValidationResult(java.lang.String validatedEntityClass, int validatedEntityId)
validatedEntityClass
- The fully qualified class name of the entity's class.validatedEntityId
- The id of the entityEntityValidation
or null if the entity has not been
validated yetjava.util.List<EntityValidation> getValidationResults()
EntityValidation
sjava.util.List<EntityValidation> getEntityValidations(java.lang.String validatedEntityClass)
validatedEntityClass
- The fully qualified class name of the entity classEntityValidation
sjava.util.List<EntityValidation> getEntitiesViolatingConstraint(java.lang.String validatorClass)
validatorClass
argument is a String
(like all the ***Class
arguments). This is because it is stored as such in the database, and also because
the Class
object itself may not be on the caller's classpath - e.g. when
called from the TaxEditor.validatorClass
- The fully qualified class name of the ConstraintValidator
.EntityValidation
sjava.util.List<EntityValidation> getValidationResults(java.lang.String validatedEntityClass, Severity severity)
validatedEntityClass
- The fully qualified class name of the entity class.severity
- The severity of the EntityConstraintViolation
s associated with
the EntityValidation
EntityValidation
sjava.util.List<EntityValidation> getValidationResults(Severity severity)
severity
- The severity of the EntityConstraintViolation
s associated with
the EntityValidation
EntityValidation
sCopyright © 2007-2020 EDIT. All Rights Reserved.