You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello
how can i use Generic class like below? if use this cod can i call two different query same time? and how do i use injection for service ?
`
public class Service<T extends RealmObject & HasId> extends StoreService<T>{
@Inject
public Service(Class<T> clazz, ApiInterface apiInterface) {
super(clazz, new Dao<T>(apiInterface));
this.syncWith(new BaseRealmService<>(clazz));
}
public static class Dao<T> extends StoreDao<T>{
private final ApiInterface apiInterface;
public Dao(ApiInterface apiInterface) {
this.apiInterface = apiInterface;
}
@Override
public Flowable<Optional<List<T>>> getAll(Filter filter, SortingMode sortingMode) {
return super.getAll(filter, sortingMode);
}
}
`
how can use dagger module for injection service?
`@Module(includes = ApiModule.class)
public class RepositoryModule<T> {
@Provides
public Service serviceProvide(Class<T> tClass,ApiInterface apiInterface){
return new Service(tClass,apiInterface);
}
}`
The text was updated successfully, but these errors were encountered:
hello
how can i use Generic class like below? if use this cod can i call two different query same time? and how do i use injection for service ?
how can use dagger module for injection service?
The text was updated successfully, but these errors were encountered: