Package ch.tocco.nice2.model.entity.api
Class DefaultModelValidator
java.lang.Object
ch.tocco.nice2.model.entity.api.DefaultModelValidator
- All Implemented Interfaces:
ModelValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateEntityModel(EntityModel eModel) Impl note: it is mandatory that this method is called, and that it calls EntityModel.setBackendData() otherwise there are NPEs later on.voidvalidateFieldModel(FieldModel model) voidFormat for relation targets in the JDBC-backend:
-
Constructor Details
-
DefaultModelValidator
public DefaultModelValidator()
-
-
Method Details
-
validateEntityModel
Description copied from interface:ModelValidatorImpl note: it is mandatory that this method is called, and that it calls EntityModel.setBackendData() otherwise there are NPEs later on. Andrej believes that this should be done elsewhere, the method name suggests that it may be omitted completely under certain conditions which is not true.- Specified by:
validateEntityModelin interfaceModelValidator- Throws:
ValidationException
-
validateFieldModel
- Specified by:
validateFieldModelin interfaceModelValidator- Throws:
ValidationException
-
validateRelationModel
Format for relation targets in the JDBC-backend:- 1:n
fk1,fk2(of the n-side)- n:m
link_table:fk1,fk2:fk3,fk4
- Specified by:
validateRelationModelin interfaceModelValidator- Parameters:
model- The relation model (non-reverse-view) to be validated.- Throws:
ValidationException- If the validation fails.
-