Search in sources :

Example 1 with TrackedEntityInstanceHandler

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;
}
Also used : TrackedEntityInstanceStoreImpl(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStoreImpl) TrackedEntityAttributeValueHandler(org.hisp.dhis.android.core.trackedentity.TrackedEntityAttributeValueHandler) EnrollmentHandler(org.hisp.dhis.android.core.enrollment.EnrollmentHandler) TrackedEntityInstanceStore(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStore) TrackedEntityInstanceHandler(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler)

Example 2 with 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;
}
Also used : ResourceHandler(org.hisp.dhis.android.core.resource.ResourceHandler) TrackedEntityInstanceEndPointCall(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceEndPointCall) TrackedEntityInstanceHandler(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler) TrackedEntityInstanceService(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceService) Date(java.util.Date)

Aggregations

TrackedEntityInstanceHandler (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler)2 Date (java.util.Date)1 EnrollmentHandler (org.hisp.dhis.android.core.enrollment.EnrollmentHandler)1 ResourceHandler (org.hisp.dhis.android.core.resource.ResourceHandler)1 TrackedEntityAttributeValueHandler (org.hisp.dhis.android.core.trackedentity.TrackedEntityAttributeValueHandler)1 TrackedEntityInstanceEndPointCall (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceEndPointCall)1 TrackedEntityInstanceService (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceService)1 TrackedEntityInstanceStore (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStore)1 TrackedEntityInstanceStoreImpl (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStoreImpl)1