Package ch.tocco.nice2.model.entity.api
Interface ModelValidator
- All Known Implementing Classes:
DefaultModelValidator
public interface ModelValidator
Validates the model during reading. The validator cannot assume that the whole model is read yet.
The methods must be called in order, and none may be omitted. For the entities the validation
methods are NOT called 1-2-3 1-2-3 1-2-3, but 1-1-1 2-2-2 3-3-3.
1) validateEntityModel()
2) validateFieldModel()
3) validateRelationModel()
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateEntityModel
(EntityModel model) 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
-
Method Details
-
validateEntityModel
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.- Throws:
ValidationException
-
validateFieldModel
- Throws:
ValidationException
-
validateRelationModel
- Throws:
ValidationException
-