java.lang.Object
com.liferay.change.tracking.service.persistence.CTMessageUtil

public class CTMessageUtil extends Object
The persistence utility for the ct message service. This utility wraps com.liferay.change.tracking.service.persistence.impl.CTMessagePersistenceImpl 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

    • CTMessageUtil

      public CTMessageUtil()
  • Method Details

    • clearCache

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

      public static void clearCache(CTMessage ctMessage)
      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,CTMessage> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
      • BasePersistence.fetchByPrimaryKeys(Set)
    • findWithDynamicQuery

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

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

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

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

      public static CTMessage update(CTMessage ctMessage, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByCtCollectionId

      public static List<CTMessage> findByCtCollectionId(long ctCollectionId)
      Returns all the ct messages where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      Returns:
      the matching ct messages
    • findByCtCollectionId

      public static List<CTMessage> findByCtCollectionId(long ctCollectionId, int start, int end)
      Returns a range of all the ct messages where ctCollectionId = ?.

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

      Parameters:
      ctCollectionId - the ct collection ID
      start - the lower bound of the range of ct messages
      end - the upper bound of the range of ct messages (not inclusive)
      Returns:
      the range of matching ct messages
    • findByCtCollectionId

      public static List<CTMessage> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
      Returns an ordered range of all the ct messages where ctCollectionId = ?.

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

      Parameters:
      ctCollectionId - the ct collection ID
      start - the lower bound of the range of ct messages
      end - the upper bound of the range of ct messages (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching ct messages
    • findByCtCollectionId

      public static List<CTMessage> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the ct messages where ctCollectionId = ?.

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

      Parameters:
      ctCollectionId - the ct collection ID
      start - the lower bound of the range of ct messages
      end - the upper bound of the range of ct 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 ct messages
    • findByCtCollectionId_First

      public static CTMessage findByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) throws NoSuchMessageException
      Returns the first ct message in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching ct message
      Throws:
      NoSuchMessageException - if a matching ct message could not be found
      NoSuchMessageException
    • fetchByCtCollectionId_First

      public static CTMessage fetchByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
      Returns the first ct message in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching ct message, or null if a matching ct message could not be found
    • findByCtCollectionId_Last

      public static CTMessage findByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) throws NoSuchMessageException
      Returns the last ct message in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching ct message
      Throws:
      NoSuchMessageException - if a matching ct message could not be found
      NoSuchMessageException
    • fetchByCtCollectionId_Last

      public static CTMessage fetchByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
      Returns the last ct message in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching ct message, or null if a matching ct message could not be found
    • findByCtCollectionId_PrevAndNext

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

      public static void removeByCtCollectionId(long ctCollectionId)
      Removes all the ct messages where ctCollectionId = ? from the database.
      Parameters:
      ctCollectionId - the ct collection ID
    • countByCtCollectionId

      public static int countByCtCollectionId(long ctCollectionId)
      Returns the number of ct messages where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      Returns:
      the number of matching ct messages
    • cacheResult

      public static void cacheResult(CTMessage ctMessage)
      Caches the ct message in the entity cache if it is enabled.
      Parameters:
      ctMessage - the ct message
    • cacheResult

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

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

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

      public static CTMessage updateImpl(CTMessage ctMessage)
    • findByPrimaryKey

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

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

      public static List<CTMessage> findAll()
      Returns all the ct messages.
      Returns:
      the ct messages
    • findAll

      public static List<CTMessage> findAll(int start, int end)
      Returns a range of all the ct 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 CTMessageModelImpl.

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

      public static List<CTMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
      Returns an ordered range of all the ct 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 CTMessageModelImpl.

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

      public static List<CTMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the ct 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 CTMessageModelImpl.

      Parameters:
      start - the lower bound of the range of ct messages
      end - the upper bound of the range of ct 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 ct messages
    • removeAll

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

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

      public static CTMessagePersistence getPersistence()
    • setPersistence

      public static void setPersistence(CTMessagePersistence persistence)