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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateEntityModel
(EntityModel eModel) Impl note: it is mandatory that this method is called, and that it calls EntityModel.setBackendData() otherwise there are NPEs later on.void
validateFieldModel
(FieldModel model) void
Format for relation targets in the JDBC-backend:
-
Constructor Details
-
DefaultModelValidator
public DefaultModelValidator()
-
-
Method Details
-
validateEntityModel
Description copied from interface:ModelValidator
Impl 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:
validateEntityModel
in interfaceModelValidator
- Throws:
ValidationException
-
validateFieldModel
- Specified by:
validateFieldModel
in 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:
validateRelationModel
in interfaceModelValidator
- Parameters:
model
- The relation model (non-reverse-view) to be validated.- Throws:
ValidationException
- If the validation fails.
-