public class TypeConstraintValidator extends Object implements ValidateInterceptor<AbstractConstraintModel>
TypeConstraintModel. The following settings are validated:
AbstractConstraintModel.ANNOTATION must be set and must be an annotationAbstractConstraintModel.TARGET must not be nullAbstractConstraintModel.TYPE is null AbstractConstraintModel.TARGET must not be
assignalbe from ItemModel (only POJOs are allowed)AbstractConstraintModel.TYPE and AbstractConstraintModel.TARGET are not null both must be
related together| Constructor and Description |
|---|
TypeConstraintValidator() |
| Modifier and Type | Method and Description |
|---|---|
void |
onValidate(AbstractConstraintModel constraint,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
void |
setModelService(ModelService modelService) |
public void onValidate(AbstractConstraintModel constraint, InterceptorContext ctx) throws InterceptorException
ValidateInterceptormodelService.saveAll() method. Validates the values of the given model.onValidate in interface ValidateInterceptor<AbstractConstraintModel>constraint - the model which values has to be validatedctx - the InterceptorContextInterceptorException - if any values of the model are not valid.public void setModelService(ModelService modelService)
Copyright © 2017 SAP SE. All Rights Reserved.