Remove DatabaseDao.persist

pull/618/head
Alex Baker 7 years ago
parent 8bc9cadf72
commit 0343036fbf

@ -51,7 +51,7 @@ public class AlarmJobServiceTest extends InjectingTestCase {
public void scheduleAlarm() {
Task task = newTask();
taskDao.persist(task);
taskDao.save(task);
DateTime alarmTime = new DateTime(2017, 9, 24, 19, 57);
Alarm alarm = new Alarm(task.getId(), alarmTime.getMillis());
@ -69,7 +69,7 @@ public class AlarmJobServiceTest extends InjectingTestCase {
Task task = newTask(with(REMINDER_LAST, alarmTime.endOfMinute()));
taskDao.persist(task);
taskDao.save(task);
alarmDao.insert(new Alarm(task.getId(), alarmTime.getMillis()));

@ -109,27 +109,6 @@ public class DatabaseDao {
where.toString());
}
/**
* Save the given object to the database. Creates a new object if
* model id property has not been set
*
* @return true on success.
*/
public boolean persist(Task item) {
if (item.getId() == AbstractModel.NO_ID) {
return createNew(item);
} else {
ContentValues values = item.getSetValues();
if (values.size() == 0) // nothing changed
{
return true;
}
return saveExisting(item);
}
}
private interface DatabaseChangeOp {
boolean makeChange();
}

@ -125,10 +125,6 @@ public abstract class TaskDao {
return dao.toList(query);
}
public void persist(Task task) {
dao.persist(task);
}
// --- SQL clause generators
/**

Loading…
Cancel
Save