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

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

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 agendamento service. This utility wraps {@link AgendamentoPersistenceImpl} 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 AgendamentoPersistence
 * @see AgendamentoPersistenceImpl
 * @generated
 */
public class AgendamentoUtil {
    private static AgendamentoPersistence _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(Agendamento agendamento) {
        getPersistence().clearCache(agendamento);
    }

    /**
     * @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<Agendamento> findWithDynamicQuery(
        DynamicQuery dynamicQuery) throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
     */
    public static List<Agendamento> 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<Agendamento> 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 Agendamento update(Agendamento agendamento)
        throws SystemException {
        return getPersistence().update(agendamento);
    }

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

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

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

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

    /**
    * Returns the last agendamento 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 agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento 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 agendamentos before and after the current agendamento in the ordered set where uuid = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param uuid the uuid
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByUuid_PrevAndNext(
        long agendamentoId, java.lang.String uuid,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUuid_PrevAndNext(agendamentoId, uuid,
            orderByComparator);
    }

    /**
    * Removes all the agendamentos 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 agendamentos where uuid = &#63;.
    *
    * @param uuid the uuid
    * @return the number of matching agendamentos
    * @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 agendamento where uuid = &#63; and groupId = &#63; or throws a {@link br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException} if it could not be found.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByUUID_G(
        java.lang.String uuid, long groupId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUUID_G(uuid, groupId);
    }

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

    /**
    * Returns the agendamento 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 agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento 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 agendamento where uuid = &#63; and groupId = &#63; from the database.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the agendamento that was removed
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento removeByUUID_G(
        java.lang.String uuid, long groupId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().removeByUUID_G(uuid, groupId);
    }

    /**
    * Returns the number of agendamentos where uuid = &#63; and groupId = &#63;.
    *
    * @param uuid the uuid
    * @param groupId the group ID
    * @return the number of matching agendamentos
    * @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 agendamentos where uuid = &#63; and companyId = &#63;.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> 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 agendamentos 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.AgendamentoModelImpl}. 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 agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> 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 agendamentos 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.AgendamentoModelImpl}. 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 agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> 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 agendamento 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 agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByUuid_C_First(
        java.lang.String uuid, long companyId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUuid_C_First(uuid, companyId, orderByComparator);
    }

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

    /**
    * Returns the last agendamento 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 agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento 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 agendamentos before and after the current agendamento in the ordered set where uuid = &#63; and companyId = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @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 agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByUuid_C_PrevAndNext(
        long agendamentoId, java.lang.String uuid, long companyId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUuid_C_PrevAndNext(agendamentoId, uuid, companyId,
            orderByComparator);
    }

    /**
    * Removes all the agendamentos 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 agendamentos where uuid = &#63; and companyId = &#63;.
    *
    * @param uuid the uuid
    * @param companyId the company ID
    * @return the number of matching agendamentos
    * @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 agendamentos where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipo(
        long mensagemId, int tipoAgendamento)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByMensagemTipo(mensagemId, tipoAgendamento);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipo(
        long mensagemId, int tipoAgendamento, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipo(mensagemId, tipoAgendamento, start, end);
    }

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

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemTipo_First(
        long mensagemId, int tipoAgendamento,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipo_First(mensagemId, tipoAgendamento,
            orderByComparator);
    }

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

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemTipo_Last(
        long mensagemId, int tipoAgendamento,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipo_Last(mensagemId, tipoAgendamento,
            orderByComparator);
    }

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

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByMensagemTipo_PrevAndNext(
        long agendamentoId, long mensagemId, int tipoAgendamento,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipo_PrevAndNext(agendamentoId, mensagemId,
            tipoAgendamento, orderByComparator);
    }

    /**
    * Removes all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; from the database.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @throws SystemException if a system exception occurred
    */
    public static void removeByMensagemTipo(long mensagemId, int tipoAgendamento)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByMensagemTipo(mensagemId, tipoAgendamento);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByMensagemTipo(long mensagemId, int tipoAgendamento)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByMensagemTipo(mensagemId, tipoAgendamento);
    }

    /**
    * Returns all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipoMultipo(
        long mensagemId, int tipoAgendamento)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo(mensagemId, tipoAgendamento);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipoMultipo(
        long mensagemId, int tipoAgendamento, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo(mensagemId, tipoAgendamento,
            start, end);
    }

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

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemTipoMultipo_First(
        long mensagemId, int tipoAgendamento,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo_First(mensagemId,
            tipoAgendamento, orderByComparator);
    }

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

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemTipoMultipo_Last(
        long mensagemId, int tipoAgendamento,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo_Last(mensagemId, tipoAgendamento,
            orderByComparator);
    }

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

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByMensagemTipoMultipo_PrevAndNext(
        long agendamentoId, long mensagemId, int tipoAgendamento,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo_PrevAndNext(agendamentoId,
            mensagemId, tipoAgendamento, orderByComparator);
    }

    /**
    * Returns all the agendamentos where mensagemId = &#63; and tipoAgendamento = 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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipoMultipo(
        long mensagemId, int[] tipoAgendamentos)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo(mensagemId, tipoAgendamentos);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = 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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipoMultipo(
        long mensagemId, int[] tipoAgendamentos, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo(mensagemId, tipoAgendamentos,
            start, end);
    }

    /**
    * Returns an ordered range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = 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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemTipoMultipo(
        long mensagemId, int[] tipoAgendamentos, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemTipoMultipo(mensagemId, tipoAgendamentos,
            start, end, orderByComparator);
    }

    /**
    * Removes all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; from the database.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @throws SystemException if a system exception occurred
    */
    public static void removeByMensagemTipoMultipo(long mensagemId,
        int tipoAgendamento)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByMensagemTipoMultipo(mensagemId, tipoAgendamento);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and tipoAgendamento = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByMensagemTipoMultipo(long mensagemId,
        int tipoAgendamento)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByMensagemTipoMultipo(mensagemId, tipoAgendamento);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and tipoAgendamento = any &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByMensagemTipoMultipo(long mensagemId,
        int[] tipoAgendamentos)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByMensagemTipoMultipo(mensagemId, tipoAgendamentos);
    }

    /**
    * Returns all the agendamentos where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemDataCalendario(
        long mensagemId, java.util.Date dataCalendario)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemDataCalendario(mensagemId, dataCalendario);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and dataCalendario = &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemDataCalendario(
        long mensagemId, java.util.Date dataCalendario, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemDataCalendario(mensagemId, dataCalendario,
            start, end);
    }

    /**
    * Returns an ordered range of all the agendamentos where mensagemId = &#63; and dataCalendario = &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemDataCalendario(
        long mensagemId, java.util.Date dataCalendario, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemDataCalendario(mensagemId, dataCalendario,
            start, end, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemDataCalendario_First(
        long mensagemId, java.util.Date dataCalendario,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemDataCalendario_First(mensagemId,
            dataCalendario, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchByMensagemDataCalendario_First(
        long mensagemId, java.util.Date dataCalendario,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByMensagemDataCalendario_First(mensagemId,
            dataCalendario, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemDataCalendario_Last(
        long mensagemId, java.util.Date dataCalendario,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemDataCalendario_Last(mensagemId,
            dataCalendario, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchByMensagemDataCalendario_Last(
        long mensagemId, java.util.Date dataCalendario,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByMensagemDataCalendario_Last(mensagemId,
            dataCalendario, orderByComparator);
    }

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByMensagemDataCalendario_PrevAndNext(
        long agendamentoId, long mensagemId, java.util.Date dataCalendario,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemDataCalendario_PrevAndNext(agendamentoId,
            mensagemId, dataCalendario, orderByComparator);
    }

    /**
    * Removes all the agendamentos where mensagemId = &#63; and dataCalendario = &#63; from the database.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @throws SystemException if a system exception occurred
    */
    public static void removeByMensagemDataCalendario(long mensagemId,
        java.util.Date dataCalendario)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence()
            .removeByMensagemDataCalendario(mensagemId, dataCalendario);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and dataCalendario = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param dataCalendario the data calendario
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByMensagemDataCalendario(long mensagemId,
        java.util.Date dataCalendario)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByMensagemDataCalendario(mensagemId, dataCalendario);
    }

    /**
    * Returns all the agendamentos where situacaoEnvio = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findBySituacao(
        int situacaoEnvio)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findBySituacao(situacaoEnvio);
    }

    /**
    * Returns a range of all the agendamentos where situacaoEnvio = &#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.AgendamentoModelImpl}. 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 situacaoEnvio the situacao envio
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findBySituacao(
        int situacaoEnvio, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findBySituacao(situacaoEnvio, start, end);
    }

    /**
    * Returns an ordered range of all the agendamentos where situacaoEnvio = &#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.AgendamentoModelImpl}. 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 situacaoEnvio the situacao envio
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findBySituacao(
        int situacaoEnvio, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacao(situacaoEnvio, start, end, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where situacaoEnvio = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findBySituacao_First(
        int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacao_First(situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where situacaoEnvio = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchBySituacao_First(
        int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchBySituacao_First(situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where situacaoEnvio = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findBySituacao_Last(
        int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacao_Last(situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where situacaoEnvio = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchBySituacao_Last(
        int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchBySituacao_Last(situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where situacaoEnvio = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findBySituacao_PrevAndNext(
        long agendamentoId, int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacao_PrevAndNext(agendamentoId, situacaoEnvio,
            orderByComparator);
    }

    /**
    * Removes all the agendamentos where situacaoEnvio = &#63; from the database.
    *
    * @param situacaoEnvio the situacao envio
    * @throws SystemException if a system exception occurred
    */
    public static void removeBySituacao(int situacaoEnvio)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeBySituacao(situacaoEnvio);
    }

    /**
    * Returns the number of agendamentos where situacaoEnvio = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countBySituacao(int situacaoEnvio)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countBySituacao(situacaoEnvio);
    }

    /**
    * Returns all the agendamentos where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findBySituacaoMensagem(
        int situacaoEnvio, long mensagemId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findBySituacaoMensagem(situacaoEnvio, mensagemId);
    }

    /**
    * Returns a range of all the agendamentos where situacaoEnvio = &#63; and mensagemId = &#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.AgendamentoModelImpl}. 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 situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findBySituacaoMensagem(
        int situacaoEnvio, long mensagemId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacaoMensagem(situacaoEnvio, mensagemId, start, end);
    }

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

    /**
    * Returns the first agendamento in the ordered set where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findBySituacaoMensagem_First(
        int situacaoEnvio, long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacaoMensagem_First(situacaoEnvio, mensagemId,
            orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchBySituacaoMensagem_First(
        int situacaoEnvio, long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchBySituacaoMensagem_First(situacaoEnvio, mensagemId,
            orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findBySituacaoMensagem_Last(
        int situacaoEnvio, long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacaoMensagem_Last(situacaoEnvio, mensagemId,
            orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchBySituacaoMensagem_Last(
        int situacaoEnvio, long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchBySituacaoMensagem_Last(situacaoEnvio, mensagemId,
            orderByComparator);
    }

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findBySituacaoMensagem_PrevAndNext(
        long agendamentoId, int situacaoEnvio, long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySituacaoMensagem_PrevAndNext(agendamentoId,
            situacaoEnvio, mensagemId, orderByComparator);
    }

    /**
    * Removes all the agendamentos where situacaoEnvio = &#63; and mensagemId = &#63; from the database.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @throws SystemException if a system exception occurred
    */
    public static void removeBySituacaoMensagem(int situacaoEnvio,
        long mensagemId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeBySituacaoMensagem(situacaoEnvio, mensagemId);
    }

    /**
    * Returns the number of agendamentos where situacaoEnvio = &#63; and mensagemId = &#63;.
    *
    * @param situacaoEnvio the situacao envio
    * @param mensagemId the mensagem ID
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countBySituacaoMensagem(int situacaoEnvio, long mensagemId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countBySituacaoMensagem(situacaoEnvio, mensagemId);
    }

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

    /**
    * Returns a range of all the agendamentos where mensagemId = &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemId(
        long mensagemId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByMensagemId(mensagemId, start, end);
    }

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

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemId_First(
        long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemId_First(mensagemId, orderByComparator);
    }

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

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemId_Last(
        long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemId_Last(mensagemId, orderByComparator);
    }

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

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where mensagemId = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param mensagemId the mensagem ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByMensagemId_PrevAndNext(
        long agendamentoId, long mensagemId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemId_PrevAndNext(agendamentoId, mensagemId,
            orderByComparator);
    }

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

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

    /**
    * Returns all the agendamentos where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemIdSituacaoEnvio(
        long mensagemId, int situacaoEnvio)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemIdSituacaoEnvio(mensagemId, situacaoEnvio);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and situacaoEnvio = &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByMensagemIdSituacaoEnvio(
        long mensagemId, int situacaoEnvio, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemIdSituacaoEnvio(mensagemId, situacaoEnvio,
            start, end);
    }

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

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemIdSituacaoEnvio_First(
        long mensagemId, int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemIdSituacaoEnvio_First(mensagemId,
            situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchByMensagemIdSituacaoEnvio_First(
        long mensagemId, int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByMensagemIdSituacaoEnvio_First(mensagemId,
            situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByMensagemIdSituacaoEnvio_Last(
        long mensagemId, int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemIdSituacaoEnvio_Last(mensagemId,
            situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchByMensagemIdSituacaoEnvio_Last(
        long mensagemId, int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByMensagemIdSituacaoEnvio_Last(mensagemId,
            situacaoEnvio, orderByComparator);
    }

    /**
    * Returns the agendamentos before and after the current agendamento in the ordered set where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param agendamentoId the primary key of the current agendamento
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento[] findByMensagemIdSituacaoEnvio_PrevAndNext(
        long agendamentoId, long mensagemId, int situacaoEnvio,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByMensagemIdSituacaoEnvio_PrevAndNext(agendamentoId,
            mensagemId, situacaoEnvio, orderByComparator);
    }

    /**
    * Removes all the agendamentos where mensagemId = &#63; and situacaoEnvio = &#63; from the database.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @throws SystemException if a system exception occurred
    */
    public static void removeByMensagemIdSituacaoEnvio(long mensagemId,
        int situacaoEnvio)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence()
            .removeByMensagemIdSituacaoEnvio(mensagemId, situacaoEnvio);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and situacaoEnvio = &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param situacaoEnvio the situacao envio
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByMensagemIdSituacaoEnvio(long mensagemId,
        int situacaoEnvio)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByMensagemIdSituacaoEnvio(mensagemId, situacaoEnvio);
    }

    /**
    * Returns all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByAgendamentoExclusao(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao(mensagemId, tipoAgendamento,
            situacaoEnvio, agendamentoId);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByAgendamentoExclusao(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao(mensagemId, tipoAgendamento,
            situacaoEnvio, agendamentoId, start, end);
    }

    /**
    * Returns an ordered range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByAgendamentoExclusao(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao(mensagemId, tipoAgendamento,
            situacaoEnvio, agendamentoId, start, end, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByAgendamentoExclusao_First(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao_First(mensagemId,
            tipoAgendamento, situacaoEnvio, agendamentoId, orderByComparator);
    }

    /**
    * Returns the first agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchByAgendamentoExclusao_First(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByAgendamentoExclusao_First(mensagemId,
            tipoAgendamento, situacaoEnvio, agendamentoId, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento findByAgendamentoExclusao_Last(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao_Last(mensagemId, tipoAgendamento,
            situacaoEnvio, agendamentoId, orderByComparator);
    }

    /**
    * Returns the last agendamento in the ordered set where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching agendamento, or <code>null</code> if a matching agendamento could not be found
    * @throws SystemException if a system exception occurred
    */
    public static br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento fetchByAgendamentoExclusao_Last(
        long mensagemId, int tipoAgendamento, int situacaoEnvio,
        long agendamentoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByAgendamentoExclusao_Last(mensagemId,
            tipoAgendamento, situacaoEnvio, agendamentoId, orderByComparator);
    }

    /**
    * Returns all the agendamentos where mensagemId = &#63; and tipoAgendamento = any &#63; and situacaoEnvio = &#63; and agendamentoId &ne; all &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @param situacaoEnvio the situacao envio
    * @param agendamentoIds the agendamento IDs
    * @return the matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByAgendamentoExclusao(
        long mensagemId, int[] tipoAgendamentos, int situacaoEnvio,
        long[] agendamentoIds)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao(mensagemId, tipoAgendamentos,
            situacaoEnvio, agendamentoIds);
    }

    /**
    * Returns a range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = any &#63; and situacaoEnvio = &#63; and agendamentoId &ne; all &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @param situacaoEnvio the situacao envio
    * @param agendamentoIds the agendamento IDs
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @return the range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByAgendamentoExclusao(
        long mensagemId, int[] tipoAgendamentos, int situacaoEnvio,
        long[] agendamentoIds, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao(mensagemId, tipoAgendamentos,
            situacaoEnvio, agendamentoIds, start, end);
    }

    /**
    * Returns an ordered range of all the agendamentos where mensagemId = &#63; and tipoAgendamento = any &#63; and situacaoEnvio = &#63; and agendamentoId &ne; all &#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.AgendamentoModelImpl}. 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 mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @param situacaoEnvio the situacao envio
    * @param agendamentoIds the agendamento IDs
    * @param start the lower bound of the range of agendamentos
    * @param end the upper bound of the range of agendamentos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<br.mp.mprj.portal.portlet.gestaomensagens.service.model.Agendamento> findByAgendamentoExclusao(
        long mensagemId, int[] tipoAgendamentos, int situacaoEnvio,
        long[] agendamentoIds, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByAgendamentoExclusao(mensagemId, tipoAgendamentos,
            situacaoEnvio, agendamentoIds, start, end, orderByComparator);
    }

    /**
    * Removes all the agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63; from the database.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @throws SystemException if a system exception occurred
    */
    public static void removeByAgendamentoExclusao(long mensagemId,
        int tipoAgendamento, int situacaoEnvio, long agendamentoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence()
            .removeByAgendamentoExclusao(mensagemId, tipoAgendamento,
            situacaoEnvio, agendamentoId);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and tipoAgendamento = &#63; and situacaoEnvio = &#63; and agendamentoId &ne; &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamento the tipo agendamento
    * @param situacaoEnvio the situacao envio
    * @param agendamentoId the agendamento ID
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByAgendamentoExclusao(long mensagemId,
        int tipoAgendamento, int situacaoEnvio, long agendamentoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByAgendamentoExclusao(mensagemId, tipoAgendamento,
            situacaoEnvio, agendamentoId);
    }

    /**
    * Returns the number of agendamentos where mensagemId = &#63; and tipoAgendamento = any &#63; and situacaoEnvio = &#63; and agendamentoId &ne; all &#63;.
    *
    * @param mensagemId the mensagem ID
    * @param tipoAgendamentos the tipo agendamentos
    * @param situacaoEnvio the situacao envio
    * @param agendamentoIds the agendamento IDs
    * @return the number of matching agendamentos
    * @throws SystemException if a system exception occurred
    */
    public static int countByAgendamentoExclusao(long mensagemId,
        int[] tipoAgendamentos, int situacaoEnvio, long[] agendamentoIds)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .countByAgendamentoExclusao(mensagemId, tipoAgendamentos,
            situacaoEnvio, agendamentoIds);
    }

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

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

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

    /**
    * Removes the agendamento with the primary key from the database. Also notifies the appropriate model listeners.
    *
    * @param agendamentoId the primary key of the agendamento
    * @return the agendamento that was removed
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento remove(
        long agendamentoId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().remove(agendamentoId);
    }

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

    /**
    * Returns the agendamento with the primary key or throws a {@link br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException} if it could not be found.
    *
    * @param agendamentoId the primary key of the agendamento
    * @return the agendamento
    * @throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException if a agendamento 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.Agendamento findByPrimaryKey(
        long agendamentoId)
        throws br.mp.mprj.portal.portlet.gestaomensagens.service.NoSuchAgendamentoException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByPrimaryKey(agendamentoId);
    }

    /**
    * Returns the agendamento with the primary key or returns <code>null</code> if it could not be found.
    *
    * @param agendamentoId the primary key of the agendamento
    * @return the agendamento, or <code>null</code> if a agendamento 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.Agendamento fetchByPrimaryKey(
        long agendamentoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByPrimaryKey(agendamentoId);
    }

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

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

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

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

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

        return _persistence;
    }

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