use of com.liferay.blade.workflow.basic.exception.NoSuchBazException in project liferay-blade-samples by liferay.
the class BazPersistenceImpl method findByUuid_First.
/**
* Returns the first baz 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 baz
* @throws NoSuchBazException if a matching baz could not be found
*/
@Override
public Baz findByUuid_First(String uuid, OrderByComparator<Baz> orderByComparator) throws NoSuchBazException {
Baz baz = fetchByUuid_First(uuid, orderByComparator);
if (baz != null) {
return baz;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append("}");
throw new NoSuchBazException(msg.toString());
}
use of com.liferay.blade.workflow.basic.exception.NoSuchBazException in project liferay-blade-samples by liferay.
the class BazPersistenceImpl method findByUuid_C_Last.
/**
* Returns the last baz 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 baz
* @throws NoSuchBazException if a matching baz could not be found
*/
@Override
public Baz findByUuid_C_Last(String uuid, long companyId, OrderByComparator<Baz> orderByComparator) throws NoSuchBazException {
Baz baz = fetchByUuid_C_Last(uuid, companyId, orderByComparator);
if (baz != null) {
return baz;
}
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 NoSuchBazException(msg.toString());
}
use of com.liferay.blade.workflow.basic.exception.NoSuchBazException in project liferay-blade-samples by liferay.
the class BazPersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the bazs before and after the current baz in the ordered set where uuid = ? and companyId = ?.
*
* @param bazId the primary key of the current baz
* @param uuid the uuid
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next baz
* @throws NoSuchBazException if a baz with the primary key could not be found
*/
@Override
public Baz[] findByUuid_C_PrevAndNext(long bazId, String uuid, long companyId, OrderByComparator<Baz> orderByComparator) throws NoSuchBazException {
uuid = Objects.toString(uuid, "");
Baz baz = findByPrimaryKey(bazId);
Session session = null;
try {
session = openSession();
Baz[] array = new BazImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, baz, uuid, companyId, orderByComparator, true);
array[1] = baz;
array[2] = getByUuid_C_PrevAndNext(session, baz, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations