Search in sources :

Example 1 with NoSuchQuxException

use of com.liferay.blade.workflow.asset.exception.NoSuchQuxException in project liferay-blade-samples by liferay.

the class QuxPersistenceImpl method findByUuid_C_Last.

/**
 * Returns the last qux 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 qux
 * @throws NoSuchQuxException if a matching qux could not be found
 */
@Override
public Qux findByUuid_C_Last(String uuid, long companyId, OrderByComparator<Qux> orderByComparator) throws NoSuchQuxException {
    Qux qux = fetchByUuid_C_Last(uuid, companyId, orderByComparator);
    if (qux != null) {
        return qux;
    }
    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("}");
    throw new NoSuchQuxException(msg.toString());
}
Also used : Qux(com.liferay.blade.workflow.asset.model.Qux) NoSuchQuxException(com.liferay.blade.workflow.asset.exception.NoSuchQuxException) StringBundler(com.liferay.petra.string.StringBundler)

Example 2 with NoSuchQuxException

use of com.liferay.blade.workflow.asset.exception.NoSuchQuxException in project liferay-blade-samples by liferay.

the class QuxPersistenceImpl method findByUUID_G.

/**
 * Returns the qux where uuid = &#63; and groupId = &#63; or throws a <code>NoSuchQuxException</code> if it could not be found.
 *
 * @param uuid the uuid
 * @param groupId the group ID
 * @return the matching qux
 * @throws NoSuchQuxException if a matching qux could not be found
 */
@Override
public Qux findByUUID_G(String uuid, long groupId) throws NoSuchQuxException {
    Qux qux = fetchByUUID_G(uuid, groupId);
    if (qux == 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("}");
        if (_log.isDebugEnabled()) {
            _log.debug(msg.toString());
        }
        throw new NoSuchQuxException(msg.toString());
    }
    return qux;
}
Also used : Qux(com.liferay.blade.workflow.asset.model.Qux) NoSuchQuxException(com.liferay.blade.workflow.asset.exception.NoSuchQuxException) StringBundler(com.liferay.petra.string.StringBundler)

Example 3 with NoSuchQuxException

use of com.liferay.blade.workflow.asset.exception.NoSuchQuxException in project liferay-blade-samples by liferay.

the class QuxPersistenceImpl method remove.

/**
 * Removes the qux with the primary key from the database. Also notifies the appropriate model listeners.
 *
 * @param primaryKey the primary key of the qux
 * @return the qux that was removed
 * @throws NoSuchQuxException if a qux with the primary key could not be found
 */
@Override
public Qux remove(Serializable primaryKey) throws NoSuchQuxException {
    Session session = null;
    try {
        session = openSession();
        Qux qux = (Qux) session.get(QuxImpl.class, primaryKey);
        if (qux == null) {
            if (_log.isDebugEnabled()) {
                _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
            }
            throw new NoSuchQuxException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
        }
        return remove(qux);
    } catch (NoSuchQuxException nsee) {
        throw nsee;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : Qux(com.liferay.blade.workflow.asset.model.Qux) NoSuchQuxException(com.liferay.blade.workflow.asset.exception.NoSuchQuxException) QuxImpl(com.liferay.blade.workflow.asset.model.impl.QuxImpl) NoSuchQuxException(com.liferay.blade.workflow.asset.exception.NoSuchQuxException) Session(com.liferay.portal.kernel.dao.orm.Session)

Example 4 with NoSuchQuxException

use of com.liferay.blade.workflow.asset.exception.NoSuchQuxException in project liferay-blade-samples by liferay.

the class QuxPersistenceImpl method findByUuid_Last.

/**
 * Returns the last qux 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 qux
 * @throws NoSuchQuxException if a matching qux could not be found
 */
@Override
public Qux findByUuid_Last(String uuid, OrderByComparator<Qux> orderByComparator) throws NoSuchQuxException {
    Qux qux = fetchByUuid_Last(uuid, orderByComparator);
    if (qux != null) {
        return qux;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("uuid=");
    msg.append(uuid);
    msg.append("}");
    throw new NoSuchQuxException(msg.toString());
}
Also used : Qux(com.liferay.blade.workflow.asset.model.Qux) NoSuchQuxException(com.liferay.blade.workflow.asset.exception.NoSuchQuxException) StringBundler(com.liferay.petra.string.StringBundler)

Example 5 with NoSuchQuxException

use of com.liferay.blade.workflow.asset.exception.NoSuchQuxException in project liferay-blade-samples by liferay.

the class QuxPersistenceImpl method findByUuid_First.

/**
 * Returns the first qux 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 first matching qux
 * @throws NoSuchQuxException if a matching qux could not be found
 */
@Override
public Qux findByUuid_First(String uuid, OrderByComparator<Qux> orderByComparator) throws NoSuchQuxException {
    Qux qux = fetchByUuid_First(uuid, orderByComparator);
    if (qux != null) {
        return qux;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("uuid=");
    msg.append(uuid);
    msg.append("}");
    throw new NoSuchQuxException(msg.toString());
}
Also used : Qux(com.liferay.blade.workflow.asset.model.Qux) NoSuchQuxException(com.liferay.blade.workflow.asset.exception.NoSuchQuxException) StringBundler(com.liferay.petra.string.StringBundler)

Aggregations

NoSuchQuxException (com.liferay.blade.workflow.asset.exception.NoSuchQuxException)8 Qux (com.liferay.blade.workflow.asset.model.Qux)8 StringBundler (com.liferay.petra.string.StringBundler)5 QuxImpl (com.liferay.blade.workflow.asset.model.impl.QuxImpl)3 Session (com.liferay.portal.kernel.dao.orm.Session)3