// Path: RxDbFlow-Rx2/src/main/java/au/com/roadhouse/rxdbflow/rx2/RxDbFlow.java
// public class RxDbFlow {
// 
//     public static <TModel> RxModelAdapter<TModel> getModelAdapter(Class<TModel> modelClass) {
//         return new RxModelAdapter<>(FlowManager.getModelAdapter(modelClass));
//     }
// 
// }


import android.support.annotation.Nullable;
import com.raizlabs.android.dbflow.structure.BaseModel;
import com.raizlabs.android.dbflow.structure.InvalidDBConfiguration;
import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper;
import au.com.roadhouse.rxdbflow.rx2.RxDbFlow;
import io.reactivex.Single;
     * @return An Single
     */
    public Single<M> updateAsSingle(@Nullable final DatabaseWrapper databaseWrapper){
        return getRxModelAdapter().updateAsSingle(this, databaseWrapper);
    }

    /**
     * Returns an Single which will refresh the model's data based on the primary key when subscribed.
     * @return An Single
     */
    public Single<M> loadAsSingle(){
        return getRxModelAdapter().loadAsSingle(this);
    }

    /**
     * Returns an Single which will refresh the model's data based on the primary key when subscribed.
     * @param databaseWrapper The database wrapper for the database holding the table
     * @return An Single
     */
    public Single<M> loadAsSingle(@Nullable final DatabaseWrapper databaseWrapper){
        return getRxModelAdapter().loadAsSingle(this, databaseWrapper);
    }

    /**
     * @return The associated {@link RxModelAdapter}. The {@link RxDbFlow}
     * may throw a {@link InvalidDBConfiguration} for this call if this class
     * is not associated with a table, so be careful when using this method.
     */
    public RxModelAdapter getRxModelAdapter() {
        if (mModelAdapter == null) {
// Path: RxDbFlow-Rx2/src/main/java/au/com/roadhouse/rxdbflow/rx2/RxDbFlow.java
// public class RxDbFlow {
// 
//     public static <TModel> RxModelAdapter<TModel> getModelAdapter(Class<TModel> modelClass) {
//         return new RxModelAdapter<>(FlowManager.getModelAdapter(modelClass));
//     }
// 
// }


// Path: RxDbFlow-Rx2/src/main/java/au/com/roadhouse/rxdbflow/rx2/structure/RxBaseModel.java
import android.support.annotation.Nullable;
import com.raizlabs.android.dbflow.structure.BaseModel;
import com.raizlabs.android.dbflow.structure.InvalidDBConfiguration;
import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper;
import au.com.roadhouse.rxdbflow.rx2.RxDbFlow;
import io.reactivex.Single;

     * @return An Single
     */
    public Single<M> updateAsSingle(@Nullable final DatabaseWrapper databaseWrapper){
        return getRxModelAdapter().updateAsSingle(this, databaseWrapper);
    }

    /**
     * Returns an Single which will refresh the model's data based on the primary key when subscribed.
     * @return An Single
     */
    public Single<M> loadAsSingle(){
        return getRxModelAdapter().loadAsSingle(this);
    }

    /**
     * Returns an Single which will refresh the model's data based on the primary key when subscribed.
     * @param databaseWrapper The database wrapper for the database holding the table
     * @return An Single
     */
    public Single<M> loadAsSingle(@Nullable final DatabaseWrapper databaseWrapper){
        return getRxModelAdapter().loadAsSingle(this, databaseWrapper);
    }

    /**
     * @return The associated {@link RxModelAdapter}. The {@link RxDbFlow}
     * may throw a {@link InvalidDBConfiguration} for this call if this class
     * is not associated with a table, so be careful when using this method.
     */
    public RxModelAdapter getRxModelAdapter() {
        if (mModelAdapter == null) {
            mModelAdapter = RxDbFlow.getModelAdapter(getClass());