|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Entity.Validator
Responsible for providing validation for entities.
Field Summary |
---|
Fields inherited from interface org.jminor.common.model.valuemap.ValueMapValidator |
---|
INSERT, UNKNOWN, UPDATE |
Method Summary | |
---|---|
String |
getEntityID()
|
void |
performNullValidation(Entity entity,
Property property,
int action)
Performs a null validation on the given property |
void |
performRangeValidation(Entity entity,
Property property)
Performs a range validation on the given property |
void |
validate(Collection<Entity> entities,
int action)
Validates the given Entity objects. |
void |
validate(Entity entity,
int action)
Validates the values in the given entity |
void |
validate(Entity entity,
String propertyID,
int action)
Validates the given property in the given entity |
Methods inherited from interface org.jminor.common.model.valuemap.ValueMapValidator |
---|
isNullable, isValid, validate, validate |
Method Detail |
---|
String getEntityID()
void validate(Entity entity, int action) throws ValidationException
entity
- the entity to validateaction
- the action requiring validation
ValidationException
- in case the validation failsProperty.setNullable(boolean)
,
Configuration.PERFORM_NULL_VALIDATION
void validate(Entity entity, String propertyID, int action) throws ValidationException
entity
- the entity to validatepropertyID
- the ID of the property to validateaction
- the action requiring validation
ValidationException
- in case the validation failsProperty.setNullable(boolean)
,
Configuration.PERFORM_NULL_VALIDATION
void validate(Collection<Entity> entities, int action) throws ValidationException
entities
- the entities to validateaction
- describes the action requiring validation,
EntityEditor.INSERT, EntityEditor.UPDATE or EntityEditor.UNKNOWN
ValidationException
- in case the validation failsvoid performNullValidation(Entity entity, Property property, int action) throws NullValidationException
entity
- the entityproperty
- the propertyaction
- the action requiring validation
NullValidationException
- in case the proerty value is null and the property is not nullableProperty.isNullable()
void performRangeValidation(Entity entity, Property property) throws RangeValidationException
entity
- the entityproperty
- the property
RangeValidationException
- in case the value of the given property is outside the legal rangeProperty.setMax(double)
,
Property.setMin(double)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |