示例#1
0
  /**
   * @param context
   * @param db
   * @param saveInfoBean
   */
  public static void insertSaveInfo(Context context, SaveInfoBean saveInfoBean) {

    createSaveTable(context);
    SaveInfoDao.insertSaveInfo(db, saveInfoBean);
    if (db != null) {
      db.close();
    }
  }
示例#2
0
  // 查找存档表中指定id的数据
  public static SaveInfoBean querySaveInfoById(Context context, long id) {

    createSaveTable(context);
    SaveInfoBean ret = SaveInfoDao.querySaveInfoById(db, id);
    if (db != null) {
      db.close();
    }
    return ret;
  }
示例#3
0
  /**
   * @param context
   * @param db
   * @return
   */
  public static List<SaveInfoBean> querySaveInfo(Context context) {

    createSaveTable(context);
    List<SaveInfoBean> ret = SaveInfoDao.querySaveInfo(db);
    if (db != null) {
      db.close();
    }
    return ret;
  }
示例#4
0
  /**
   * @param context
   * @param db
   * @param saveInfoBean
   * @return 《0失败
   */
  public static int updateSaveInfo(Context context, SaveInfoBean saveInfoBean) {

    createSaveTable(context);
    int ret = SaveInfoDao.updateSaveInfo(db, saveInfoBean);
    if (db != null) {
      db.close();
    }
    return ret;
  }
示例#5
0
  /**
   * @param context
   * @param db
   * @param saveId
   * @return <0 失败
   */
  public static int deleteSaveInfo(Context context, int saveId) {

    createSaveTable(context);
    int ret = SaveInfoDao.deleteSaveInfo(db, saveId);
    if (db != null) {
      db.close();
    }
    return ret;
  }