Class CTMessageUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cacheResult
(CTMessage ctMessage) Caches the ct message in the entity cache if it is enabled.static void
cacheResult
(List<CTMessage> ctMessages) Caches the ct messages in the entity cache if it is enabled.static void
static void
clearCache
(CTMessage ctMessage) static int
countAll()
Returns the number of ct messages.static int
countByCtCollectionId
(long ctCollectionId) Returns the number of ct messages where ctCollectionId = ?.static long
countWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static CTMessage
create
(long ctMessageId) Creates a new ct message with the primary key.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 = ?.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 = ?.static CTMessage
fetchByPrimaryKey
(long ctMessageId) Returns the ct message with the primary key or returnsnull
if it could not be found.static Map<Serializable,
CTMessage> fetchByPrimaryKeys
(Set<Serializable> primaryKeys) findAll()
Returns all the ct messages.findAll
(int start, int end) Returns a range of all the ct messages.findAll
(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) Returns an ordered range of all the ct messages.findAll
(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator, boolean useFinderCache) Returns an ordered range of all the ct messages.findByCtCollectionId
(long ctCollectionId) Returns all the ct messages where ctCollectionId = ?.findByCtCollectionId
(long ctCollectionId, int start, int end) Returns a range of all the ct messages where ctCollectionId = ?.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 = ?.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 = ?.static CTMessage
findByCtCollectionId_First
(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) Returns the first ct message in the ordered set where ctCollectionId = ?.static CTMessage
findByCtCollectionId_Last
(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) Returns the last ct message in the ordered set where ctCollectionId = ?.static CTMessage[]
findByCtCollectionId_PrevAndNext
(long ctMessageId, long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) Returns the ct messages before and after the current ct message in the ordered set where ctCollectionId = ?.static CTMessage
findByPrimaryKey
(long ctMessageId) Returns the ct message with the primary key or throws aNoSuchMessageException
if it could not be found.findWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) findWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) findWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) static CTMessagePersistence
static CTMessage
remove
(long ctMessageId) Removes the ct message with the primary key from the database.static void
Removes all the ct messages from the database.static void
removeByCtCollectionId
(long ctCollectionId) Removes all the ct messages where ctCollectionId = ? from the database.static void
setPersistence
(CTMessagePersistence persistence) static CTMessage
static CTMessage
static CTMessage
updateImpl
(CTMessage ctMessage)
-
Constructor Details
-
CTMessageUtil
public CTMessageUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
BasePersistence.clearCache()
-
clearCache
- 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
- 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
- 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
Returns all the ct messages where ctCollectionId = ?.- Parameters:
ctCollectionId
- the ct collection ID- Returns:
- the matching ct messages
-
findByCtCollectionId
Returns a range of all the ct messages where ctCollectionId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCTMessageModelImpl
.- Parameters:
ctCollectionId
- the ct collection IDstart
- the lower bound of the range of ct messagesend
- 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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCTMessageModelImpl
.- Parameters:
ctCollectionId
- the ct collection IDstart
- the lower bound of the range of ct messagesend
- the upper bound of the range of ct messages (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- 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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCTMessageModelImpl
.- Parameters:
ctCollectionId
- the ct collection IDstart
- the lower bound of the range of ct messagesend
- the upper bound of the range of ct messages (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching ct message
- Throws:
NoSuchMessageException
- if a matching ct message could not be foundNoSuchMessageException
-
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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- 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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching ct message
- Throws:
NoSuchMessageException
- if a matching ct message could not be foundNoSuchMessageException
-
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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- 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 messagectCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next ct message
- Throws:
NoSuchMessageException
- if a ct message with the primary key could not be foundNoSuchMessageException
-
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
Caches the ct message in the entity cache if it is enabled.- Parameters:
ctMessage
- the ct message
-
cacheResult
Caches the ct messages in the entity cache if it is enabled.- Parameters:
ctMessages
- the ct messages
-
create
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
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 foundNoSuchMessageException
-
updateImpl
-
findByPrimaryKey
Returns the ct message with the primary key or throws aNoSuchMessageException
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 foundNoSuchMessageException
-
fetchByPrimaryKey
Returns the ct message with the primary key or returnsnull
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
Returns all the ct messages.- Returns:
- the ct messages
-
findAll
Returns a range of all the ct messages.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCTMessageModelImpl
.- Parameters:
start
- the lower bound of the range of ct messagesend
- 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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCTMessageModelImpl
.- Parameters:
start
- the lower bound of the range of ct messagesend
- the upper bound of the range of ct messages (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- 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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCTMessageModelImpl
.- Parameters:
start
- the lower bound of the range of ct messagesend
- the upper bound of the range of ct messages (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)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
-
setPersistence
-