Пример #1
0
  /**
   * 判断本地是否有好友列表信息
   *
   * @return true 有, false 没有 作者:fighter <br>
   *     创建时间:2013-5-31<br>
   *     修改时间:<br>
   */
  public synchronized boolean isLocalFriendInfo() {
    Log.d(TAG, "isLocalFriendInfo()");
    if (localState) {
      return true;
    }
    friendListVo = finalDb.findById(userInfoVo.getUid(), FriendListVo.class);
    if (friendListVo == null) {
      localState = false;
    } else {
      localState = true;
    }

    return localState;
  }
Пример #2
0
  /**
   * 获取没有缩略图的地址
   *
   * @param sourcePath
   * @return
   */
  private String getCurrentThumPath(String sourcePath) {
    String thumbnailPath = null;
    MyAlbumThumBean bean = db.findById(sourcePath, MyAlbumThumBean.class);
    if (bean != null) {
      // 已经在数据库中有的 就读取
      // System.out.println("-- 读取 -- ");
      thumbnailPath = bean.getThumPath() + "/" + bean.getPhotoName() + ".png";
    } else {
      // 新建 存数据库
      // System.out.println("-- 新建 -- ");
      thumbnailPath = createImgBitmapThum(sourcePath);
    }

    return thumbnailPath;
  }
Пример #3
0
 public static ErrorHelp findErrorHelp(Context context, int id) {
   FinalDb db = FinalDb.create(context, ApplicationConfig.DATABASE_NAME, DEBUG);
   return db.findById(id, ErrorHelp.class);
 }