use of mom.trd.opentheso.core.alignment.AlignementPreferences in project opentheso by miledrousset.
the class GpsBeans method getPreferenceAlignement.
/**
* Recuperation des preferences pour alignement
*
* @param idTheso
* @param id_user
*/
public void getPreferenceAlignement(String idTheso, int id_user) {
alignementPreferencesAlignement = new AlignementPreferences();
AlignmentHelper alignmentHelper = new AlignmentHelper();
alignementPreferencesAlignement = alignmentHelper.getListPreferencesAlignement(connect.getPoolConnexion(), idTheso, id_user, id_concept_depart, nodePreference.getId_alignement_source());
}
use of mom.trd.opentheso.core.alignment.AlignementPreferences in project opentheso by miledrousset.
the class AlignmentHelper method getListPreferencesAlignement.
public AlignementPreferences getListPreferencesAlignement(HikariDataSource ds, String id_theso, int id_user, String id_concept_depart, int id_alignement_source) {
AlignementPreferences alignementPreferences = new AlignementPreferences();
Statement stmt;
Connection conn;
ResultSet rs;
try {
// Get connection from pool
conn = ds.getConnection();
try {
stmt = conn.createStatement();
try {
stmt = conn.createStatement();
String query = "select * from alignement_preferences where id_thesaurus = '" + id_theso + "' and id_user = " + id_user + " and id_concept_depart ='" + id_concept_depart + "'" + " and id_alignement_source=" + id_alignement_source;
rs = stmt.executeQuery(query);
if (rs.next()) {
alignementPreferences.setId_concetp_depart(rs.getString("id_concept_depart"));
alignementPreferences.setId_concept_tratees(rs.getString("id_concept_tratees"));
}
} finally {
stmt.close();
}
} finally {
conn.close();
}
} catch (SQLException sqle) {
// Log exception
log.error("Error while get alignement's preferences", sqle);
}
return alignementPreferences;
}
use of mom.trd.opentheso.core.alignment.AlignementPreferences in project opentheso by miledrousset.
the class AlignementParLotBean method getPreferenceAlignement.
// private ArrayList<String> remiseSuite() {
// }
/**
* Recuperation des preferences pour alignement
*
* @param idTheso
* @param id_user
*/
public void getPreferenceAlignement(String idTheso, int id_user) {
alignementPreferences = new AlignementPreferences();
AlignmentHelper alignmentHelper = new AlignmentHelper();
alignementPreferences = alignmentHelper.getListPreferencesAlignement(connect.getPoolConnexion(), idTheso, id_user, id_concept_depart, selectedTerme.alignementSource.getId());
}
Aggregations