// Path: app/src/main/java/com/vsahin/moneycim/Model/Repository/SpendingRepository.java
// @Singleton
// public class SpendingRepository {
//     private final AppDatabase appDatabase;
//     @Inject
//     public SpendingRepository(AppDatabase appDatabase) {
//         this.appDatabase = appDatabase;
//     }
// 
//     public LiveData<List<Spending>> getSpendings(){
//         return appDatabase.spendingDao().getSpendingsWithGroups();
//     }
// 
//     public LiveData<Double> getTotalSpendingQuantity(){
//         return appDatabase.spendingDao().getTotalSpendingQuantity();
//     }
// 
//     public void addSpending(RawSpending s){
//         appDatabase.spendingDao().addSpending(s);
//     }
// 
//     public LiveData<List<SpendingGroup>> getSpendingGroups(){
//         return appDatabase.spendingGroupDao().getAllSpendingGroups();
//     }
// 
//     public void deleteSpending(int id){
//         appDatabase.spendingDao().deleteSpending(id);
//     }
// }


import com.vsahin.moneycim.Model.Repository.SpendingRepository;
import javax.inject.Inject;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;

package com.vsahin.moneycim.View.TotalSpendingQuantity;




/**
 * Created by Volkan Şahin on 21.08.2017.
 */

public class TotalSpendingQuantityViewModel extends ViewModel {
    SpendingRepository spendingRepository;

    final LiveData<Double> totalSpendingQuantity;

    @Inject

// Path: app/src/main/java/com/vsahin/moneycim/Model/Repository/SpendingRepository.java
// @Singleton
// public class SpendingRepository {
//     private final AppDatabase appDatabase;
//     @Inject
//     public SpendingRepository(AppDatabase appDatabase) {
//         this.appDatabase = appDatabase;
//     }
// 
//     public LiveData<List<Spending>> getSpendings(){
//         return appDatabase.spendingDao().getSpendingsWithGroups();
//     }
// 
//     public LiveData<Double> getTotalSpendingQuantity(){
//         return appDatabase.spendingDao().getTotalSpendingQuantity();
//     }
// 
//     public void addSpending(RawSpending s){
//         appDatabase.spendingDao().addSpending(s);
//     }
// 
//     public LiveData<List<SpendingGroup>> getSpendingGroups(){
//         return appDatabase.spendingGroupDao().getAllSpendingGroups();
//     }
// 
//     public void deleteSpending(int id){
//         appDatabase.spendingDao().deleteSpending(id);
//     }
// }


// Path: app/src/main/java/com/vsahin/moneycim/View/TotalSpendingQuantity/TotalSpendingQuantityViewModel.java
import com.vsahin.moneycim.Model.Repository.SpendingRepository;
import javax.inject.Inject;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;

package com.vsahin.moneycim.View.TotalSpendingQuantity;




/**
 * Created by Volkan Şahin on 21.08.2017.
 */

public class TotalSpendingQuantityViewModel extends ViewModel {
    SpendingRepository spendingRepository;

    final LiveData<Double> totalSpendingQuantity;

    @Inject

    public TotalSpendingQuantityViewModel(SpendingRepository spendingRepository) {
