return new ModelAndView();
}
public Response validateAndSaveEntity(Entity entity, BaseService service) {
Response response = serverResponse();
try {
Validity vsEntity = service.validate(entity);
if (vsEntity.isValid()) {
service.insert(entity);
response.setResult(entity);
} else {
response.setError(key.vdnCode, vsEntity.errors());
}
} catch (Exception e) {
log.error(e.getMessage());
response.setError(key.iseCode, e.getMessage());
}
return response;
}