use of com.liferay.knowledgebase.NoSuchCommentException in project liferay-ide by liferay.
the class KBCommentPersistenceImpl method findByC_C_Last.
/**
* Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?.
*
* @param classNameId the class name ID
* @param classPK the class p k
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching k b comment
* @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBComment findByC_C_Last(long classNameId, long classPK, OrderByComparator orderByComparator) throws NoSuchCommentException, SystemException {
KBComment kbComment = fetchByC_C_Last(classNameId, classPK, orderByComparator);
if (kbComment != null) {
return kbComment;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("classNameId=");
msg.append(classNameId);
msg.append(", classPK=");
msg.append(classPK);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchCommentException(msg.toString());
}
use of com.liferay.knowledgebase.NoSuchCommentException in project liferay-ide by liferay.
the class KBCommentPersistenceImpl method findByUuid_C_Last.
/**
* Returns the last k b comment in the ordered set where uuid = ? and companyId = ?.
*
* @param uuid the uuid
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching k b comment
* @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBComment findByUuid_C_Last(String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchCommentException, SystemException {
KBComment kbComment = fetchByUuid_C_Last(uuid, companyId, orderByComparator);
if (kbComment != null) {
return kbComment;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(", companyId=");
msg.append(companyId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchCommentException(msg.toString());
}
use of com.liferay.knowledgebase.NoSuchCommentException in project liferay-ide by liferay.
the class KBCommentPersistenceImpl method findByC_C_First.
/**
* Returns the first k b comment in the ordered set where classNameId = ? and classPK = ?.
*
* @param classNameId the class name ID
* @param classPK the class p k
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching k b comment
* @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBComment findByC_C_First(long classNameId, long classPK, OrderByComparator orderByComparator) throws NoSuchCommentException, SystemException {
KBComment kbComment = fetchByC_C_First(classNameId, classPK, orderByComparator);
if (kbComment != null) {
return kbComment;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("classNameId=");
msg.append(classNameId);
msg.append(", classPK=");
msg.append(classPK);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchCommentException(msg.toString());
}
use of com.liferay.knowledgebase.NoSuchCommentException in project liferay-ide by liferay.
the class KBCommentPersistenceImpl method findByG_S_PrevAndNext.
/**
* Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and status = ?.
*
* @param kbCommentId the primary key of the current k b comment
* @param groupId the group 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 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[] findByG_S_PrevAndNext(long kbCommentId, long groupId, int status, OrderByComparator orderByComparator) throws NoSuchCommentException, SystemException {
KBComment kbComment = findByPrimaryKey(kbCommentId);
Session session = null;
try {
session = openSession();
KBComment[] array = new KBCommentImpl[3];
array[0] = getByG_S_PrevAndNext(session, kbComment, groupId, status, orderByComparator, true);
array[1] = kbComment;
array[2] = getByG_S_PrevAndNext(session, kbComment, groupId, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.knowledgebase.NoSuchCommentException in project liferay-ide by liferay.
the class KBCommentPersistenceImpl method findByG_C_First.
/**
* Returns the first k b comment in the ordered set where groupId = ? and classNameId = ?.
*
* @param groupId the group ID
* @param classNameId the class name ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching k b comment
* @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public KBComment findByG_C_First(long groupId, long classNameId, OrderByComparator orderByComparator) throws NoSuchCommentException, SystemException {
KBComment kbComment = fetchByG_C_First(groupId, classNameId, orderByComparator);
if (kbComment != null) {
return kbComment;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", classNameId=");
msg.append(classNameId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchCommentException(msg.toString());
}
Aggregations