public class CTCommentUtil
extends java.lang.Object
com.liferay.change.tracking.service.persistence.impl.CTCommentPersistenceImpl
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
CTCommentPersistence
Constructor and Description |
---|
CTCommentUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CTComment ctComment)
Caches the ct comment in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CTComment> ctComments)
Caches the ct comments in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CTComment ctComment) |
static int |
countAll()
Returns the number of ct comments.
|
static int |
countByCtCollectionId(long ctCollectionId)
Returns the number of ct comments where ctCollectionId = ?.
|
static int |
countByCtEntryId(long ctEntryId)
Returns the number of ct comments where ctEntryId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CTComment |
create(long ctCommentId)
Creates a new ct comment with the primary key.
|
static CTComment |
fetchByCtCollectionId_First(long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the first ct comment in the ordered set where ctCollectionId = ?.
|
static CTComment |
fetchByCtCollectionId_Last(long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the last ct comment in the ordered set where ctCollectionId = ?.
|
static CTComment |
fetchByCtEntryId_First(long ctEntryId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the first ct comment in the ordered set where ctEntryId = ?.
|
static CTComment |
fetchByCtEntryId_Last(long ctEntryId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the last ct comment in the ordered set where ctEntryId = ?.
|
static CTComment |
fetchByPrimaryKey(long ctCommentId)
Returns the ct comment with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CTComment> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CTComment> |
findAll()
Returns all the ct comments.
|
static java.util.List<CTComment> |
findAll(int start,
int end)
Returns a range of all the ct comments.
|
static java.util.List<CTComment> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns an ordered range of all the ct comments.
|
static java.util.List<CTComment> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ct comments.
|
static CTComment |
findByCtCollectionId_First(long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the first ct comment in the ordered set where ctCollectionId = ?.
|
static CTComment |
findByCtCollectionId_Last(long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the last ct comment in the ordered set where ctCollectionId = ?.
|
static CTComment[] |
findByCtCollectionId_PrevAndNext(long ctCommentId,
long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the ct comments before and after the current ct comment in the ordered set where ctCollectionId = ?.
|
static java.util.List<CTComment> |
findByCtCollectionId(long ctCollectionId)
Returns all the ct comments where ctCollectionId = ?.
|
static java.util.List<CTComment> |
findByCtCollectionId(long ctCollectionId,
int start,
int end)
Returns a range of all the ct comments where ctCollectionId = ?.
|
static java.util.List<CTComment> |
findByCtCollectionId(long ctCollectionId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns an ordered range of all the ct comments where ctCollectionId = ?.
|
static java.util.List<CTComment> |
findByCtCollectionId(long ctCollectionId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ct comments where ctCollectionId = ?.
|
static CTComment |
findByCtEntryId_First(long ctEntryId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the first ct comment in the ordered set where ctEntryId = ?.
|
static CTComment |
findByCtEntryId_Last(long ctEntryId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the last ct comment in the ordered set where ctEntryId = ?.
|
static CTComment[] |
findByCtEntryId_PrevAndNext(long ctCommentId,
long ctEntryId,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns the ct comments before and after the current ct comment in the ordered set where ctEntryId = ?.
|
static java.util.List<CTComment> |
findByCtEntryId(long ctEntryId)
Returns all the ct comments where ctEntryId = ?.
|
static java.util.List<CTComment> |
findByCtEntryId(long ctEntryId,
int start,
int end)
Returns a range of all the ct comments where ctEntryId = ?.
|
static java.util.List<CTComment> |
findByCtEntryId(long ctEntryId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
Returns an ordered range of all the ct comments where ctEntryId = ?.
|
static java.util.List<CTComment> |
findByCtEntryId(long ctEntryId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ct comments where ctEntryId = ?.
|
static CTComment |
findByPrimaryKey(long ctCommentId)
Returns the ct comment with the primary key or throws a
NoSuchCommentException if it could not be found. |
static java.util.List<CTComment> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CTComment> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CTComment> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) |
static CTCommentPersistence |
getPersistence() |
static CTComment |
remove(long ctCommentId)
Removes the ct comment with the primary key from the database.
|
static void |
removeAll()
Removes all the ct comments from the database.
|
static void |
removeByCtCollectionId(long ctCollectionId)
Removes all the ct comments where ctCollectionId = ? from the database.
|
static void |
removeByCtEntryId(long ctEntryId)
Removes all the ct comments where ctEntryId = ? from the database.
|
static CTComment |
update(CTComment ctComment) |
static CTComment |
update(CTComment ctComment,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CTComment |
updateImpl(CTComment ctComment) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CTComment ctComment)
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,CTComment> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CTComment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CTComment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CTComment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CTComment update(CTComment ctComment)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CTComment update(CTComment ctComment, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CTComment> findByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static java.util.List<CTComment> 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 CTCommentModelImpl
.
ctCollectionId
- the ct collection IDstart
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)public static java.util.List<CTComment> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> 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 CTCommentModelImpl
.
ctCollectionId
- the ct collection IDstart
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CTComment> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> 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 CTCommentModelImpl
.
ctCollectionId
- the ct collection IDstart
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CTComment findByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCommentException
- if a matching ct comment could not be foundpublic static CTComment fetchByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct comment could not be foundpublic static CTComment findByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCommentException
- if a matching ct comment could not be foundpublic static CTComment fetchByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct comment could not be foundpublic static CTComment[] findByCtCollectionId_PrevAndNext(long ctCommentId, long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException
ctCommentId
- the primary key of the current ct commentctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCommentException
- if a ct comment 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 java.util.List<CTComment> findByCtEntryId(long ctEntryId)
ctEntryId
- the ct entry IDpublic static java.util.List<CTComment> findByCtEntryId(long ctEntryId, 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 CTCommentModelImpl
.
ctEntryId
- the ct entry IDstart
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)public static java.util.List<CTComment> findByCtEntryId(long ctEntryId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> 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 CTCommentModelImpl
.
ctEntryId
- the ct entry IDstart
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CTComment> findByCtEntryId(long ctEntryId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> 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 CTCommentModelImpl
.
ctEntryId
- the ct entry IDstart
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CTComment findByCtEntryId_First(long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCommentException
- if a matching ct comment could not be foundpublic static CTComment fetchByCtEntryId_First(long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct comment could not be foundpublic static CTComment findByCtEntryId_Last(long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCommentException
- if a matching ct comment could not be foundpublic static CTComment fetchByCtEntryId_Last(long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator)
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct comment could not be foundpublic static CTComment[] findByCtEntryId_PrevAndNext(long ctCommentId, long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException
ctCommentId
- the primary key of the current ct commentctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCommentException
- if a ct comment with the primary key could not be foundpublic static void removeByCtEntryId(long ctEntryId)
ctEntryId
- the ct entry IDpublic static int countByCtEntryId(long ctEntryId)
ctEntryId
- the ct entry IDpublic static void cacheResult(CTComment ctComment)
ctComment
- the ct commentpublic static void cacheResult(java.util.List<CTComment> ctComments)
ctComments
- the ct commentspublic static CTComment create(long ctCommentId)
ctCommentId
- the primary key for the new ct commentpublic static CTComment remove(long ctCommentId) throws NoSuchCommentException
ctCommentId
- the primary key of the ct commentNoSuchCommentException
- if a ct comment with the primary key could not be foundpublic static CTComment findByPrimaryKey(long ctCommentId) throws NoSuchCommentException
NoSuchCommentException
if it could not be found.ctCommentId
- the primary key of the ct commentNoSuchCommentException
- if a ct comment with the primary key could not be foundpublic static CTComment fetchByPrimaryKey(long ctCommentId)
null
if it could not be found.ctCommentId
- the primary key of the ct commentnull
if a ct comment with the primary key could not be foundpublic static java.util.List<CTComment> findAll()
public static java.util.List<CTComment> 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 CTCommentModelImpl
.
start
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)public static java.util.List<CTComment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> 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 CTCommentModelImpl
.
start
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CTComment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> 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 CTCommentModelImpl
.
start
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (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 CTCommentPersistence getPersistence()