Пример #1
0
 private List<Column> putValues(AlarmModel entry) {
   List<Column> newList = new ArrayList<>();
   newList.add(withValue(KEY, entry.getId()));
   newList.add(withValue(ALARM_ID, entry.getAlarmID()));
   newList.add(withValue(TYPE, entry.getType()));
   newList.add(withValue(TRIGGER, entry.getTrigger()));
   newList.add(withValue(LEVEL, entry.getLevel()));
   newList.add(withValue(EXTRA_PARAMETER, entry.getExtraParameter()));
   newList.add(withValue(EXTRA_VALUE, entry.getExtraValue()));
   newList.add(withValue(ALARM_TIME, entry.getAlarmTime()));
   newList.add(withValue(ALARM_DATE, entry.getAlarmDate()));
   return newList;
 }
Пример #2
0
 // Deleting single entry
 public void delete(AlarmModel entry) {
   alarmTable.delete(KEY, entry.getId());
   database.closeDatabase();
 }