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); }
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); }
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; }
// 查询已经存在的测量点信息 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); }