// Path: app/src/main/java/dynoapps/exchange_rates/AppDatabase.java
// @Database(entities = {Alarm.class}, version = 1, exportSchema = false)
// public abstract class AppDatabase extends RoomDatabase {
//     /**
//      * The only instance
//      */
//     private static AppDatabase sInstance;
// 
//     /**
//      * Gets the singleton instance of SampleDatabase.
//      *
//      * @param context The context.
//      * @return The singleton instance of SampleDatabase.
//      */
//     public static synchronized AppDatabase getInstance(Context context) {
//         if (sInstance == null) {
//             sInstance = Room
//                     .databaseBuilder(context.getApplicationContext(), AppDatabase.class, "alarms")
//                     .build();
//         }
//         return sInstance;
//     }
// 
//     /**
//      * @return The DAO for the Alarm table.
//      */
//     public abstract AlarmDao alarm();
// }


import android.annotation.SuppressLint;
import android.content.Context;
import androidx.annotation.NonNull;
import dynoapps.exchange_rates.AppDatabase;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
package dynoapps.exchange_rates.alarm;



/**
 * Created by erdemmac on 19/07/2017.
 */

public class LocalAlarmsDataSource implements AlarmsDataSource {

    private final AlarmDao alarmDao;

    public LocalAlarmsDataSource(@NonNull Context context) {
// Path: app/src/main/java/dynoapps/exchange_rates/AppDatabase.java
// @Database(entities = {Alarm.class}, version = 1, exportSchema = false)
// public abstract class AppDatabase extends RoomDatabase {
//     /**
//      * The only instance
//      */
//     private static AppDatabase sInstance;
// 
//     /**
//      * Gets the singleton instance of SampleDatabase.
//      *
//      * @param context The context.
//      * @return The singleton instance of SampleDatabase.
//      */
//     public static synchronized AppDatabase getInstance(Context context) {
//         if (sInstance == null) {
//             sInstance = Room
//                     .databaseBuilder(context.getApplicationContext(), AppDatabase.class, "alarms")
//                     .build();
//         }
//         return sInstance;
//     }
// 
//     /**
//      * @return The DAO for the Alarm table.
//      */
//     public abstract AlarmDao alarm();
// }


// Path: app/src/main/java/dynoapps/exchange_rates/alarm/LocalAlarmsDataSource.java
import android.annotation.SuppressLint;
import android.content.Context;
import androidx.annotation.NonNull;
import dynoapps.exchange_rates.AppDatabase;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

package dynoapps.exchange_rates.alarm;



/**
 * Created by erdemmac on 19/07/2017.
 */

public class LocalAlarmsDataSource implements AlarmsDataSource {

    private final AlarmDao alarmDao;

    public LocalAlarmsDataSource(@NonNull Context context) {
        alarmDao = AppDatabase.getInstance(context.getApplicationContext()).alarm();