use of com.liferay.knowledgebase.model.impl.KBArticleImpl in project liferay-ide by liferay.
the class KBArticlePersistenceImpl method filterFindByG_KBFI_S_PrevAndNext.
/**
* Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?.
*
* @param kbArticleId the primary key of the current k b article
* @param groupId the group ID
* @param kbFolderId the kb folder ID
* @param status the status
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next k b article
* @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBArticle[] filterFindByG_KBFI_S_PrevAndNext(long kbArticleId, long groupId, long kbFolderId, int status, OrderByComparator orderByComparator) throws NoSuchArticleException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByG_KBFI_S_PrevAndNext(kbArticleId, groupId, kbFolderId, status, orderByComparator);
}
KBArticle kbArticle = findByPrimaryKey(kbArticleId);
Session session = null;
try {
session = openSession();
KBArticle[] array = new KBArticleImpl[3];
array[0] = filterGetByG_KBFI_S_PrevAndNext(session, kbArticle, groupId, kbFolderId, status, orderByComparator, true);
array[1] = kbArticle;
array[2] = filterGetByG_KBFI_S_PrevAndNext(session, kbArticle, groupId, kbFolderId, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations