use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.
the class HistoriqueBean method load.
public void load(String idThesaurus, String idConcept, String idTerm, String lang) {
if (typeHisto == 0 && dateHisto != null) {
conceptHisto = new ConceptHelper().getConceptHisoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, dateHisto);
groupHisto = new GroupHelper().getGroupHistoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, dateHisto);
noteHisto = new NoteHelper().getNoteHistoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, idTerm, lang, dateHisto);
relationHisto = new RelationsHelper().getRelationHistoriqueFromDate(connect.getPoolConnexion(), idConcept, idThesaurus, dateHisto, lang);
nonPrefTermHisto = new TermHelper().getNonPreferredTermsHistoriqueFromDate(connect.getPoolConnexion(), idTerm, idThesaurus, lang, dateHisto);
termHisto = new TermHelper().getTermsHistoriqueFromDate(connect.getPoolConnexion(), idTerm, idThesaurus, lang, dateHisto);
} else if (typeHisto == 1) {
conceptHisto = new ConceptHelper().getConceptHisoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus);
groupHisto = new GroupHelper().getGroupHistoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus);
noteHisto = new NoteHelper().getNoteHistoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus, idTerm, lang);
relationHisto = new RelationsHelper().getRelationHistoriqueAll(connect.getPoolConnexion(), idConcept, idThesaurus, lang);
nonPrefTermHisto = new TermHelper().getNonPreferredTermsHistoriqueAll(connect.getPoolConnexion(), idTerm, idThesaurus, lang);
termHisto = new TermHelper().getTermsHistoriqueAll(connect.getPoolConnexion(), idTerm, idThesaurus, lang);
}
}
use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.
the class SelectedTerme method editNote.
/**
* Cette fontion permet de modifié l'information du note
*/
public void editNote() {
int idUser = user.getUser().getId();
if (note.isEmpty()) {
deleteThisNoteOfConcept("note");
return;
}
if (new NoteHelper().isNoteExistOfConcept(connect.getPoolConnexion(), idC, idTheso, idlangue, "note")) {
new NoteHelper().updateConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, note, "note", idUser);
} else {
new NoteHelper().addConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, note, "note", idUser);
}
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}
use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.
the class SelectedTerme method editDef.
/**
* Crée ou modifie la définition du terme courant
*/
public void editDef() {
int idUser = user.getUser().getId();
if (definition.isEmpty()) {
deleteThisNoteOfConcept("note");
return;
}
if (new NoteHelper().isNoteExistOfTerm(connect.getPoolConnexion(), idT, idTheso, idlangue, "definition")) {
new NoteHelper().updateTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, definition, "definition", idUser);
} else {
new NoteHelper().addTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, definition, "definition", idUser);
}
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info3")));
}
use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.
the class SelectedTerme method editNoteApp.
public void editNoteApp() {
int idUser = user.getUser().getId();
if (noteApplication.isEmpty()) {
deleteThisNoteOfConcept("note");
return;
}
if (new NoteHelper().isNoteExistOfConcept(connect.getPoolConnexion(), idC, idTheso, idlangue, "scopeNote")) {
new NoteHelper().updateConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, noteApplication, "scopeNote", idUser);
} else {
new NoteHelper().addConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, noteApplication, "scopeNote", idUser);
}
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}
use of mom.trd.opentheso.bdd.helper.NoteHelper in project opentheso by miledrousset.
the class SelectedTerme method deleteThisNoteOfTerm.
/**
* Cette fonction permet de supprimer une note suivant son type
*
* @param noteTypeCode
*/
public void deleteThisNoteOfTerm(String noteTypeCode) {
int idUser = user.getUser().getId();
new NoteHelper().deleteThisNoteOfTerm(connect.getPoolConnexion(), idT, idTheso, idlangue, noteTypeCode);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info13")));
}
Aggregations