Class CTCommentUtil
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
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cacheResult
(CTComment ctComment) Caches the ct comment in the entity cache if it is enabled.static void
cacheResult
(List<CTComment> ctComments) Caches the ct comments in the entity cache if it is enabled.static void
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 returnsnull
if it could not be found.static Map<Serializable,
CTComment> fetchByPrimaryKeys
(Set<Serializable> primaryKeys) findAll()
Returns all the ct comments.findAll
(int start, int end) Returns a range of all the ct comments.findAll
(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) Returns an ordered range of all the ct comments.findAll
(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator, boolean useFinderCache) Returns an ordered range of all the ct comments.findByCtCollectionId
(long ctCollectionId) Returns all the ct comments where ctCollectionId = ?.findByCtCollectionId
(long ctCollectionId, int start, int end) Returns a range of all the ct comments where ctCollectionId = ?.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 = ?.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
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 = ?.findByCtEntryId
(long ctEntryId) Returns all the ct comments where ctEntryId = ?.findByCtEntryId
(long ctEntryId, int start, int end) Returns a range of all the ct comments where ctEntryId = ?.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 = ?.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
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 CTComment
findByPrimaryKey
(long ctCommentId) Returns the ct comment with the primary key or throws aNoSuchCommentException
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<CTComment> orderByComparator) static CTCommentPersistence
static CTComment
remove
(long ctCommentId) Removes the ct comment with the primary key from the database.static void
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 void
setPersistence
(CTCommentPersistence persistence) static CTComment
static CTComment
static CTComment
updateImpl
(CTComment ctComment)
-
Constructor Details
-
CTCommentUtil
public CTCommentUtil()
-
-
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<CTComment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
BasePersistence.findWithDynamicQuery(DynamicQuery)
-
findWithDynamicQuery
public static List<CTComment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
-
findWithDynamicQuery
public static List<CTComment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) - See Also:
-
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
-
update
- See Also:
-
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
-
update
public static CTComment update(CTComment ctComment, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
-
findByCtCollectionId
Returns all the ct comments where ctCollectionId = ?.- Parameters:
ctCollectionId
- the ct collection ID- Returns:
- the matching ct comments
-
findByCtCollectionId
Returns a range of all the ct comments 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 fromCTCommentModelImpl
.- Parameters:
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)- Returns:
- the range of matching ct comments
-
findByCtCollectionId
public static 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 = ?.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 fromCTCommentModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching ct comments
-
findByCtCollectionId
public static 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 = ?.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 fromCTCommentModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching ct comments
-
findByCtCollectionId_First
public static CTComment findByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException Returns the first ct comment 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 comment
- Throws:
NoSuchCommentException
- if a matching ct comment could not be foundNoSuchCommentException
-
fetchByCtCollectionId_First
public 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 = ?.- Parameters:
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching ct comment, or
null
if a matching ct comment could not be found
-
findByCtCollectionId_Last
public static CTComment findByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException Returns the last ct comment 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 comment
- Throws:
NoSuchCommentException
- if a matching ct comment could not be foundNoSuchCommentException
-
fetchByCtCollectionId_Last
public 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 = ?.- Parameters:
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching ct comment, or
null
if a matching ct comment could not be found
-
findByCtCollectionId_PrevAndNext
public static CTComment[] findByCtCollectionId_PrevAndNext(long ctCommentId, long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException Returns the ct comments before and after the current ct comment in the ordered set where ctCollectionId = ?.- Parameters:
ctCommentId
- the primary key of the current ct commentctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next ct comment
- Throws:
NoSuchCommentException
- if a ct comment with the primary key could not be foundNoSuchCommentException
-
removeByCtCollectionId
public static void removeByCtCollectionId(long ctCollectionId) Removes all the ct comments where ctCollectionId = ? from the database.- Parameters:
ctCollectionId
- the ct collection ID
-
countByCtCollectionId
public static int countByCtCollectionId(long ctCollectionId) Returns the number of ct comments where ctCollectionId = ?.- Parameters:
ctCollectionId
- the ct collection ID- Returns:
- the number of matching ct comments
-
findByCtEntryId
Returns all the ct comments where ctEntryId = ?.- Parameters:
ctEntryId
- the ct entry ID- Returns:
- the matching ct comments
-
findByCtEntryId
Returns a range of all the ct comments where ctEntryId = ?.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 fromCTCommentModelImpl
.- Parameters:
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)- Returns:
- the range of matching ct comments
-
findByCtEntryId
public static 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 = ?.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 fromCTCommentModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching ct comments
-
findByCtEntryId
public static 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 = ?.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 fromCTCommentModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching ct comments
-
findByCtEntryId_First
public static CTComment findByCtEntryId_First(long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException Returns the first ct comment in the ordered set where ctEntryId = ?.- Parameters:
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching ct comment
- Throws:
NoSuchCommentException
- if a matching ct comment could not be foundNoSuchCommentException
-
fetchByCtEntryId_First
public 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 = ?.- Parameters:
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching ct comment, or
null
if a matching ct comment could not be found
-
findByCtEntryId_Last
public static CTComment findByCtEntryId_Last(long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException Returns the last ct comment in the ordered set where ctEntryId = ?.- Parameters:
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching ct comment
- Throws:
NoSuchCommentException
- if a matching ct comment could not be foundNoSuchCommentException
-
fetchByCtEntryId_Last
public 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 = ?.- Parameters:
ctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching ct comment, or
null
if a matching ct comment could not be found
-
findByCtEntryId_PrevAndNext
public static CTComment[] findByCtEntryId_PrevAndNext(long ctCommentId, long ctEntryId, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) throws NoSuchCommentException Returns the ct comments before and after the current ct comment in the ordered set where ctEntryId = ?.- Parameters:
ctCommentId
- the primary key of the current ct commentctEntryId
- the ct entry IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next ct comment
- Throws:
NoSuchCommentException
- if a ct comment with the primary key could not be foundNoSuchCommentException
-
removeByCtEntryId
public static void removeByCtEntryId(long ctEntryId) Removes all the ct comments where ctEntryId = ? from the database.- Parameters:
ctEntryId
- the ct entry ID
-
countByCtEntryId
public static int countByCtEntryId(long ctEntryId) Returns the number of ct comments where ctEntryId = ?.- Parameters:
ctEntryId
- the ct entry ID- Returns:
- the number of matching ct comments
-
cacheResult
Caches the ct comment in the entity cache if it is enabled.- Parameters:
ctComment
- the ct comment
-
cacheResult
Caches the ct comments in the entity cache if it is enabled.- Parameters:
ctComments
- the ct comments
-
create
Creates a new ct comment with the primary key. Does not add the ct comment to the database.- Parameters:
ctCommentId
- the primary key for the new ct comment- Returns:
- the new ct comment
-
remove
Removes the ct comment with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
ctCommentId
- the primary key of the ct comment- Returns:
- the ct comment that was removed
- Throws:
NoSuchCommentException
- if a ct comment with the primary key could not be foundNoSuchCommentException
-
updateImpl
-
findByPrimaryKey
Returns the ct comment with the primary key or throws aNoSuchCommentException
if it could not be found.- Parameters:
ctCommentId
- the primary key of the ct comment- Returns:
- the ct comment
- Throws:
NoSuchCommentException
- if a ct comment with the primary key could not be foundNoSuchCommentException
-
fetchByPrimaryKey
Returns the ct comment with the primary key or returnsnull
if it could not be found.- Parameters:
ctCommentId
- the primary key of the ct comment- Returns:
- the ct comment, or
null
if a ct comment with the primary key could not be found
-
findAll
Returns all the ct comments.- Returns:
- the ct comments
-
findAll
Returns a range of all the ct comments.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 fromCTCommentModelImpl
.- Parameters:
start
- the lower bound of the range of ct commentsend
- the upper bound of the range of ct comments (not inclusive)- Returns:
- the range of ct comments
-
findAll
public static List<CTComment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTComment> orderByComparator) Returns an ordered range of all the ct comments.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 fromCTCommentModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of ct comments
-
findAll
public static 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.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 fromCTCommentModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of ct comments
-
removeAll
public static void removeAll()Removes all the ct comments from the database. -
countAll
public static int countAll()Returns the number of ct comments.- Returns:
- the number of ct comments
-
getPersistence
-
setPersistence
-