.. java:import:: org.motechproject.email.builder EmailRecordSearchCriteria .. java:import:: org.motechproject.email.domain EmailRecord .. java:import:: java.util List EmailAuditService ================= .. java:package:: org.motechproject.email.service :noindex: .. java:type:: public interface EmailAuditService The \ ``EmailAuditService``\ interface provides methods for logging email activity, as well as searching and deleting the email logs. Methods ------- countEmailRecords ^^^^^^^^^^^^^^^^^ .. java:method:: long countEmailRecords(EmailRecordSearchCriteria criteria) :outertype: EmailAuditService Returns the count of \ ``EmailRecord``\ entries matching the specified search criteria. :return: the count of email records matching the provided criteria delete ^^^^^^ .. java:method:: void delete(EmailRecord emailRecord) :outertype: EmailAuditService Deletes the specified \ ``EmailRecord``\ entry from the email log. findAllEmailRecords ^^^^^^^^^^^^^^^^^^^ .. java:method:: List findAllEmailRecords() :outertype: EmailAuditService Finds and returns all \ ``EmailRecord``\ entries in the email log. :return: all email records in the email log findById ^^^^^^^^ .. java:method:: EmailRecord findById(long id) :outertype: EmailAuditService Finds an \ ``EmailRecord``\ in the log by ID. :param id: the identifier of the record to find :return: the email record that matches the provided identifier, or null if no matching record exists findEmailRecords ^^^^^^^^^^^^^^^^ .. java:method:: List findEmailRecords(EmailRecordSearchCriteria criteria) :outertype: EmailAuditService Finds and returns all \ ``EmailRecord``\ entries matching the specified search criteria. :return: all email records matching the provided criteria log ^^^ .. java:method:: void log(EmailRecord mailRecord) :outertype: EmailAuditService Adds the provided \ ``EmailRecord``\ to the email log. :param mailRecord: the record to add to the email log