/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the Apache 2.0 License.
 * See the accompanying LICENSE file for terms.
 */
package com.yahoo.squidb.sample.modules;

import android.content.Context;
import android.net.Uri;

import com.yahoo.squidb.data.AbstractModel;
import com.yahoo.squidb.data.UriNotifier;
import com.yahoo.squidb.sample.HelloSquiDBApplication;
import com.yahoo.squidb.sample.TaskListActivity;
import com.yahoo.squidb.sample.database.TasksDatabase;
import com.yahoo.squidb.sample.models.Tag;
import com.yahoo.squidb.sample.models.Task;
import com.yahoo.squidb.sql.SqlTable;

import java.util.Set;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

@Module(injects = {TaskListActivity.class})
public class HelloSquiDBModule {

    private Context applicationContext;

    HelloSquiDBModule(HelloSquiDBApplication app) {
        this.applicationContext = app;
    }

    @Provides
    @ForApplicaton
    Context provideContext() {
        return applicationContext;
    }

    @Provides
    @Singleton // We want the database instance to be a singleton
    TasksDatabase provideTasksDatabase(@ForApplicaton Context context) {
        TasksDatabase database = new TasksDatabase(context);

        // Setting up a UriNotifier will sent ContentObserver notifications to Uris on table writes
        database.registerUriNotifier(new UriNotifier(Task.TABLE, Tag.TABLE) {
            @Override
            public void addUrisToNotify(Set<Uri> uris, SqlTable<?> table, String databaseName,
                    DBOperation operation, AbstractModel modelValues, long rowId) {
                uris.add(Task.CONTENT_URI);
            }
        });
        return database;
    }

}

@@ -274,16 +274,60 @@
 tModel;%0A
+import com.yahoo.squidb.data.SquidDatabase;%0A
 import c
@@ -1098,16 +1098,24 @@
 ingleton
+%0A       
  // We w
@@ -1418,19 +1418,27 @@
 register
-Uri
+DataChanged
 Notifier
@@ -1518,34 +1518,54 @@
    p
-ublic void addUrisToNotify
+rotected boolean accumulateNotificationObjects
 (Set
@@ -1600,25 +1600,28 @@
 e, S
-tring databaseNam
+quidDatabase databas
 e,%0A 
@@ -1719,16 +1719,23 @@
         
+return 
 uris.add

Fix compile error in the sample project