示例#1
0
  public SubsidenceTotalData queryOneByGuid(String guid) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return null;
    }

    String sql = "select * from SubsidenceTotalData where Guid = ?";

    return mDatabase.queryObject(sql, new String[] {guid}, SubsidenceTotalData.class);
  }
示例#2
0
  public SubsidenceTotalData queryOneById(int id) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return null;
    }

    String sql = "select * from SubsidenceTotalData where ID = ?";

    return mDatabase.queryObject(sql, new String[] {String.valueOf(id)}, SubsidenceTotalData.class);
  }
示例#3
0
  public boolean checkSectionTestData(String guid) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return false;
    }

    String sql = "select * from SubsidenceTotalData where ChainageId = ? limit 0,1";

    SubsidenceTotalData data =
        mDatabase.queryObject(sql, new String[] {String.valueOf(guid)}, SubsidenceTotalData.class);

    return data != null;
  }
示例#4
0
  // 查询已经存在的测量点信息
  public SubsidenceTotalData querySubsidenceTotalData(
      String sheetId, String chainageId, String pntType) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return null;
    }

    String sql =
        "select * from SubsidenceTotalData where SheetId = ? and ChainageId = ? and PntType = ? order by MEASNo desc";

    return mDatabase.queryObject(
        sql,
        new String[] {String.valueOf(sheetId), String.valueOf(chainageId), pntType},
        SubsidenceTotalData.class);
  }