Search in sources :

Example 11 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_Last.

/**
 * Returns the last bar 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 bar
 * @throws NoSuchBarException if a matching bar could not be found
 */
@Override
public Bar findByUuid_C_Last(String uuid, long companyId, OrderByComparator<Bar> orderByComparator) throws NoSuchBarException {
    Bar bar = fetchByUuid_C_Last(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