use of com.liferay.knowledgebase.NoSuchArticleException in project liferay-ide by liferay.
the class KBArticlePersistenceImpl method findByG_P_S_S_Last.
/**
* Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?.
*
* @param groupId the group ID
* @param parentResourcePrimKey the parent resource prim key
* @param sections the sections
* @param status the status
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching k b article
* @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBArticle findByG_P_S_S_Last(long groupId, long parentResourcePrimKey, String sections, int status, OrderByComparator orderByComparator) throws NoSuchArticleException, SystemException {
KBArticle kbArticle = fetchByG_P_S_S_Last(groupId, parentResourcePrimKey, sections, status, orderByComparator);
if (kbArticle != null) {
return kbArticle;
}
StringBundler msg = new StringBundler(10);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", parentResourcePrimKey=");
msg.append(parentResourcePrimKey);
msg.append(", sections=");
msg.append(sections);
msg.append(", status=");
msg.append(status);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchArticleException(msg.toString());
}
use of com.liferay.knowledgebase.NoSuchArticleException in project liferay-ide by liferay.
the class KBArticlePersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the k b articles before and after the current k b article in the ordered set where uuid = ? and companyId = ?.
*
* @param kbArticleId the primary key of the current k b article
* @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 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[] findByUuid_C_PrevAndNext(long kbArticleId, String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchArticleException, SystemException {
KBArticle kbArticle = findByPrimaryKey(kbArticleId);
Session session = null;
try {
session = openSession();
KBArticle[] array = new KBArticleImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, kbArticle, uuid, companyId, orderByComparator, true);
array[1] = kbArticle;
array[2] = getByUuid_C_PrevAndNext(session, kbArticle, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.knowledgebase.NoSuchArticleException in project liferay-ide by liferay.
the class KBArticlePersistenceImpl method findByG_M_PrevAndNext.
/**
* Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and main = ?.
*
* @param kbArticleId the primary key of the current k b article
* @param groupId the group ID
* @param main the main
* @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[] findByG_M_PrevAndNext(long kbArticleId, long groupId, boolean main, OrderByComparator orderByComparator) throws NoSuchArticleException, SystemException {
KBArticle kbArticle = findByPrimaryKey(kbArticleId);
Session session = null;
try {
session = openSession();
KBArticle[] array = new KBArticleImpl[3];
array[0] = getByG_M_PrevAndNext(session, kbArticle, groupId, main, orderByComparator, true);
array[1] = kbArticle;
array[2] = getByG_M_PrevAndNext(session, kbArticle, groupId, main, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.knowledgebase.NoSuchArticleException in project liferay-ide by liferay.
the class KBArticlePersistenceImpl method findByG_P_S_L_First.
/**
* Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?.
*
* @param groupId the group ID
* @param parentResourcePrimKey the parent resource prim key
* @param sections the sections
* @param latest the latest
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching k b article
* @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBArticle findByG_P_S_L_First(long groupId, long parentResourcePrimKey, String sections, boolean latest, OrderByComparator orderByComparator) throws NoSuchArticleException, SystemException {
KBArticle kbArticle = fetchByG_P_S_L_First(groupId, parentResourcePrimKey, sections, latest, orderByComparator);
if (kbArticle != null) {
return kbArticle;
}
StringBundler msg = new StringBundler(10);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", parentResourcePrimKey=");
msg.append(parentResourcePrimKey);
msg.append(", sections=");
msg.append(sections);
msg.append(", latest=");
msg.append(latest);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchArticleException(msg.toString());
}
use of com.liferay.knowledgebase.NoSuchArticleException in project liferay-ide by liferay.
the class KBArticlePersistenceImpl method findByResourcePrimKey_First.
/**
* Returns the first k b article in the ordered set where resourcePrimKey = ?.
*
* @param resourcePrimKey the resource prim key
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching k b article
* @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBArticle findByResourcePrimKey_First(long resourcePrimKey, OrderByComparator orderByComparator) throws NoSuchArticleException, SystemException {
KBArticle kbArticle = fetchByResourcePrimKey_First(resourcePrimKey, orderByComparator);
if (kbArticle != null) {
return kbArticle;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("resourcePrimKey=");
msg.append(resourcePrimKey);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchArticleException(msg.toString());
}
Aggregations