Search in sources :

Example 6 with ElementEvaluation

use of ca.etsmtl.applets.etsmobile.model.ElementEvaluation in project ETSMobile-Android2 by ApplETS.

the class NoteManager method getElementsEvaluation.

public List<ElementEvaluation> getElementsEvaluation(ListeDesElementsEvaluation listeDesElementsEvaluation) {
    DatabaseHelper dbHelper = new DatabaseHelper(context);
    List<ElementEvaluation> elementEvaluationList = null;
    try {
        Dao<ElementEvaluation, String> elementsEvaluationDao = dbHelper.getDao(ElementEvaluation.class);
        QueryBuilder<ElementEvaluation, String> builder = elementsEvaluationDao.queryBuilder();
        Where where = builder.where();
        where.eq("listeDesElementsEvaluation_id", listeDesElementsEvaluation);
        where.and();
        elementEvaluationList = builder.query();
    } catch (SQLException e) {
        Log.e("SQL Exception", e.getMessage());
    }
    return elementEvaluationList;
}
Also used : DatabaseHelper(ca.etsmtl.applets.etsmobile.db.DatabaseHelper) SQLException(java.sql.SQLException) Where(com.j256.ormlite.stmt.Where) ElementEvaluation(ca.etsmtl.applets.etsmobile.model.ElementEvaluation)

Aggregations

ElementEvaluation (ca.etsmtl.applets.etsmobile.model.ElementEvaluation)6 DatabaseHelper (ca.etsmtl.applets.etsmobile.db.DatabaseHelper)4 SQLException (java.sql.SQLException)4 Where (com.j256.ormlite.stmt.Where)3 ListeDesElementsEvaluation (ca.etsmtl.applets.etsmobile.model.ListeDesElementsEvaluation)2 Activity (android.app.Activity)1 MyCourseDetailAdapter (ca.etsmtl.applets.etsmobile.ui.adapter.MyCourseDetailAdapter)1 ParseException (java.text.ParseException)1 HashMap (java.util.HashMap)1