package org.motechproject.eventlogging.service;

import org.motechproject.eventlogging.domain.EventLog;
import org.motechproject.mds.annotations.Lookup;
import org.motechproject.mds.service.MotechDataService;

import java.util.List;

/**
 * Motech Data Service interface for {@link EventLog}s. The implementation is generated
 * and injected by the MDS module.
 */
public interface EventLogService extends MotechDataService<EventLog> {

    /**
     * Finds all recorded events with the given subject
     * @param name A subject to filter by
     * @return A collection of all recorded events with the given subject.
     */
    @Lookup
    List<EventLog> findBySubject(String name);

}

@@ -146,16 +146,70 @@
 Lookup;%0A
+import org.motechproject.mds.annotations.LookupField;%0A
 import o
@@ -718,16 +718,47 @@
 Subject(
+@LookupField(name = %22subject%22) 
 String n

Support for collection fields in lookups