Exemplo n.º 1
0
 public RedmineRole fetchById(int connection, int statusId) throws SQLException {
   PreparedQuery<RedmineRole> query =
       dao.queryBuilder()
           .where()
           .eq(RedmineRole.CONNECTION, connection)
           .and()
           .eq(RedmineRole.ROLE_ID, statusId)
           .prepare();
   Log.d(TAG, query.getStatement());
   RedmineRole item = dao.queryForFirst(query);
   if (item == null) item = new RedmineRole();
   return item;
 }
 public RedmineAttachment fetchById(int connection, int journalId) throws SQLException {
   PreparedQuery<RedmineAttachment> query =
       dao.queryBuilder()
           .where()
           .eq(RedmineAttachment.CONNECTION, connection)
           .and()
           .eq(RedmineAttachment.ATTACHMENT_ID, journalId)
           .prepare();
   Log.d(TAG, query.getStatement());
   RedmineAttachment item = dao.queryForFirst(query);
   if (item == null) item = new RedmineAttachment();
   return item;
 }
Exemplo n.º 3
0
 public RedmineWiki fetchById(int connection, long project_id, String title) throws SQLException {
   PreparedQuery<RedmineWiki> query =
       dao.queryBuilder()
           .where()
           .eq(RedmineWiki.CONNECTION, connection)
           .and()
           .eq(RedmineWiki.PROJECT_ID, project_id)
           .and()
           .eq(RedmineWiki.TITLE, title)
           .prepare();
   Log.d(TAG, query.getStatement());
   RedmineWiki item = dao.queryForFirst(query);
   if (item == null) item = new RedmineWiki();
   return item;
 }