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

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

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import java.util.List;

/**
 * The persistence utility for the grupo destinatario service. This utility wraps {@link GrupoDestinatarioPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Henrique Simoes
 * @see GrupoDestinatarioPersistence
 * @see GrupoDestinatarioPersistenceImpl
 * @generated
 */
public class GrupoDestinatarioUtil {
    private static GrupoDestinatarioPersistence _persistence;

    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
     */

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
     */
    public static void clearCache() {
        getPersistence().clearCache();
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
     */
    public static void clearCache(GrupoDestinatario grupoDestinatario) {
        getPersistence().clearCache(grupoDestinatario);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
     */
    public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return getPersistence().countWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
     */
    public static List<GrupoDestinatario> findWithDynamicQuery(
        DynamicQuery dynamicQuery) throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
     */
    public static List<GrupoDestinatario> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end)
        throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
     */
    public static List<GrupoDestinatario> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end,
        OrderByComparator orderByComparator) throws SystemException {
        return getPersistence()
                   .findWithDynamicQuery(dynamicQuery, start, end,
            orderByComparator);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
     */
    public static GrupoDestinatario update(GrupoDestinatario grupoDestinatario)
        throws SystemException {
        return getPersistence().update(grupoDestinatario);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
     */
    public static GrupoDestinatario update(
        GrupoDestinatario grupoDestinatario, ServiceContext serviceContext)
        throws SystemException {
        return getPersistence().update(grupoDestinatario, serviceContext);
    }

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

    /**
    * Returns a range of all the grupo 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.GrupoDestinatarioModelImpl}. 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 grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @return the range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByUuid(
        java.lang.String uuid, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUuid(uuid, start, end);
    }

    /**
    * Returns an ordered range of all the grupo 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.GrupoDestinatarioModelImpl}. 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 grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByUuid(
        java.lang.String uuid, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUuid(uuid, start, end, orderByComparator);
    }

    /**
    * Returns the first grupo 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 grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByUuid_First(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUuid_First(uuid, orderByComparator);
    }

    /**
    * Returns the first grupo 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 grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByUuid_First(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByUuid_First(uuid, orderByComparator);
    }

    /**
    * Returns the last grupo 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 grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByUuid_Last(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUuid_Last(uuid, orderByComparator);
    }

    /**
    * Returns the last grupo 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 grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByUuid_Last(
        java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
    }

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

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

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

    /**
    * Returns the grupo destinatario where uuid = &#63; and groupId = &#63; or throws a {@link br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException} if it could not be found.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the matching grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByUUID_G(
        java.lang.String uuid, long groupId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUUID_G(uuid, groupId);
    }

    /**
    * Returns the grupo destinatario where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the matching grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByUUID_G(
        java.lang.String uuid, long groupId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByUUID_G(uuid, groupId);
    }

    /**
    * Returns the grupo destinatario where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @param retrieveFromCache whether to use the finder cache
    * @return the matching grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByUUID_G(
        java.lang.String uuid, long groupId, boolean retrieveFromCache)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
    }

    /**
    * Removes the grupo destinatario where uuid = &#63; and groupId = &#63; from the database.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the grupo destinatario that was removed
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario removeByUUID_G(
        java.lang.String uuid, long groupId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().removeByUUID_G(uuid, groupId);
    }

    /**
    * Returns the number of grupo destinatarios where uuid = &#63; and groupId = &#63;.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the number of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static int countByUUID_G(java.lang.String uuid, long groupId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByUUID_G(uuid, groupId);
    }

    /**
    * Returns all the grupo destinatarios where uuid = &#63; and companyId = &#63;.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @return the matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByUuid_C(
        java.lang.String uuid, long companyId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUuid_C(uuid, companyId);
    }

    /**
    * Returns a range of all the grupo destinatarios where uuid = &#63; and companyId = &#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.GrupoDestinatarioModelImpl}. 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 companyId the company ID
    * @param start the lower bound of the range of grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @return the range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByUuid_C(
        java.lang.String uuid, long companyId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUuid_C(uuid, companyId, start, end);
    }

    /**
    * Returns an ordered range of all the grupo destinatarios where uuid = &#63; and companyId = &#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.GrupoDestinatarioModelImpl}. 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 companyId the company ID
    * @param start the lower bound of the range of grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByUuid_C(
        java.lang.String uuid, long companyId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUuid_C(uuid, companyId, start, end, orderByComparator);
    }

    /**
    * Returns the first grupo destinatario in the ordered set where uuid = &#63; and companyId = &#63;.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByUuid_C_First(
        java.lang.String uuid, long companyId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUuid_C_First(uuid, companyId, orderByComparator);
    }

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

    /**
    * Returns the last grupo destinatario in the ordered set where uuid = &#63; and companyId = &#63;.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByUuid_C_Last(
        java.lang.String uuid, long companyId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUuid_C_Last(uuid, companyId, orderByComparator);
    }

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

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

    /**
    * Removes all the grupo destinatarios where uuid = &#63; and companyId = &#63; from the database.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @throws SystemException if a system exception occurred
    */
    public static void removeByUuid_C(java.lang.String uuid, long companyId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByUuid_C(uuid, companyId);
    }

    /**
    * Returns the number of grupo destinatarios where uuid = &#63; and companyId = &#63;.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @return the number of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static int countByUuid_C(java.lang.String uuid, long companyId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByUuid_C(uuid, companyId);
    }

    /**
    * Returns all the grupo destinatarios where tipoLista = &#63; and ativo = &#63;.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @return the matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByTipoListaAtivo(
        int tipoLista, boolean ativo)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByTipoListaAtivo(tipoLista, ativo);
    }

    /**
    * Returns a range of all the grupo destinatarios where tipoLista = &#63; and ativo = &#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.GrupoDestinatarioModelImpl}. 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 tipoLista the tipo lista
    * @param ativo the ativo
    * @param start the lower bound of the range of grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @return the range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByTipoListaAtivo(
        int tipoLista, boolean ativo, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByTipoListaAtivo(tipoLista, ativo, start, end);
    }

    /**
    * Returns an ordered range of all the grupo destinatarios where tipoLista = &#63; and ativo = &#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.GrupoDestinatarioModelImpl}. 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 tipoLista the tipo lista
    * @param ativo the ativo
    * @param start the lower bound of the range of grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByTipoListaAtivo(
        int tipoLista, boolean ativo, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByTipoListaAtivo(tipoLista, ativo, start, end,
            orderByComparator);
    }

    /**
    * Returns the first grupo destinatario in the ordered set where tipoLista = &#63; and ativo = &#63;.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByTipoListaAtivo_First(
        int tipoLista, boolean ativo,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByTipoListaAtivo_First(tipoLista, ativo,
            orderByComparator);
    }

    /**
    * Returns the first grupo destinatario in the ordered set where tipoLista = &#63; and ativo = &#63;.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByTipoListaAtivo_First(
        int tipoLista, boolean ativo,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByTipoListaAtivo_First(tipoLista, ativo,
            orderByComparator);
    }

    /**
    * Returns the last grupo destinatario in the ordered set where tipoLista = &#63; and ativo = &#63;.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByTipoListaAtivo_Last(
        int tipoLista, boolean ativo,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByTipoListaAtivo_Last(tipoLista, ativo,
            orderByComparator);
    }

    /**
    * Returns the last grupo destinatario in the ordered set where tipoLista = &#63; and ativo = &#63;.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByTipoListaAtivo_Last(
        int tipoLista, boolean ativo,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByTipoListaAtivo_Last(tipoLista, ativo,
            orderByComparator);
    }

    /**
    * Returns the grupo destinatarios before and after the current grupo destinatario in the ordered set where tipoLista = &#63; and ativo = &#63;.
    *
    * @param grupoDestinatarioId the primary key of the current grupo destinatario
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a grupo destinatario with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario[] findByTipoListaAtivo_PrevAndNext(
        long grupoDestinatarioId, int tipoLista, boolean ativo,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByTipoListaAtivo_PrevAndNext(grupoDestinatarioId,
            tipoLista, ativo, orderByComparator);
    }

    /**
    * Removes all the grupo destinatarios where tipoLista = &#63; and ativo = &#63; from the database.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @throws SystemException if a system exception occurred
    */
    public static void removeByTipoListaAtivo(int tipoLista, boolean ativo)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByTipoListaAtivo(tipoLista, ativo);
    }

    /**
    * Returns the number of grupo destinatarios where tipoLista = &#63; and ativo = &#63;.
    *
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @return the number of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static int countByTipoListaAtivo(int tipoLista, boolean ativo)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByTipoListaAtivo(tipoLista, ativo);
    }

    /**
    * Returns the grupo destinatario where nome = &#63; and tipoLista = &#63; and ativo = &#63; or throws a {@link br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException} if it could not be found.
    *
    * @param nome the nome
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @return the matching grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByNomeTipoListaAtivo(
        java.lang.String nome, int tipoLista, boolean ativo)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByNomeTipoListaAtivo(nome, tipoLista, ativo);
    }

    /**
    * Returns the grupo destinatario where nome = &#63; and tipoLista = &#63; and ativo = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
    *
    * @param nome the nome
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @return the matching grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByNomeTipoListaAtivo(
        java.lang.String nome, int tipoLista, boolean ativo)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByNomeTipoListaAtivo(nome, tipoLista, ativo);
    }

    /**
    * Returns the grupo destinatario where nome = &#63; and tipoLista = &#63; and ativo = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
    *
    * @param nome the nome
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @param retrieveFromCache whether to use the finder cache
    * @return the matching grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByNomeTipoListaAtivo(
        java.lang.String nome, int tipoLista, boolean ativo,
        boolean retrieveFromCache)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByNomeTipoListaAtivo(nome, tipoLista, ativo,
            retrieveFromCache);
    }

    /**
    * Removes the grupo destinatario where nome = &#63; and tipoLista = &#63; and ativo = &#63; from the database.
    *
    * @param nome the nome
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @return the grupo destinatario that was removed
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario removeByNomeTipoListaAtivo(
        java.lang.String nome, int tipoLista, boolean ativo)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .removeByNomeTipoListaAtivo(nome, tipoLista, ativo);
    }

    /**
    * Returns the number of grupo destinatarios where nome = &#63; and tipoLista = &#63; and ativo = &#63;.
    *
    * @param nome the nome
    * @param tipoLista the tipo lista
    * @param ativo the ativo
    * @return the number of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static int countByNomeTipoListaAtivo(java.lang.String nome,
        int tipoLista, boolean ativo)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByNomeTipoListaAtivo(nome, tipoLista, ativo);
    }

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

    /**
    * Returns a range of all the grupo 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.GrupoDestinatarioModelImpl}. 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 grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @return the range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByGrupoDestinatarioIdArray(
        long grupoDestinatarioId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray(grupoDestinatarioId, start,
            end);
    }

    /**
    * Returns an ordered range of all the grupo 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.GrupoDestinatarioModelImpl}. 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 grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByGrupoDestinatarioIdArray(
        long grupoDestinatarioId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray(grupoDestinatarioId, start,
            end, orderByComparator);
    }

    /**
    * Returns the first grupo 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 grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByGrupoDestinatarioIdArray_First(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray_First(grupoDestinatarioId,
            orderByComparator);
    }

    /**
    * Returns the first grupo 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 grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByGrupoDestinatarioIdArray_First(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByGrupoDestinatarioIdArray_First(grupoDestinatarioId,
            orderByComparator);
    }

    /**
    * Returns the last grupo 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 grupo destinatario
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario findByGrupoDestinatarioIdArray_Last(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchGrupoDestinatarioException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray_Last(grupoDestinatarioId,
            orderByComparator);
    }

    /**
    * Returns the last grupo 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 grupo destinatario, or <code>null</code> if a matching grupo destinatario could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario fetchByGrupoDestinatarioIdArray_Last(
        long grupoDestinatarioId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByGrupoDestinatarioIdArray_Last(grupoDestinatarioId,
            orderByComparator);
    }

    /**
    * Returns all the grupo destinatarios where grupoDestinatarioId = any &#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.GrupoDestinatarioModelImpl}. 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 grupoDestinatarioIds the grupo destinatario IDs
    * @return the matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByGrupoDestinatarioIdArray(
        long[] grupoDestinatarioIds)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray(grupoDestinatarioIds);
    }

    /**
    * Returns a range of all the grupo destinatarios where grupoDestinatarioId = any &#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.GrupoDestinatarioModelImpl}. 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 grupoDestinatarioIds the grupo destinatario IDs
    * @param start the lower bound of the range of grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @return the range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByGrupoDestinatarioIdArray(
        long[] grupoDestinatarioIds, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray(grupoDestinatarioIds, start,
            end);
    }

    /**
    * Returns an ordered range of all the grupo destinatarios where grupoDestinatarioId = any &#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.GrupoDestinatarioModelImpl}. 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 grupoDestinatarioIds the grupo destinatario IDs
    * @param start the lower bound of the range of grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findByGrupoDestinatarioIdArray(
        long[] grupoDestinatarioIds, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGrupoDestinatarioIdArray(grupoDestinatarioIds, start,
            end, orderByComparator);
    }

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

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

    /**
    * Returns the number of grupo destinatarios where grupoDestinatarioId = any &#63;.
    *
    * @param grupoDestinatarioIds the grupo destinatario IDs
    * @return the number of matching grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static int countByGrupoDestinatarioIdArray(
        long[] grupoDestinatarioIds)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByGrupoDestinatarioIdArray(grupoDestinatarioIds);
    }

    /**
    * Caches the grupo destinatario in the entity cache if it is enabled.
    *
    * @param grupoDestinatario the grupo destinatario
    */
    public static void cacheResult(
        br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario grupoDestinatario) {
        getPersistence().cacheResult(grupoDestinatario);
    }

    /**
    * Caches the grupo destinatarios in the entity cache if it is enabled.
    *
    * @param grupoDestinatarios the grupo destinatarios
    */
    public static void cacheResult(
        java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> grupoDestinatarios) {
        getPersistence().cacheResult(grupoDestinatarios);
    }

    /**
    * Creates a new grupo destinatario with the primary key. Does not add the grupo destinatario to the database.
    *
    * @param grupoDestinatarioId the primary key for the new grupo destinatario
    * @return the new grupo destinatario
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario create(
        long grupoDestinatarioId) {
        return getPersistence().create(grupoDestinatarioId);
    }

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

    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario updateImpl(
        br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario grupoDestinatario)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().updateImpl(grupoDestinatario);
    }

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

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

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

    /**
    * Returns a range of all the grupo 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.GrupoDestinatarioModelImpl}. 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 grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @return the range of grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findAll(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end);
    }

    /**
    * Returns an ordered range of all the grupo 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.GrupoDestinatarioModelImpl}. 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 grupo destinatarios
    * @param end the upper bound of the range of grupo destinatarios (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of grupo destinatarios
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.GrupoDestinatario> findAll(
        int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end, orderByComparator);
    }

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

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

    public static GrupoDestinatarioPersistence getPersistence() {
        if (_persistence == null) {
            _persistence = (GrupoDestinatarioPersistence) PortletBeanLocatorUtil.locate(br.mp.mprj.portal.portlet.gestaomensagens.service.service.ClpSerializer.getServletContextName(),
                    GrupoDestinatarioPersistence.class.getName());

            ReferenceRegistry.registerReference(GrupoDestinatarioUtil.class,
                "_persistence");
        }

        return _persistence;
    }

    /**
     * @deprecated As of 6.2.0
     */
    public void setPersistence(GrupoDestinatarioPersistence persistence) {
    }
}
