use of com.liferay.blade.workflow.asset.model.impl.QuxImpl in project liferay-blade-samples by liferay.
the class QuxPersistenceImpl method findByUuid_PrevAndNext.
/**
* Returns the quxs before and after the current qux in the ordered set where uuid = ?.
*
* @param quxId the primary key of the current qux
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next qux
* @throws NoSuchQuxException if a qux with the primary key could not be found
*/
@Override
public Qux[] findByUuid_PrevAndNext(long quxId, String uuid, OrderByComparator<Qux> orderByComparator) throws NoSuchQuxException {
uuid = Objects.toString(uuid, "");
Qux qux = findByPrimaryKey(quxId);
Session session = null;
try {
session = openSession();
Qux[] array = new QuxImpl[3];
array[0] = getByUuid_PrevAndNext(session, qux, uuid, orderByComparator, true);
array[1] = qux;
array[2] = getByUuid_PrevAndNext(session, qux, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.blade.workflow.asset.model.impl.QuxImpl in project liferay-blade-samples by liferay.
the class QuxPersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the quxs before and after the current qux in the ordered set where uuid = ? and companyId = ?.
*
* @param quxId the primary key of the current qux
* @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 qux
* @throws NoSuchQuxException if a qux with the primary key could not be found
*/
@Override
public Qux[] findByUuid_C_PrevAndNext(long quxId, String uuid, long companyId, OrderByComparator<Qux> orderByComparator) throws NoSuchQuxException {
uuid = Objects.toString(uuid, "");
Qux qux = findByPrimaryKey(quxId);
Session session = null;
try {
session = openSession();
Qux[] array = new QuxImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, qux, uuid, companyId, orderByComparator, true);
array[1] = qux;
array[2] = getByUuid_C_PrevAndNext(session, qux, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.blade.workflow.asset.model.impl.QuxImpl in project liferay-blade-samples by liferay.
the class QuxPersistenceImpl method create.
/**
* Creates a new qux with the primary key. Does not add the qux to the database.
*
* @param quxId the primary key for the new qux
* @return the new qux
*/
@Override
public Qux create(long quxId) {
Qux qux = new QuxImpl();
qux.setNew(true);
qux.setPrimaryKey(quxId);
String uuid = PortalUUIDUtil.generate();
qux.setUuid(uuid);
qux.setCompanyId(companyProvider.getCompanyId());
return qux;
}
Aggregations