@Test public void notifyContentChangeOnSave() { TestModel m = new TestModel(); m.title = "hej"; final boolean[] notified = new boolean[1]; Sprinkles.sInstance.mContext.getContentResolver(). registerContentObserver(Utils.getNotificationUri(TestModel.class), false, new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { notified[0] = true; } }); m.save(); assertTrue(notified[0]); }
final public boolean save() { Transaction t = new Transaction(); try { t.setSuccessful(save(t)); } finally { t.finish(); } return t.isSuccessful(); }
Model implements QueryResult { final public boolean save() { Transaction t = new Transaction(); try { t.setSuccessful(save(t)); } finally { t.finish(); } return t.isSuccessful(); } }
Model implements QueryResult { final public boolean save() { Transaction t = new Transaction(); try { t.setSuccessful(save(t)); } finally { t.finish(); } return t.isSuccessful(); }  }
Model implements QueryResult { final public boolean save() { Transaction t = new Transaction(); try { t.setSuccessful(save(t)); } finally { t.finish(); } return t.isSuccessful(); }  boolean isValid(); final boolean exists(); final boolean save(); final boolean save(Transaction t); final void saveAsync(); final void saveAsync(final OnSavedCallback callback); final void delete(); final void delete(Transaction t); final void deleteAsync(); final void deleteAsync(final OnDeletedCallback callback); }
Model implements QueryResult { final public boolean save() { Transaction t = new Transaction(); try { t.setSuccessful(save(t)); } finally { t.finish(); } return t.isSuccessful(); }  boolean isValid(); final boolean exists(); final boolean save(); final boolean save(Transaction t); final void saveAsync(); final void saveAsync(final OnSavedCallback callback); final void delete(); final void delete(Transaction t); final void deleteAsync(); final void deleteAsync(final OnDeletedCallback callback);  }