Class AnalyticsMessageUtil

java.lang.Object
com.liferay.analytics.message.storage.service.persistence.AnalyticsMessageUtil

public class AnalyticsMessageUtil extends Object
The persistence utility for the analytics message service. This utility wraps com.liferay.analytics.message.storage.service.persistence.impl.AnalyticsMessagePersistenceImpl 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

See Also:
Generated:
  • Constructor Details

    • AnalyticsMessageUtil

      public AnalyticsMessageUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
      • BasePersistence.clearCache()
    • clearCache

      public static void clearCache(AnalyticsMessage analyticsMessage)
      See Also:
      • BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
    • countWithDynamicQuery

      public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.countWithDynamicQuery(DynamicQuery)
    • fetchByPrimaryKeys

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

      public static List<AnalyticsMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery)
    • findWithDynamicQuery

      public static List<AnalyticsMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
    • findWithDynamicQuery

      public static List<AnalyticsMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
    • update

      public static AnalyticsMessage update(AnalyticsMessage analyticsMessage)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
    • update

      public static AnalyticsMessage update(AnalyticsMessage analyticsMessage, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByCompanyId

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

      public static List<AnalyticsMessage> findByCompanyId(long companyId, int start, int end)
      Returns a range of all the analytics messages 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 AnalyticsMessageModelImpl.

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

      public static List<AnalyticsMessage> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
      Returns an ordered range of all the analytics messages 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 AnalyticsMessageModelImpl.

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

      public static List<AnalyticsMessage> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the analytics messages 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 AnalyticsMessageModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of analytics messages
      end - the upper bound of the range of analytics messages (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 analytics messages
    • findByCompanyId_First

      public static AnalyticsMessage findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) throws NoSuchMessageException
      Returns the first analytics message 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 analytics message
      Throws:
      NoSuchMessageException - if a matching analytics message could not be found
      NoSuchMessageException
    • fetchByCompanyId_First

      public static AnalyticsMessage fetchByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
      Returns the first analytics message 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 analytics message, or null if a matching analytics message could not be found
    • findByCompanyId_Last

      public static AnalyticsMessage findByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) throws NoSuchMessageException
      Returns the last analytics message 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 analytics message
      Throws:
      NoSuchMessageException - if a matching analytics message could not be found
      NoSuchMessageException
    • fetchByCompanyId_Last

      public static AnalyticsMessage fetchByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
      Returns the last analytics message 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 analytics message, or null if a matching analytics message could not be found
    • findByCompanyId_PrevAndNext

      public static AnalyticsMessage[] findByCompanyId_PrevAndNext(long analyticsMessageId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) throws NoSuchMessageException
      Returns the analytics messages before and after the current analytics message in the ordered set where companyId = ?.
      Parameters:
      analyticsMessageId - the primary key of the current analytics message
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next analytics message
      Throws:
      NoSuchMessageException - if a analytics message with the primary key could not be found
      NoSuchMessageException
    • removeByCompanyId

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

      public static int countByCompanyId(long companyId)
      Returns the number of analytics messages where companyId = ?.
      Parameters:
      companyId - the company ID
      Returns:
      the number of matching analytics messages
    • cacheResult

      public static void cacheResult(AnalyticsMessage analyticsMessage)
      Caches the analytics message in the entity cache if it is enabled.
      Parameters:
      analyticsMessage - the analytics message
    • cacheResult

      public static void cacheResult(List<AnalyticsMessage> analyticsMessages)
      Caches the analytics messages in the entity cache if it is enabled.
      Parameters:
      analyticsMessages - the analytics messages
    • create

      public static AnalyticsMessage create(long analyticsMessageId)
      Creates a new analytics message with the primary key. Does not add the analytics message to the database.
      Parameters:
      analyticsMessageId - the primary key for the new analytics message
      Returns:
      the new analytics message
    • remove

      public static AnalyticsMessage remove(long analyticsMessageId) throws NoSuchMessageException
      Removes the analytics message with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      analyticsMessageId - the primary key of the analytics message
      Returns:
      the analytics message that was removed
      Throws:
      NoSuchMessageException - if a analytics message with the primary key could not be found
      NoSuchMessageException
    • updateImpl

      public static AnalyticsMessage updateImpl(AnalyticsMessage analyticsMessage)
    • findByPrimaryKey

      public static AnalyticsMessage findByPrimaryKey(long analyticsMessageId) throws NoSuchMessageException
      Returns the analytics message with the primary key or throws a NoSuchMessageException if it could not be found.
      Parameters:
      analyticsMessageId - the primary key of the analytics message
      Returns:
      the analytics message
      Throws:
      NoSuchMessageException - if a analytics message with the primary key could not be found
      NoSuchMessageException
    • fetchByPrimaryKey

      public static AnalyticsMessage fetchByPrimaryKey(long analyticsMessageId)
      Returns the analytics message with the primary key or returns null if it could not be found.
      Parameters:
      analyticsMessageId - the primary key of the analytics message
      Returns:
      the analytics message, or null if a analytics message with the primary key could not be found
    • findAll

      public static List<AnalyticsMessage> findAll()
      Returns all the analytics messages.
      Returns:
      the analytics messages
    • findAll

      public static List<AnalyticsMessage> findAll(int start, int end)
      Returns a range of all the analytics messages.

      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 AnalyticsMessageModelImpl.

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

      public static List<AnalyticsMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
      Returns an ordered range of all the analytics messages.

      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 AnalyticsMessageModelImpl.

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

      public static List<AnalyticsMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the analytics messages.

      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 AnalyticsMessageModelImpl.

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

      public static void removeAll()
      Removes all the analytics messages from the database.
    • countAll

      public static int countAll()
      Returns the number of analytics messages.
      Returns:
      the number of analytics messages
    • getPersistence

      public static AnalyticsMessagePersistence getPersistence()
    • setPersistence

      public static void setPersistence(AnalyticsMessagePersistence persistence)