Search in sources :

Example 6 with EventStoreImpl

use of org.hisp.dhis.android.core.event.EventStoreImpl in project dhis2-android-sdk by dhis2.

the class TrackedEntityInstancePostCallRealIntegrationShould method getEventsFromDb.

private Event getEventsFromDb(String eventUid) {
    EventStoreImpl eventStore = new EventStoreImpl(databaseAdapter());
    Event event = null;
    List<Event> storedEvents = eventStore.queryAll();
    for (Event storedEvent : storedEvents) {
        if (storedEvent.uid().equals(eventUid)) {
            event = storedEvent;
        }
    }
    return event;
}
Also used : EventStoreImpl(org.hisp.dhis.android.core.event.EventStoreImpl) Event(org.hisp.dhis.android.core.event.Event)

Aggregations

EventStoreImpl (org.hisp.dhis.android.core.event.EventStoreImpl)6 Event (org.hisp.dhis.android.core.event.Event)4 List (java.util.List)2 EnrollmentStoreImpl (org.hisp.dhis.android.core.enrollment.EnrollmentStoreImpl)2 EventStore (org.hisp.dhis.android.core.event.EventStore)2 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 EventHandler (org.hisp.dhis.android.core.event.EventHandler)1 TrackedEntityDataValueHandler (org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueHandler)1 TrackedEntityDataValueStore (org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueStore)1 TrackedEntityDataValueStoreImpl (org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueStoreImpl)1 CodeGeneratorImpl (org.hisp.dhis.android.core.utils.CodeGeneratorImpl)1 Before (org.junit.Before)1