use of com.liferay.knowledgebase.NoSuchCommentException in project liferay-ide by liferay.
the class KBCommentPersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the k b comments before and after the current k b comment in the ordered set where uuid = ? and companyId = ?.
*
* @param kbCommentId the primary key of the current k b comment
* @param uuid the uuid
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next k b comment
* @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBComment[] findByUuid_C_PrevAndNext(long kbCommentId, String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchCommentException, SystemException {
KBComment kbComment = findByPrimaryKey(kbCommentId);
Session session = null;
try {
session = openSession();
KBComment[] array = new KBCommentImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, kbComment, uuid, companyId, orderByComparator, true);
array[1] = kbComment;
array[2] = getByUuid_C_PrevAndNext(session, kbComment, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations