.. java:import:: org.joda.time DateTime .. java:import:: org.motechproject.commons.api Range .. java:import:: org.motechproject.email.domain DeliveryStatus .. java:import:: org.motechproject.email.domain EmailRecord .. java:import:: org.motechproject.mds.annotations Lookup .. java:import:: org.motechproject.mds.annotations LookupField .. java:import:: org.motechproject.mds.service MotechDataService .. java:import:: org.motechproject.mds.query QueryParams .. java:import:: java.util List .. java:import:: java.util Set EmailRecordService ================== .. java:package:: org.motechproject.email.service :noindex: .. java:type:: public interface EmailRecordService extends MotechDataService This service provides data access for \ :java:ref:`org.motechproject.email.domain.EmailRecord`\ . The implementation is generated by Motech Data Services and published as an OSGi service. Methods ------- countFind ^^^^^^^^^ .. java:method:: long countFind(String fromAddress, String toAddress, String subject, String message, Range deliveryTimeRange, Set deliveryStatuses) :outertype: EmailRecordService Returns the count of all \ ``EmailRecord``\ entries matching the specified search parameters. :param fromAddress: the sender address on which to search :param toAddress: the recipient address on which to search :param subject: the subject on which to search :param message: the message body on which to search :param deliveryTimeRange: the delivery time range on which to search :param deliveryStatuses: the delivery statuses on which to search :return: the count of \ ``EmailRecord``\ entries that match the specified criteria find ^^^^ .. java:method:: @Lookup List find(String fromAddress, String toAddress, String subject, String message, Range deliveryTimeRange, Set deliveryStatuses, QueryParams queryParams) :outertype: EmailRecordService Finds and returns all \ ``EmailRecord``\ entries matching the specified search parameters. This method is exposed as a \ :java:ref:`org.motechproject.mds.annotations.Lookup`\ through Motech Data Services. :param fromAddress: the sender address on which to search :param toAddress: the recipient address on which to search :param subject: the subject on which to search :param message: the message body on which to search :param deliveryTimeRange: the delivery time range on which to search :param deliveryStatuses: the delivery statuses on which to search :param queryParams: the query parameters to include with the search criteria :return: the list of \ ``EmailRecord``\ entries that match the specified criteria **See also:** :java:ref:`org.motechproject.mds.annotations` findByRecipientAddress ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Lookup List findByRecipientAddress(String recipientAddress) :outertype: EmailRecordService Finds and returns all \ ``EmailRecord``\ entries for the specified recipient address. This method is exposed as a \ :java:ref:`org.motechproject.mds.annotations.Lookup`\ through Motech Data Services. :param recipientAddress: the recipient address on which to search :return: the list of \ ``EmailRecord``\ entries that match the specified address **See also:** :java:ref:`org.motechproject.mds.annotations`