Methods used for validating GORM instances.
- the entity/domain classModifiers | Name | Description |
---|---|---|
static java.lang.String |
ARGUMENT_DEEP_VALIDATE |
|
protected org.springframework.context.ApplicationEventPublisher |
eventPublisher |
|
protected boolean |
hasDatastore |
|
protected MappingContext |
mappingContext |
Fields inherited from class | Fields |
---|---|
class AbstractGormApi |
persistentClass, persistentEntity |
class AbstractDatastoreApi |
datastore |
Type | Name and description |
---|---|
BeforeValidateHelper |
beforeValidateHelper |
Constructor and description |
---|
GormValidationApi
(java.lang.Class<D> persistentClass, Datastore datastore) |
GormValidationApi
(java.lang.Class<D> persistentClass, MappingContext mappingContext, org.springframework.context.ApplicationEventPublisher eventPublisher) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clearErrors(D instance) Clears any errors that exist on an instance |
|
protected ValidationEvent |
createValidationEvent(java.lang.Object target) |
|
org.springframework.validation.Errors |
getErrors(D instance) Obtains the errors for an instance |
|
org.springframework.validation.Validator |
getValidator() |
|
boolean |
hasErrors(D instance) Tests whether an instance has any errors |
|
protected org.springframework.validation.Errors |
resetErrors(D instance) |
|
void |
setErrors(D instance, org.springframework.validation.Errors errors) Sets the errors for an instance |
|
void |
setValidator(org.springframework.validation.Validator validator) |
|
boolean |
validate(D instance, java.util.Map arguments) Validates an instance for the given arguments |
|
boolean |
validate(D instance, java.util.List fields) Validates an instance |
|
boolean |
validate(D instance) Validates an instance |
Methods inherited from class | Name |
---|---|
class AbstractGormApi |
getExtendedMethods, getMethods, initializeMethods |
class AbstractDatastoreApi |
execute, execute, getDatastore |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Clears any errors that exist on an instance
instance
- The instanceObtains the errors for an instance
instance
- The instance to obtain errors forTests whether an instance has any errors
instance
- The instanceSets the errors for an instance
instance
- The instanceerrors
- The errorsValidates an instance for the given arguments
instance
- The instance to validatearguments
- The arguments to useValidates an instance
instance
- The instance to validatefields
- The list of fields to validateValidates an instance
instance
- The instance to validate