use of org.hisp.dhis.android.core.category.CategoryHandler in project dhis2-android-sdk by dhis2.
the class HandlerFactory method createCategoryHandler.
public static CategoryHandler createCategoryHandler(DatabaseAdapter databaseAdapter) {
CategoryStore categoryStore = new CategoryStoreImpl(databaseAdapter);
CategoryOptionHandler categoryOptionHandler = createCategoryOptionHandler(databaseAdapter);
CategoryCategoryOptionLinkStore categoryCategoryOptionLinkStore = new CategoryCategoryOptionLinkStoreImpl(databaseAdapter);
CategoryHandler categoryHandler = new CategoryHandler(categoryStore, categoryOptionHandler, categoryCategoryOptionLinkStore);
return categoryHandler;
}
use of org.hisp.dhis.android.core.category.CategoryHandler in project dhis2-android-sdk by dhis2.
the class CategoryCallFactory method create.
@NonNull
public static CategoryEndpointCall create(Retrofit retrofit, DatabaseAdapter databaseAdapter) {
CategoryService categoryService = retrofit.create(CategoryService.class);
ResponseValidator<Category> categoryResponseValidator = new ResponseValidator<>();
CategoryHandler categoryHandler = HandlerFactory.createCategoryHandler(databaseAdapter);
ResourceHandler resourceHandler = HandlerFactory.createResourceHandler(databaseAdapter);
CategoryQuery categoryQuery = CategoryQuery.defaultQuery();
CategoryEndpointCall categoryEndpointCall = new CategoryEndpointCall(categoryQuery, categoryService, categoryResponseValidator, categoryHandler, resourceHandler, databaseAdapter, new Date());
return categoryEndpointCall;
}
Aggregations