public class CTMessageUtil
extends java.lang.Object
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
CTMessagePersistence
Constructor and Description |
---|
CTMessageUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CTMessage ctMessage)
Caches the ct message in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CTMessage> ctMessages)
Caches the ct messages in the entity cache if it is enabled.
|
static void |
clearCache() |
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 returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CTMessage> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CTMessage> |
findAll()
Returns all the ct messages.
|
static java.util.List<CTMessage> |
findAll(int start,
int end)
Returns a range of all the ct messages.
|
static java.util.List<CTMessage> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
Returns an ordered range of all the ct messages.
|
static java.util.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.
|
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 java.util.List<CTMessage> |
findByCtCollectionId(long ctCollectionId)
Returns all the ct messages where ctCollectionId = ?.
|
static java.util.List<CTMessage> |
findByCtCollectionId(long ctCollectionId,
int start,
int end)
Returns a range of all the ct messages where ctCollectionId = ?.
|
static java.util.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 = ?.
|
static java.util.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 = ?.
|
static CTMessage |
findByPrimaryKey(long ctMessageId)
Returns the ct message with the primary key or throws a
NoSuchMessageException if it could not be found. |
static java.util.List<CTMessage> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CTMessage> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CTMessage> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) |
static CTMessagePersistence |
getPersistence() |
static CTMessage |
remove(long ctMessageId)
Removes the ct message with the primary key from the database.
|
static void |
removeAll()
Removes all the ct messages from the database.
|
static void |
removeByCtCollectionId(long ctCollectionId)
Removes all the ct messages where ctCollectionId = ? from the database.
|
static CTMessage |
update(CTMessage ctMessage) |
static CTMessage |
update(CTMessage ctMessage,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CTMessage |
updateImpl(CTMessage ctMessage) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CTMessage ctMessage)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,CTMessage> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CTMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CTMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CTMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CTMessage update(CTMessage ctMessage)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CTMessage update(CTMessage ctMessage, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CTMessage> findByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static java.util.List<CTMessage> findByCtCollectionId(long ctCollectionId, int start, int end)
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
.
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)public static java.util.List<CTMessage> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
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
.
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 (optionally null
)public static java.util.List<CTMessage> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static CTMessage findByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) throws NoSuchMessageException
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching ct message could not be foundpublic static CTMessage fetchByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct message could not be foundpublic static CTMessage findByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) throws NoSuchMessageException
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching ct message could not be foundpublic static CTMessage fetchByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct message could not be foundpublic static CTMessage[] findByCtCollectionId_PrevAndNext(long ctMessageId, long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator) throws NoSuchMessageException
ctMessageId
- the primary key of the current ct messagectCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a ct message with the primary key could not be foundpublic static void removeByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static int countByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static void cacheResult(CTMessage ctMessage)
ctMessage
- the ct messagepublic static void cacheResult(java.util.List<CTMessage> ctMessages)
ctMessages
- the ct messagespublic static CTMessage create(long ctMessageId)
ctMessageId
- the primary key for the new ct messagepublic static CTMessage remove(long ctMessageId) throws NoSuchMessageException
ctMessageId
- the primary key of the ct messageNoSuchMessageException
- if a ct message with the primary key could not be foundpublic static CTMessage findByPrimaryKey(long ctMessageId) throws NoSuchMessageException
NoSuchMessageException
if it could not be found.ctMessageId
- the primary key of the ct messageNoSuchMessageException
- if a ct message with the primary key could not be foundpublic static CTMessage fetchByPrimaryKey(long ctMessageId)
null
if it could not be found.ctMessageId
- the primary key of the ct messagenull
if a ct message with the primary key could not be foundpublic static java.util.List<CTMessage> findAll()
public static java.util.List<CTMessage> findAll(int start, int end)
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
.
start
- the lower bound of the range of ct messagesend
- the upper bound of the range of ct messages (not inclusive)public static java.util.List<CTMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator)
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
.
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 (optionally null
)public static java.util.List<CTMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTMessage> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static CTMessagePersistence getPersistence()