// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/util/Constants.java
// public static final String SORT_BY_EXPIRY_STRING = "expiry";


import android.support.annotation.NonNull;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.List;
import static com.michaelvescovo.android.itemreaper.util.Constants.SORT_BY_EXPIRY_STRING;
package com.michaelvescovo.android.itemreaper.data;





/**
 * @author Michael Vescovo
 */

class RemoteDataSource implements DataSource {

    private DatabaseReference mDatabase;
    private Query mCurrentItemsQuery;
    private ValueEventListener mItemsListener;
    private String mCurrentSort;

    RemoteDataSource() {
        FirebaseDatabase.getInstance().setPersistenceEnabled(true);
        mDatabase = FirebaseDatabase.getInstance().getReference();
// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/util/Constants.java
// public static final String SORT_BY_EXPIRY_STRING = "expiry";


// Path: app/src/prod/java/com.michaelvescovo.android.itemreaper/data/RemoteDataSource.java
import android.support.annotation.NonNull;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.List;
import static com.michaelvescovo.android.itemreaper.util.Constants.SORT_BY_EXPIRY_STRING;

package com.michaelvescovo.android.itemreaper.data;





/**
 * @author Michael Vescovo
 */

class RemoteDataSource implements DataSource {

    private DatabaseReference mDatabase;
    private Query mCurrentItemsQuery;
    private ValueEventListener mItemsListener;
    private String mCurrentSort;

    RemoteDataSource() {
        FirebaseDatabase.getInstance().setPersistenceEnabled(true);
        mDatabase = FirebaseDatabase.getInstance().getReference();
        mCurrentSort = SORT_BY_EXPIRY_STRING;