Search in sources :

Example 1 with CategoryQuery

use of org.hisp.dhis.android.core.category.CategoryQuery 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;
}
Also used : Category(org.hisp.dhis.android.core.category.Category) ResponseValidator(org.hisp.dhis.android.core.category.ResponseValidator) CategoryQuery(org.hisp.dhis.android.core.category.CategoryQuery) ResourceHandler(org.hisp.dhis.android.core.resource.ResourceHandler) CategoryService(org.hisp.dhis.android.core.category.CategoryService) CategoryEndpointCall(org.hisp.dhis.android.core.category.CategoryEndpointCall) CategoryHandler(org.hisp.dhis.android.core.category.CategoryHandler) Date(java.util.Date) NonNull(android.support.annotation.NonNull)

Aggregations

NonNull (android.support.annotation.NonNull)1 Date (java.util.Date)1 Category (org.hisp.dhis.android.core.category.Category)1 CategoryEndpointCall (org.hisp.dhis.android.core.category.CategoryEndpointCall)1 CategoryHandler (org.hisp.dhis.android.core.category.CategoryHandler)1 CategoryQuery (org.hisp.dhis.android.core.category.CategoryQuery)1 CategoryService (org.hisp.dhis.android.core.category.CategoryService)1 ResponseValidator (org.hisp.dhis.android.core.category.ResponseValidator)1 ResourceHandler (org.hisp.dhis.android.core.resource.ResourceHandler)1