use of org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler in project dhis2-android-sdk by dhis2.
the class HandlerFactory method createTrackedEntityInstanceHandler.
public static TrackedEntityInstanceHandler createTrackedEntityInstanceHandler(DatabaseAdapter databaseAdapter) {
TrackedEntityInstanceStore trackedEntityInstanceStore = new TrackedEntityInstanceStoreImpl(databaseAdapter);
TrackedEntityAttributeValueHandler trackedEntityAttributeValueHandler = createTrackedEntityAttributeValueHandler(databaseAdapter);
EnrollmentHandler enrollmentHandler = createEnrollmentHandler(databaseAdapter);
TrackedEntityInstanceHandler trackedEntityInstanceHandler = new TrackedEntityInstanceHandler(trackedEntityInstanceStore, trackedEntityAttributeValueHandler, enrollmentHandler);
return trackedEntityInstanceHandler;
}
use of org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler in project dhis2-android-sdk by dhis2.
the class TrackedEntityInstanceCallFactory method create.
public static TrackedEntityInstanceEndPointCall create(Retrofit retrofit, DatabaseAdapter databaseAdapter, String trackedEntityInstanceUid) {
TrackedEntityInstanceService trackedEntityInstanceService = retrofit.create(TrackedEntityInstanceService.class);
TrackedEntityInstanceHandler trackedEntityInstanceHandler = HandlerFactory.createTrackedEntityInstanceHandler(databaseAdapter);
ResourceHandler resourceHandler = HandlerFactory.createResourceHandler(databaseAdapter);
TrackedEntityInstanceEndPointCall trackedEntityInstanceEndPointCall = new TrackedEntityInstanceEndPointCall(trackedEntityInstanceService, databaseAdapter, trackedEntityInstanceHandler, resourceHandler, new Date(), trackedEntityInstanceUid);
return trackedEntityInstanceEndPointCall;
}
Aggregations