use of de.geeksfactory.opacclient.reminder.Alarm in project opacclient by opacapp.
the class AccountDataSource method getAlarmByDeadline.
public Alarm getAlarmByDeadline(LocalDate deadline) {
String[] selA = { deadline.toString() };
Cursor cursor = database.query(AccountDatabase.TABLENAME_ALARMS, AccountDatabase.COLUMNS_ALARMS, "deadline = ?", selA, null, null, null);
Alarm item = null;
cursor.moveToFirst();
if (!cursor.isAfterLast()) {
item = cursorToAlarm(cursor);
cursor.moveToNext();
}
// Make sure to close the cursor
cursor.close();
return item;
}
Aggregations