Search in sources :

Example 1 with TrackedEntityInstanceStoreImpl

use of org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStoreImpl 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 TrackedEntityInstanceStoreImpl

use of org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStoreImpl in project dhis2-android-sdk by dhis2.

the class TrackerDataCallMockIntegrationShould method setUp.

@Override
@Before
public void setUp() throws IOException {
    super.setUp();
    dhis2MockServer = new Dhis2MockServer(new AssetsFileReader());
    d2 = D2Factory.create(dhis2MockServer.getBaseEndpoint(), databaseAdapter());
    trackedEntityInstanceStore = new TrackedEntityInstanceStoreImpl(databaseAdapter());
    resourceStore = new ResourceStoreImpl(databaseAdapter());
    enrollmentStore = new EnrollmentStoreImpl(databaseAdapter());
}
Also used : Dhis2MockServer(org.hisp.dhis.android.core.data.server.Dhis2MockServer) TrackedEntityInstanceStoreImpl(org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStoreImpl) EnrollmentStoreImpl(org.hisp.dhis.android.core.enrollment.EnrollmentStoreImpl) ResourceStoreImpl(org.hisp.dhis.android.core.resource.ResourceStoreImpl) AssetsFileReader(org.hisp.dhis.android.core.data.file.AssetsFileReader) Before(org.junit.Before)

Aggregations

TrackedEntityInstanceStoreImpl (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStoreImpl)2 AssetsFileReader (org.hisp.dhis.android.core.data.file.AssetsFileReader)1 Dhis2MockServer (org.hisp.dhis.android.core.data.server.Dhis2MockServer)1 EnrollmentHandler (org.hisp.dhis.android.core.enrollment.EnrollmentHandler)1 EnrollmentStoreImpl (org.hisp.dhis.android.core.enrollment.EnrollmentStoreImpl)1 ResourceStoreImpl (org.hisp.dhis.android.core.resource.ResourceStoreImpl)1 TrackedEntityAttributeValueHandler (org.hisp.dhis.android.core.trackedentity.TrackedEntityAttributeValueHandler)1 TrackedEntityInstanceHandler (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler)1 TrackedEntityInstanceStore (org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStore)1 Before (org.junit.Before)1