Search in sources :

Example 6 with NoSuchBarException

use of com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException in project liferay-blade-samples by liferay.

the class BarPersistenceImpl method findByUuid_First.

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

Example 7 with NoSuchBarException

use of com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException in project liferay-blade-samples by liferay.

the class BarPersistenceImpl method findByUUID_G.

/**
 * Returns the bar where uuid = &#63; and groupId = &#63; or throws a <code>NoSuchBarException</code> if it could not be found.
 *
 * @param uuid the uuid
 * @param groupId the group ID
 * @return the matching bar
 * @throws NoSuchBarException if a matching bar could not be found
 */
@Override
public Bar findByUUID_G(String uuid, long groupId) throws NoSuchBarException {
    Bar bar = fetchByUUID_G(uuid, groupId);
    if (bar == 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 NoSuchBarException(msg.toString());
    }
    return bar;
}
Also used : Bar(com.liferay.blade.samples.servicebuilder.adq.model.Bar) NoSuchBarException(com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException) StringBundler(com.liferay.petra.string.StringBundler)

Example 8 with NoSuchBarException

use of com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException in project liferay-blade-samples by liferay.

the class BarPersistenceImpl method findByField2_First.

/**
 * Returns the first bar in the ordered set where field2 = &#63;.
 *
 * @param field2 the field2
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching bar
 * @throws NoSuchBarException if a matching bar could not be found
 */
@Override
public Bar findByField2_First(boolean field2, OrderByComparator<Bar> orderByComparator) throws NoSuchBarException {
    Bar bar = fetchByField2_First(field2, orderByComparator);
    if (bar != null) {
        return bar;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("field2=");
    msg.append(field2);
    msg.append("}");
    throw new NoSuchBarException(msg.toString());
}
Also used : Bar(com.liferay.blade.samples.servicebuilder.adq.model.Bar) NoSuchBarException(com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException) StringBundler(com.liferay.petra.string.StringBundler)

Example 9 with NoSuchBarException

use of com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException in project liferay-blade-samples by liferay.

the class BarPersistenceImpl method findByField2_Last.

/**
 * Returns the last bar in the ordered set where field2 = &#63;.
 *
 * @param field2 the field2
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching bar
 * @throws NoSuchBarException if a matching bar could not be found
 */
@Override
public Bar findByField2_Last(boolean field2, OrderByComparator<Bar> orderByComparator) throws NoSuchBarException {
    Bar bar = fetchByField2_Last(field2, orderByComparator);
    if (bar != null) {
        return bar;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("field2=");
    msg.append(field2);
    msg.append("}");
    throw new NoSuchBarException(msg.toString());
}
Also used : Bar(com.liferay.blade.samples.servicebuilder.adq.model.Bar) NoSuchBarException(com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException) StringBundler(com.liferay.petra.string.StringBundler)

Example 10 with NoSuchBarException

use of com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException in project liferay-blade-samples by liferay.

the class BarPersistenceImpl method findByUuid_C_First.

/**
 * Returns the first bar 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 bar
 * @throws NoSuchBarException if a matching bar could not be found
 */
@Override
public Bar findByUuid_C_First(String uuid, long companyId, OrderByComparator<Bar> orderByComparator) throws NoSuchBarException {
    Bar bar = fetchByUuid_C_First(uuid, companyId, orderByComparator);
    if (bar != null) {
        return bar;
    }
    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 NoSuchBarException(msg.toString());
}
Also used : Bar(com.liferay.blade.samples.servicebuilder.adq.model.Bar) NoSuchBarException(com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException) StringBundler(com.liferay.petra.string.StringBundler)

Aggregations

NoSuchBarException (com.liferay.blade.samples.servicebuilder.adq.exception.NoSuchBarException)11 Bar (com.liferay.blade.samples.servicebuilder.adq.model.Bar)11 StringBundler (com.liferay.petra.string.StringBundler)7 BarImpl (com.liferay.blade.samples.servicebuilder.adq.model.impl.BarImpl)4 Session (com.liferay.portal.kernel.dao.orm.Session)4