// Path: app/src/main/java/fr/guddy/androidstarteralt/ApplicationAndroidStarter.java
// @AutoComponent(
//         modules = {
//                 ModuleAsync.class,
//                 ModuleBus.class,
//                 ModuleContext.class,
//                 ModuleDatabase.class,
//                 ModuleEnvironment.class,
//                 ModuleRest.class,
//         }
// )
// @Singleton
// @AutoInjector(ApplicationAndroidStarter.class)
// public class ApplicationAndroidStarter extends Application {
//     private static final String TAG = ApplicationAndroidStarter.class.getSimpleName();
// 
//     //region Singleton
//     protected static ApplicationAndroidStarter sSharedApplication;
// 
//     public static ApplicationAndroidStarter sharedApplication() {
//         return sSharedApplication;
//     }
//     //endregion
// 
//     //region Fields (components)
//     protected ApplicationAndroidStarterComponent mComponentApplication;
//     //endregion
// 
//     //region Injected fields
//     @Inject
//     Merlin merlin;
//     //endregion
// 
//     //region Overridden methods
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         sSharedApplication = this;
// 
//         Logger.init(TAG)
//                 .logLevel(LogLevel.FULL);
// 
//         Hawk.init(this).build();
// 
//         Stetho.initializeWithDefaults(this);
// 
//         try {
//             buildComponent();
//         } catch (final GeneralSecurityException poException) {
//             if (BuildConfig.DEBUG) {
//                 Logger.t(TAG).e(poException, null);
//             }
//         }
// 
//         mComponentApplication.inject(this);
//         merlin.bind();
// 
//         final StrictMode.ThreadPolicy loStrictModeThreadPolicy = new StrictMode.ThreadPolicy.Builder()
//                 .detectAll()
//                 .penaltyDeath()
//                 .build();
//         StrictMode.setThreadPolicy(loStrictModeThreadPolicy);
//     }
// 
//     @Override
//     public void onTerminate() {
//         super.onTerminate();
//         sSharedApplication = null;
//         merlin.unbind();
//     }
//     //endregion
// 
//     //region Protected methods
//     protected void buildComponent() throws GeneralSecurityException {
//         final String lsKey = getString(R.string.base_url_key);
//         final String lsValue = getString(R.string.base_url_value);
// 
//         final String lsBaseUrl = AESCrypt.decrypt(lsKey, lsValue);
// 
//         mComponentApplication = DaggerApplicationAndroidStarterComponent.builder()
//                 .moduleAsync(new ModuleAsync())
//                 .moduleBus(new ModuleBus())
//                 .moduleContext(new ModuleContext(getApplicationContext()))
//                 .moduleDatabase(new ModuleDatabase())
//                 .moduleEnvironment(new ModuleEnvironment())
//                 .moduleRest(new ModuleRest(lsBaseUrl))
//                 .build();
//     }
//     //endregion
// 
//     //region Getters
//     public ApplicationAndroidStarterComponent componentApplication() {
//         return mComponentApplication;
//     }
//     //endregion
// }
// 
// Path: app/src/main/java/fr/guddy/androidstarteralt/bus/event/AbstractEventQueryDidFinish.java
// public abstract class AbstractEventQueryDidFinish<QueryType extends AbstractQuery> extends AbstractEvent {
//     //region Fields
//     public final QueryType query;
//     public final boolean success;
//     public final ErrorType errorType;
//     public final Throwable throwable;
//     //endregion
// 
//     //region Constructor
//     public AbstractEventQueryDidFinish(final QueryType poQuery, final boolean pbSuccess, final ErrorType poErrorType, final Throwable poThrowable) {
//         query = poQuery;
//         success = pbSuccess;
//         errorType = poErrorType;
//         throwable = poThrowable;
//     }
//     //endregion
// 
//     public enum ErrorType {
//         UNKNOWN,
//         NETWORK_UNREACHABLE
//     }
// }
// 
// Path: app/src/main/java/fr/guddy/androidstarteralt/rest/GitHubService.java
// public interface GitHubService {
//     @GET("/users/{user}/repos")
//     Call<List<DTORepo>> listRepos(@Path("user") final String psUser);
// }
// 
// Path: app/src/main/java/fr/guddy/androidstarteralt/rest/dto/DTORepo.java
// @JsonObject
// public class DTORepo {
//     @JsonField(name = "id")
//     public Integer id;
//     @JsonField(name = "name")
//     public String name;
//     @JsonField(name = "owner")
//     public DTOOwner owner;
//     @JsonField(name = "description")
//     public String description;
//     @JsonField(name = "url")
//     public String url;
//     @JsonField(name = "language")
//     public String language;
// }


import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import autodagger.AutoInjector;
import fr.guddy.androidstarteralt.ApplicationAndroidStarter;
import fr.guddy.androidstarteralt.bus.event.AbstractEventQueryDidFinish;
import fr.guddy.androidstarteralt.persistence.entities.RepoEntity;
import fr.guddy.androidstarteralt.rest.GitHubService;
import fr.guddy.androidstarteralt.rest.dto.DTORepo;
import io.requery.Persistable;
import io.requery.rx.SingleEntityStore;
import retrofit2.Call;
import retrofit2.Response;

package fr.guddy.androidstarteralt.rest.queries;





@AutoInjector(ApplicationAndroidStarter.class)
public class QueryGetRepos extends AbstractQuery {

    //region Fields
    public final boolean pullToRefresh;
    public final String user;
    transient public List<DTORepo> results;
    //endregion

    //region Injected fields
    @Inject
    transient GitHubService gitHubService;
    @Inject
    transient EventBus eventBus;
    @Inject
    transient SingleEntityStore<Persistable> dataStore;
    //endregion

    //region Constructor matching super
    public QueryGetRepos(final String psUser, final boolean pbPullToRefresh) {
        super(Priority.MEDIUM);

// Path: app/src/main/java/fr/guddy/androidstarteralt/ApplicationAndroidStarter.java
// @AutoComponent(
//         modules = {
//                 ModuleAsync.class,
//                 ModuleBus.class,
//                 ModuleContext.class,
//                 ModuleDatabase.class,
//                 ModuleEnvironment.class,
//                 ModuleRest.class,
//         }
// )
// @Singleton
// @AutoInjector(ApplicationAndroidStarter.class)
// public class ApplicationAndroidStarter extends Application {
//     private static final String TAG = ApplicationAndroidStarter.class.getSimpleName();
// 
//     //region Singleton
//     protected static ApplicationAndroidStarter sSharedApplication;
// 
//     public static ApplicationAndroidStarter sharedApplication() {
//         return sSharedApplication;
//     }
//     //endregion
// 
//     //region Fields (components)
//     protected ApplicationAndroidStarterComponent mComponentApplication;
//     //endregion
// 
//     //region Injected fields
//     @Inject
//     Merlin merlin;
//     //endregion
// 
//     //region Overridden methods
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         sSharedApplication = this;
// 
//         Logger.init(TAG)
//                 .logLevel(LogLevel.FULL);
// 
//         Hawk.init(this).build();
// 
//         Stetho.initializeWithDefaults(this);
// 
//         try {
//             buildComponent();
//         } catch (final GeneralSecurityException poException) {
//             if (BuildConfig.DEBUG) {
//                 Logger.t(TAG).e(poException, null);
//             }
//         }
// 
//         mComponentApplication.inject(this);
//         merlin.bind();
// 
//         final StrictMode.ThreadPolicy loStrictModeThreadPolicy = new StrictMode.ThreadPolicy.Builder()
//                 .detectAll()
//                 .penaltyDeath()
//                 .build();
//         StrictMode.setThreadPolicy(loStrictModeThreadPolicy);
//     }
// 
//     @Override
//     public void onTerminate() {
//         super.onTerminate();
//         sSharedApplication = null;
//         merlin.unbind();
//     }
//     //endregion
// 
//     //region Protected methods
//     protected void buildComponent() throws GeneralSecurityException {
//         final String lsKey = getString(R.string.base_url_key);
//         final String lsValue = getString(R.string.base_url_value);
// 
//         final String lsBaseUrl = AESCrypt.decrypt(lsKey, lsValue);
// 
//         mComponentApplication = DaggerApplicationAndroidStarterComponent.builder()
//                 .moduleAsync(new ModuleAsync())
//                 .moduleBus(new ModuleBus())
//                 .moduleContext(new ModuleContext(getApplicationContext()))
//                 .moduleDatabase(new ModuleDatabase())
//                 .moduleEnvironment(new ModuleEnvironment())
//                 .moduleRest(new ModuleRest(lsBaseUrl))
//                 .build();
//     }
//     //endregion
// 
//     //region Getters
//     public ApplicationAndroidStarterComponent componentApplication() {
//         return mComponentApplication;
//     }
//     //endregion
// }
// 
// Path: app/src/main/java/fr/guddy/androidstarteralt/bus/event/AbstractEventQueryDidFinish.java
// public abstract class AbstractEventQueryDidFinish<QueryType extends AbstractQuery> extends AbstractEvent {
//     //region Fields
//     public final QueryType query;
//     public final boolean success;
//     public final ErrorType errorType;
//     public final Throwable throwable;
//     //endregion
// 
//     //region Constructor
//     public AbstractEventQueryDidFinish(final QueryType poQuery, final boolean pbSuccess, final ErrorType poErrorType, final Throwable poThrowable) {
//         query = poQuery;
//         success = pbSuccess;
//         errorType = poErrorType;
//         throwable = poThrowable;
//     }
//     //endregion
// 
//     public enum ErrorType {
//         UNKNOWN,
//         NETWORK_UNREACHABLE
//     }
// }
// 
// Path: app/src/main/java/fr/guddy/androidstarteralt/rest/GitHubService.java
// public interface GitHubService {
//     @GET("/users/{user}/repos")
//     Call<List<DTORepo>> listRepos(@Path("user") final String psUser);
// }
// 
// Path: app/src/main/java/fr/guddy/androidstarteralt/rest/dto/DTORepo.java
// @JsonObject
// public class DTORepo {
//     @JsonField(name = "id")
//     public Integer id;
//     @JsonField(name = "name")
//     public String name;
//     @JsonField(name = "owner")
//     public DTOOwner owner;
//     @JsonField(name = "description")
//     public String description;
//     @JsonField(name = "url")
//     public String url;
//     @JsonField(name = "language")
//     public String language;
// }


// Path: app/src/main/java/fr/guddy/androidstarteralt/rest/queries/QueryGetRepos.java
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import autodagger.AutoInjector;
import fr.guddy.androidstarteralt.ApplicationAndroidStarter;
import fr.guddy.androidstarteralt.bus.event.AbstractEventQueryDidFinish;
import fr.guddy.androidstarteralt.persistence.entities.RepoEntity;
import fr.guddy.androidstarteralt.rest.GitHubService;
import fr.guddy.androidstarteralt.rest.dto.DTORepo;
import io.requery.Persistable;
import io.requery.rx.SingleEntityStore;
import retrofit2.Call;
import retrofit2.Response;

package fr.guddy.androidstarteralt.rest.queries;





@AutoInjector(ApplicationAndroidStarter.class)
public class QueryGetRepos extends AbstractQuery {

    //region Fields
    public final boolean pullToRefresh;
    public final String user;
    transient public List<DTORepo> results;
    //endregion

    //region Injected fields
    @Inject
    transient GitHubService gitHubService;
    @Inject
    transient EventBus eventBus;
    @Inject
    transient SingleEntityStore<Persistable> dataStore;
    //endregion

    //region Constructor matching super
    public QueryGetRepos(final String psUser, final boolean pbPullToRefresh) {
        super(Priority.MEDIUM);

        user = psUser;
