Search in sources :

Example 11 with NoSuchFolderException

use of com.liferay.knowledgebase.NoSuchFolderException in project liferay-ide by liferay.

the class KBFolderPersistenceImpl method findByUuid_First.

/**
 * Returns the first k b folder in the ordered set where uuid = ?.
 *
 * @param uuid the uuid
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching k b folder
 * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public KBFolder findByUuid_First(String uuid, OrderByComparator orderByComparator) throws NoSuchFolderException, SystemException {
    KBFolder kbFolder = fetchByUuid_First(uuid, orderByComparator);
    if (kbFolder != null) {
        return kbFolder;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("uuid=");
    msg.append(uuid);
    msg.append(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchFolderException(msg.toString());
}
Also used : KBFolder(com.liferay.knowledgebase.model.KBFolder) NoSuchFolderException(com.liferay.knowledgebase.NoSuchFolderException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 12 with NoSuchFolderException

use of com.liferay.knowledgebase.NoSuchFolderException in project liferay-ide by liferay.

the class KBFolderPersistenceImpl method findByUUID_G.

/**
 * Returns the k b folder where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found.
 *
 * @param uuid the uuid
 * @param groupId the group ID
 * @return the matching k b folder
 * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public KBFolder findByUUID_G(String uuid, long groupId) throws NoSuchFolderException, SystemException {
    KBFolder kbFolder = fetchByUUID_G(uuid, groupId);
    if (kbFolder == null) {
        StringBundler msg = new StringBundler(6);
        msg.append(_NO_SUCH_ENTITY_WITH_KEY);
        msg.append("uuid=");
        msg.append(uuid);
        msg.append(", groupId=");
        msg.append(groupId);
        msg.append(StringPool.CLOSE_CURLY_BRACE);
        if (_log.isWarnEnabled()) {
            _log.warn(msg.toString());
        }
        throw new NoSuchFolderException(msg.toString());
    }
    return kbFolder;
}
Also used : KBFolder(com.liferay.knowledgebase.model.KBFolder) NoSuchFolderException(com.liferay.knowledgebase.NoSuchFolderException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 13 with NoSuchFolderException

use of com.liferay.knowledgebase.NoSuchFolderException in project liferay-ide by liferay.

the class KBFolderPersistenceImpl method findByUuid_C_First.

/**
 * Returns the first k b folder in the ordered set where uuid = &#63; and companyId = &#63;.
 *
 * @param uuid the uuid
 * @param companyId the company ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching k b folder
 * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public KBFolder findByUuid_C_First(String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchFolderException, SystemException {
    KBFolder kbFolder = fetchByUuid_C_First(uuid, companyId, orderByComparator);
    if (kbFolder != null) {
        return kbFolder;
    }
    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 NoSuchFolderException(msg.toString());
}
Also used : KBFolder(com.liferay.knowledgebase.model.KBFolder) NoSuchFolderException(com.liferay.knowledgebase.NoSuchFolderException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 14 with NoSuchFolderException

use of com.liferay.knowledgebase.NoSuchFolderException in project liferay-ide by liferay.

the class KBFolderPersistenceImpl method findByUuid_Last.

/**
 * Returns the last k b folder in the ordered set where uuid = &#63;.
 *
 * @param uuid the uuid
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching k b folder
 * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public KBFolder findByUuid_Last(String uuid, OrderByComparator orderByComparator) throws NoSuchFolderException, SystemException {
    KBFolder kbFolder = fetchByUuid_Last(uuid, orderByComparator);
    if (kbFolder != null) {
        return kbFolder;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("uuid=");
    msg.append(uuid);
    msg.append(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchFolderException(msg.toString());
}
Also used : KBFolder(com.liferay.knowledgebase.model.KBFolder) NoSuchFolderException(com.liferay.knowledgebase.NoSuchFolderException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 15 with NoSuchFolderException

use of com.liferay.knowledgebase.NoSuchFolderException in project liferay-ide by liferay.

the class KBFolderPersistenceImpl method findByG_P_N.

/**
 * Returns the k b folder where groupId = &#63; and parentKBFolderId = &#63; and name = &#63; or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found.
 *
 * @param groupId the group ID
 * @param parentKBFolderId the parent k b folder ID
 * @param name the name
 * @return the matching k b folder
 * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public KBFolder findByG_P_N(long groupId, long parentKBFolderId, String name) throws NoSuchFolderException, SystemException {
    KBFolder kbFolder = fetchByG_P_N(groupId, parentKBFolderId, name);
    if (kbFolder == null) {
        StringBundler msg = new StringBundler(8);
        msg.append(_NO_SUCH_ENTITY_WITH_KEY);
        msg.append("groupId=");
        msg.append(groupId);
        msg.append(", parentKBFolderId=");
        msg.append(parentKBFolderId);
        msg.append(", name=");
        msg.append(name);
        msg.append(StringPool.CLOSE_CURLY_BRACE);
        if (_log.isWarnEnabled()) {
            _log.warn(msg.toString());
        }
        throw new NoSuchFolderException(msg.toString());
    }
    return kbFolder;
}
Also used : KBFolder(com.liferay.knowledgebase.model.KBFolder) NoSuchFolderException(com.liferay.knowledgebase.NoSuchFolderException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Aggregations

NoSuchFolderException (com.liferay.knowledgebase.NoSuchFolderException)15 KBFolder (com.liferay.knowledgebase.model.KBFolder)15 StringBundler (com.liferay.portal.kernel.util.StringBundler)9 KBFolderImpl (com.liferay.knowledgebase.model.impl.KBFolderImpl)5 Session (com.liferay.portal.kernel.dao.orm.Session)5 SystemException (com.liferay.portal.kernel.exception.SystemException)5