Class AnnouncementsDeliveryUtil

Object
com.liferay.announcements.kernel.service.persistence.AnnouncementsDeliveryUtil

public class AnnouncementsDeliveryUtil extends Object
The persistence utility for the announcements delivery service. This utility wraps com.liferay.portlet.announcements.service.persistence.impl.AnnouncementsDeliveryPersistenceImpl 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.

Caching information and settings can be found in portal.properties

Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Constructor Details

    • AnnouncementsDeliveryUtil

      public AnnouncementsDeliveryUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
    • clearCache

      public static void clearCache(AnnouncementsDelivery announcementsDelivery)
      See Also:
    • countWithDynamicQuery

      public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
      See Also:
    • fetchByPrimaryKeys

      public static Map<Serializable,AnnouncementsDelivery> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
    • findWithDynamicQuery

      public static List<AnnouncementsDelivery> findWithDynamicQuery(DynamicQuery dynamicQuery)
      See Also:
    • findWithDynamicQuery

      public static List<AnnouncementsDelivery> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
      See Also:
    • findWithDynamicQuery

      public static List<AnnouncementsDelivery> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      See Also:
    • update

      public static AnnouncementsDelivery update(AnnouncementsDelivery announcementsDelivery)
      See Also:
    • update

      public static AnnouncementsDelivery update(AnnouncementsDelivery announcementsDelivery, ServiceContext serviceContext)
      See Also:
    • findByCompanyId

      public static List<AnnouncementsDelivery> findByCompanyId(long companyId)
      Returns all the announcements deliveries where companyId = ?.
      Parameters:
      companyId - the company ID
      Returns:
      the matching announcements deliveries
    • findByCompanyId

      public static List<AnnouncementsDelivery> findByCompanyId(long companyId, int start, int end)
      Returns a range of all the announcements deliveries where companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      Returns:
      the range of matching announcements deliveries
    • findByCompanyId

      public static List<AnnouncementsDelivery> findByCompanyId(long companyId, int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns an ordered range of all the announcements deliveries where companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching announcements deliveries
    • findByCompanyId

      public static List<AnnouncementsDelivery> findByCompanyId(long companyId, int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the announcements deliveries where companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching announcements deliveries
    • findByCompanyId_First

      public static AnnouncementsDelivery findByCompanyId_First(long companyId, OrderByComparator<AnnouncementsDelivery> orderByComparator) throws NoSuchDeliveryException
      Returns the first announcements delivery in the ordered set where companyId = ?.
      Parameters:
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching announcements delivery
      Throws:
      NoSuchDeliveryException - if a matching announcements delivery could not be found
      NoSuchDeliveryException
    • fetchByCompanyId_First

      public static AnnouncementsDelivery fetchByCompanyId_First(long companyId, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns the first announcements delivery in the ordered set where companyId = ?.
      Parameters:
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching announcements delivery, or null if a matching announcements delivery could not be found
    • findByCompanyId_Last

      public static AnnouncementsDelivery findByCompanyId_Last(long companyId, OrderByComparator<AnnouncementsDelivery> orderByComparator) throws NoSuchDeliveryException
      Returns the last announcements delivery in the ordered set where companyId = ?.
      Parameters:
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching announcements delivery
      Throws:
      NoSuchDeliveryException - if a matching announcements delivery could not be found
      NoSuchDeliveryException
    • fetchByCompanyId_Last

      public static AnnouncementsDelivery fetchByCompanyId_Last(long companyId, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns the last announcements delivery in the ordered set where companyId = ?.
      Parameters:
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching announcements delivery, or null if a matching announcements delivery could not be found
    • findByCompanyId_PrevAndNext

      public static AnnouncementsDelivery[] findByCompanyId_PrevAndNext(long deliveryId, long companyId, OrderByComparator<AnnouncementsDelivery> orderByComparator) throws NoSuchDeliveryException
      Returns the announcements deliveries before and after the current announcements delivery in the ordered set where companyId = ?.
      Parameters:
      deliveryId - the primary key of the current announcements delivery
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next announcements delivery
      Throws:
      NoSuchDeliveryException - if a announcements delivery with the primary key could not be found
      NoSuchDeliveryException
    • removeByCompanyId

      public static void removeByCompanyId(long companyId)
      Removes all the announcements deliveries where companyId = ? from the database.
      Parameters:
      companyId - the company ID
    • countByCompanyId

      public static int countByCompanyId(long companyId)
      Returns the number of announcements deliveries where companyId = ?.
      Parameters:
      companyId - the company ID
      Returns:
      the number of matching announcements deliveries
    • findByUserId

      public static List<AnnouncementsDelivery> findByUserId(long userId)
      Returns all the announcements deliveries where userId = ?.
      Parameters:
      userId - the user ID
      Returns:
      the matching announcements deliveries
    • findByUserId

      public static List<AnnouncementsDelivery> findByUserId(long userId, int start, int end)
      Returns a range of all the announcements deliveries where userId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      userId - the user ID
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      Returns:
      the range of matching announcements deliveries
    • findByUserId

      public static List<AnnouncementsDelivery> findByUserId(long userId, int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns an ordered range of all the announcements deliveries where userId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      userId - the user ID
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching announcements deliveries
    • findByUserId

      public static List<AnnouncementsDelivery> findByUserId(long userId, int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the announcements deliveries where userId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      userId - the user ID
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching announcements deliveries
    • findByUserId_First

      public static AnnouncementsDelivery findByUserId_First(long userId, OrderByComparator<AnnouncementsDelivery> orderByComparator) throws NoSuchDeliveryException
      Returns the first announcements delivery in the ordered set where userId = ?.
      Parameters:
      userId - the user ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching announcements delivery
      Throws:
      NoSuchDeliveryException - if a matching announcements delivery could not be found
      NoSuchDeliveryException
    • fetchByUserId_First

      public static AnnouncementsDelivery fetchByUserId_First(long userId, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns the first announcements delivery in the ordered set where userId = ?.
      Parameters:
      userId - the user ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching announcements delivery, or null if a matching announcements delivery could not be found
    • findByUserId_Last

      public static AnnouncementsDelivery findByUserId_Last(long userId, OrderByComparator<AnnouncementsDelivery> orderByComparator) throws NoSuchDeliveryException
      Returns the last announcements delivery in the ordered set where userId = ?.
      Parameters:
      userId - the user ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching announcements delivery
      Throws:
      NoSuchDeliveryException - if a matching announcements delivery could not be found
      NoSuchDeliveryException
    • fetchByUserId_Last

      public static AnnouncementsDelivery fetchByUserId_Last(long userId, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns the last announcements delivery in the ordered set where userId = ?.
      Parameters:
      userId - the user ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching announcements delivery, or null if a matching announcements delivery could not be found
    • findByUserId_PrevAndNext

      public static AnnouncementsDelivery[] findByUserId_PrevAndNext(long deliveryId, long userId, OrderByComparator<AnnouncementsDelivery> orderByComparator) throws NoSuchDeliveryException
      Returns the announcements deliveries before and after the current announcements delivery in the ordered set where userId = ?.
      Parameters:
      deliveryId - the primary key of the current announcements delivery
      userId - the user ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next announcements delivery
      Throws:
      NoSuchDeliveryException - if a announcements delivery with the primary key could not be found
      NoSuchDeliveryException
    • removeByUserId

      public static void removeByUserId(long userId)
      Removes all the announcements deliveries where userId = ? from the database.
      Parameters:
      userId - the user ID
    • countByUserId

      public static int countByUserId(long userId)
      Returns the number of announcements deliveries where userId = ?.
      Parameters:
      userId - the user ID
      Returns:
      the number of matching announcements deliveries
    • findByU_T

      public static AnnouncementsDelivery findByU_T(long userId, String type) throws NoSuchDeliveryException
      Returns the announcements delivery where userId = ? and type = ? or throws a NoSuchDeliveryException if it could not be found.
      Parameters:
      userId - the user ID
      type - the type
      Returns:
      the matching announcements delivery
      Throws:
      NoSuchDeliveryException - if a matching announcements delivery could not be found
      NoSuchDeliveryException
    • fetchByU_T

      public static AnnouncementsDelivery fetchByU_T(long userId, String type)
      Returns the announcements delivery where userId = ? and type = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      userId - the user ID
      type - the type
      Returns:
      the matching announcements delivery, or null if a matching announcements delivery could not be found
    • fetchByU_T

      public static AnnouncementsDelivery fetchByU_T(long userId, String type, boolean useFinderCache)
      Returns the announcements delivery where userId = ? and type = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      userId - the user ID
      type - the type
      useFinderCache - whether to use the finder cache
      Returns:
      the matching announcements delivery, or null if a matching announcements delivery could not be found
    • removeByU_T

      public static AnnouncementsDelivery removeByU_T(long userId, String type) throws NoSuchDeliveryException
      Removes the announcements delivery where userId = ? and type = ? from the database.
      Parameters:
      userId - the user ID
      type - the type
      Returns:
      the announcements delivery that was removed
      Throws:
      NoSuchDeliveryException
    • countByU_T

      public static int countByU_T(long userId, String type)
      Returns the number of announcements deliveries where userId = ? and type = ?.
      Parameters:
      userId - the user ID
      type - the type
      Returns:
      the number of matching announcements deliveries
    • cacheResult

      public static void cacheResult(AnnouncementsDelivery announcementsDelivery)
      Caches the announcements delivery in the entity cache if it is enabled.
      Parameters:
      announcementsDelivery - the announcements delivery
    • cacheResult

      public static void cacheResult(List<AnnouncementsDelivery> announcementsDeliveries)
      Caches the announcements deliveries in the entity cache if it is enabled.
      Parameters:
      announcementsDeliveries - the announcements deliveries
    • create

      public static AnnouncementsDelivery create(long deliveryId)
      Creates a new announcements delivery with the primary key. Does not add the announcements delivery to the database.
      Parameters:
      deliveryId - the primary key for the new announcements delivery
      Returns:
      the new announcements delivery
    • remove

      public static AnnouncementsDelivery remove(long deliveryId) throws NoSuchDeliveryException
      Removes the announcements delivery with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      deliveryId - the primary key of the announcements delivery
      Returns:
      the announcements delivery that was removed
      Throws:
      NoSuchDeliveryException - if a announcements delivery with the primary key could not be found
      NoSuchDeliveryException
    • updateImpl

      public static AnnouncementsDelivery updateImpl(AnnouncementsDelivery announcementsDelivery)
    • findByPrimaryKey

      public static AnnouncementsDelivery findByPrimaryKey(long deliveryId) throws NoSuchDeliveryException
      Returns the announcements delivery with the primary key or throws a NoSuchDeliveryException if it could not be found.
      Parameters:
      deliveryId - the primary key of the announcements delivery
      Returns:
      the announcements delivery
      Throws:
      NoSuchDeliveryException - if a announcements delivery with the primary key could not be found
      NoSuchDeliveryException
    • fetchByPrimaryKey

      public static AnnouncementsDelivery fetchByPrimaryKey(long deliveryId)
      Returns the announcements delivery with the primary key or returns null if it could not be found.
      Parameters:
      deliveryId - the primary key of the announcements delivery
      Returns:
      the announcements delivery, or null if a announcements delivery with the primary key could not be found
    • findAll

      public static List<AnnouncementsDelivery> findAll()
      Returns all the announcements deliveries.
      Returns:
      the announcements deliveries
    • findAll

      public static List<AnnouncementsDelivery> findAll(int start, int end)
      Returns a range of all the announcements deliveries.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      Returns:
      the range of announcements deliveries
    • findAll

      public static List<AnnouncementsDelivery> findAll(int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator)
      Returns an ordered range of all the announcements deliveries.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of announcements deliveries
    • findAll

      public static List<AnnouncementsDelivery> findAll(int start, int end, OrderByComparator<AnnouncementsDelivery> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the announcements deliveries.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from AnnouncementsDeliveryModelImpl.

      Parameters:
      start - the lower bound of the range of announcements deliveries
      end - the upper bound of the range of announcements deliveries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of announcements deliveries
    • removeAll

      public static void removeAll()
      Removes all the announcements deliveries from the database.
    • countAll

      public static int countAll()
      Returns the number of announcements deliveries.
      Returns:
      the number of announcements deliveries
    • getPersistence

      public static AnnouncementsDeliveryPersistence getPersistence()
    • setPersistence

      public static void setPersistence(AnnouncementsDeliveryPersistence persistence)