示例#1
0
 public void deleteItem(int itemid) {
   RedmineConnectionModel model = new RedmineConnectionModel(helperStore);
   try {
     model.delete(itemid);
   } catch (SQLException e) {
     e.printStackTrace();
   }
 }
示例#2
0
 public RedmineConnection getItem(int itemid) {
   RedmineConnectionModel model = new RedmineConnectionModel(helperStore);
   RedmineConnection item = new RedmineConnection();
   try {
     item = model.fetchById(itemid);
   } catch (SQLException e) {
     e.printStackTrace();
   }
   return item;
 }
示例#3
0
 public List<RedmineConnection> fetchAllData() {
   final RedmineConnectionModel model = new RedmineConnectionModel(helperStore);
   List<RedmineConnection> projects = new ArrayList<RedmineConnection>();
   try {
     projects = model.fetchAll();
   } catch (SQLException e) {
     Log.e("SelectDataTask", "doInBackground", e);
   } catch (Throwable e) {
     Log.e("SelectDataTask", "doInBackground", e);
   }
   return projects;
 }
示例#4
0
  public RedmineConnection updateItem(int itemid, RedmineConnection item) {
    RedmineConnectionModel model = new RedmineConnectionModel(helperStore);

    try {
      if (itemid == -1) {
        model.create(item);
      } else {
        item.setId(itemid);
        model.update(item);
      }
    } catch (SQLException e) {
      e.printStackTrace();
    }
    return item;
  }