public void buildEstablishment() { establishment.setIsAuth(establishment.getIsAuth()); if (establishment.getIsAuth() != null) if (establishment.getIsAuth().equals(Boolean.TRUE)) setIsAuthValue(String.valueOf(1)); else setIsAuthValue(String.valueOf(0)); }
@Override @Transactional public void validate() { if (establishment != null && establishment.getName() != null && !"".equals(establishment.getName())) { final boolean isNameAlreadyExist = establishmentService.checkUniqueHospitalName(establishment.getName()); if (isNameAlreadyExist) addFieldError("nameAlreadyExist", getMessage("hospital.name.alreadyExist")); } }