public Long saveit() { fixUpTable(); return save(); }
public Long saveit() { fixUpTable(); return save(); }
public Long saveit() { fixUpTable(); return save(); }
public static List<BloodTest> latest(int number) { try { return new Select() .from(BloodTest.class) .orderBy("timestamp desc") .limit(number) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return new ArrayList<>(); } }
public static BloodTest byid(long id) { try { return new Select() .from(BloodTest.class) .where("_ID = ?", id) .executeSingle(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static BloodTest byUUID(String uuid) { if (uuid == null) return null; try { return new Select() .from(BloodTest.class) .where("uuid = ?", uuid) .executeSingle(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static BloodTest byUUID(String uuid) { if (uuid == null) return null; try { return new Select() .from(BloodTest.class) .where("uuid = ?", uuid) .executeSingle(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static BloodTest byid(long id) { try { return new Select() .from(BloodTest.class) .where("_ID = ?", id) .executeSingle(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } } /*//KS
public static BloodTest byUUID(String uuid) { if (uuid == null) return null; try { return new Select() .from(BloodTest.class) .where("uuid = ?", uuid) .executeSingle(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static BloodTest byid(long id) { try { return new Select() .from(BloodTest.class) .where("_ID = ?", id) .executeSingle(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> last(int num) { try { return new Select() .from(BloodTest.class) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> latestForGraph(int number, long startTime, long endTime) { try { return new Select() .from(BloodTest.class) .where("state & ? != 0", BloodTest.STATE_VALID) .where("timestamp >= " + Math.max(startTime, 0)) .where("timestamp <= " + endTime) .orderBy("timestamp asc") // warn asc! .limit(number) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return new ArrayList<>(); } }
public static List<BloodTest> last(int num) { try { return new Select() .from(BloodTest.class) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> last(int num) { try { return new Select() .from(BloodTest.class) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> lastMatching(int num, String match) { try { return new Select() .from(BloodTest.class) .where("source like ?", match) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> lastValid(int num) { try { return new Select() .from(BloodTest.class) .where("state & ? != 0", BloodTest.STATE_VALID) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> lastValid(int num) { try { return new Select() .from(BloodTest.class) .where("state & ? != 0", BloodTest.STATE_VALID) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> lastMatching(int num, String match) { try { return new Select() .from(BloodTest.class) .where("source like ?", match) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> lastMatching(int num, String match) { try { return new Select() .from(BloodTest.class) .where("source like ?", match) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }
public static List<BloodTest> lastValid(int num) { try { return new Select() .from(BloodTest.class) .where("state & ? != 0", BloodTest.STATE_VALID) .orderBy("timestamp desc") .limit(num) .execute(); } catch (android.database.sqlite.SQLiteException e) { fixUpTable(); return null; } }