validator().validate(model);
validator().onErrorSendBadRequest();
}
protected void checkId(final IModel model) {
validator().checking(new Validations() {
{
if (that(model, notNullValue(), "model", "model.notNull")) {
that(model.getId(), notNullValue(), "model.id", "model.id.notNull");
that(model.getId(), greaterThan(0L), "model.id", "model.id.notBeZero");
}