package br.mp.mprj.portal.portlet.gestaomensagens.service.service.persistence;

import br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the email destinatario service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Henrique Simoes
 * @see EmailDestinatarioPersistenceImpl
 * @see EmailDestinatarioUtil
 * @generated
 */
public interface EmailDestinatarioPersistence extends BasePersistence<EmailDestinatario> {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this interface directly. Always use {@link EmailDestinatarioUtil} to access the email destinatario persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
     */

    /**
    * Returns all the email destinatarios where uuid = &#63;.
    *
    * @param uuid the uuid
    * @return the matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findByUuid(
        java.lang.String uuid)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the email destinatarios where uuid = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link br.mp.mprj.portal.portlet.gestaomensagens.service.model.impl.EmailDestinatarioModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param uuid the uuid
    * @param start the lower bound of the range of email destinatarios
    * @param end the upper bound of the range of email destinatarios (not inclusive)
    * @return the range of matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findByUuid(
        java.lang.String uuid, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns an ordered range of all the email destinatarios where uuid = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link br.mp.mprj.portal.portlet.gestaomensagens.service.model.impl.EmailDestinatarioModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param uuid the uuid
    * @param start the lower bound of the range of email destinatarios
    * @param end the upper bound of the range of email destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findByUuid(
        java.lang.String uuid, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the first email destinatario in the ordered set where uuid = &#63;.
    *
    * @param uuid the uuid
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario findByUuid_First(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the first email destinatario in the ordered set where uuid = &#63;.
    *
    * @param uuid the uuid
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching email destinatario, or <code>null</code> if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario fetchByUuid_First(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last email destinatario in the ordered set where uuid = &#63;.
    *
    * @param uuid the uuid
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario findByUuid_Last(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last email destinatario in the ordered set where uuid = &#63;.
    *
    * @param uuid the uuid
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching email destinatario, or <code>null</code> if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario fetchByUuid_Last(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the email destinatarios before and after the current email destinatario in the ordered set where uuid = &#63;.
    *
    * @param emailDestinatarioId the primary key of the current email destinatario
    * @param uuid the uuid
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a email destinatario with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario[] findByUuid_PrevAndNext(
        long emailDestinatarioId, java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the email destinatarios where uuid = &#63; from the database.
    *
    * @param uuid the uuid
    * @throws SystemException if a system exception occurred
    */
    public void removeByUuid(java.lang.String uuid)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of email destinatarios where uuid = &#63;.
    *
    * @param uuid the uuid
    * @return the number of matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public int countByUuid(java.lang.String uuid)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns all the email destinatarios where grupoDestinatarioId = &#63;.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @return the matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findByGrupoDestinatarioId(
        long grupoDestinatarioId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the email destinatarios where grupoDestinatarioId = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link br.mp.mprj.portal.portlet.gestaomensagens.service.model.impl.EmailDestinatarioModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param start the lower bound of the range of email destinatarios
    * @param end the upper bound of the range of email destinatarios (not inclusive)
    * @return the range of matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findByGrupoDestinatarioId(
        long grupoDestinatarioId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns an ordered range of all the email destinatarios where grupoDestinatarioId = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link br.mp.mprj.portal.portlet.gestaomensagens.service.model.impl.EmailDestinatarioModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param start the lower bound of the range of email destinatarios
    * @param end the upper bound of the range of email destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findByGrupoDestinatarioId(
        long grupoDestinatarioId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the first email destinatario in the ordered set where grupoDestinatarioId = &#63;.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario findByGrupoDestinatarioId_First(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the first email destinatario in the ordered set where grupoDestinatarioId = &#63;.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching email destinatario, or <code>null</code> if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario fetchByGrupoDestinatarioId_First(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last email destinatario in the ordered set where grupoDestinatarioId = &#63;.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario findByGrupoDestinatarioId_Last(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last email destinatario in the ordered set where grupoDestinatarioId = &#63;.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching email destinatario, or <code>null</code> if a matching email destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario fetchByGrupoDestinatarioId_Last(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the email destinatarios before and after the current email destinatario in the ordered set where grupoDestinatarioId = &#63;.
    *
    * @param emailDestinatarioId the primary key of the current email destinatario
    * @param grupoDestinatarioId the grupo destinatario ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a email destinatario with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario[] findByGrupoDestinatarioId_PrevAndNext(
        long emailDestinatarioId, long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the email destinatarios where grupoDestinatarioId = &#63; from the database.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @throws SystemException if a system exception occurred
    */
    public void removeByGrupoDestinatarioId(long grupoDestinatarioId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of email destinatarios where grupoDestinatarioId = &#63;.
    *
    * @param grupoDestinatarioId the grupo destinatario ID
    * @return the number of matching email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public int countByGrupoDestinatarioId(long grupoDestinatarioId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Caches the email destinatario in the entity cache if it is enabled.
    *
    * @param emailDestinatario the email destinatario
    */
    public void cacheResult(
        br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario emailDestinatario);

    /**
    * Caches the email destinatarios in the entity cache if it is enabled.
    *
    * @param emailDestinatarios the email destinatarios
    */
    public void cacheResult(
        java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> emailDestinatarios);

    /**
    * Creates a new email destinatario with the primary key. Does not add the email destinatario to the database.
    *
    * @param emailDestinatarioId the primary key for the new email destinatario
    * @return the new email destinatario
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario create(
        long emailDestinatarioId);

    /**
    * Removes the email destinatario with the primary key from the database. Also notifies the appropriate model listeners.
    *
    * @param emailDestinatarioId the primary key of the email destinatario
    * @return the email destinatario that was removed
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a email destinatario with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario remove(
        long emailDestinatarioId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario updateImpl(
        br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario emailDestinatario)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the email destinatario with the primary key or throws a {@link br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException} if it could not be found.
    *
    * @param emailDestinatarioId the primary key of the email destinatario
    * @return the email destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException if a email destinatario with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario findByPrimaryKey(
        long emailDestinatarioId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchEmailDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the email destinatario with the primary key or returns <code>null</code> if it could not be found.
    *
    * @param emailDestinatarioId the primary key of the email destinatario
    * @return the email destinatario, or <code>null</code> if a email destinatario with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario fetchByPrimaryKey(
        long emailDestinatarioId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns all the email destinatarios.
    *
    * @return the email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findAll()
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the email destinatarios.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link br.mp.mprj.portal.portlet.gestaomensagens.service.model.impl.EmailDestinatarioModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of email destinatarios
    * @param end the upper bound of the range of email destinatarios (not inclusive)
    * @return the range of email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findAll(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns an ordered range of all the email destinatarios.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link br.mp.mprj.portal.portlet.gestaomensagens.service.model.impl.EmailDestinatarioModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of email destinatarios
    * @param end the upper bound of the range of email destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> findAll(
        int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the email destinatarios from the database.
    *
    * @throws SystemException if a system exception occurred
    */
    public void removeAll()
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of email destinatarios.
    *
    * @return the number of email destinatarios
    * @throws SystemException if a system exception occurred
    */
    public int countAll()
        throws com.liferay.portal.kernel.exception.SystemException;
}
