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);
}
}`
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?