}
@Override
protected String valid() {
JDialogComment formToLoad = (JDialogComment) this.editForm;
Comment comment = (Comment) this.curretnEntity;
if ((formToLoad.getjEdtName().getText() == null) || (formToLoad.getjEdtName().getText().isEmpty())) {
return "Debe ingresar el nombre del comentario";
}
try {
if (this.facadeDB.getCommentBroker().existComment(formToLoad.getjEdtName().getText(), comment.getId())) {
return "Ya existe un comentario con el nombre ingresado";
}
} catch (ExceptionDAO ex) {
this.facadeDB.refreshSession();
return ex.getMessage();