use of com.liferay.roster.exception.NoSuchRosterException in project liferay-ide by liferay.
the class RosterPersistenceImpl method findByClubId_PrevAndNext.
/**
* Returns the rosters before and after the current roster in the ordered set where clubId = ?.
*
* @param rosterId the primary key of the current roster
* @param clubId the club ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next roster
* @throws NoSuchRosterException if a roster with the primary key could not be found
*/
@Override
public Roster[] findByClubId_PrevAndNext(long rosterId, long clubId, OrderByComparator<Roster> orderByComparator) throws NoSuchRosterException {
Roster roster = findByPrimaryKey(rosterId);
Session session = null;
try {
session = openSession();
Roster[] array = new RosterImpl[3];
array[0] = getByClubId_PrevAndNext(session, roster, clubId, orderByComparator, true);
array[1] = roster;
array[2] = getByClubId_PrevAndNext(session, roster, clubId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.roster.exception.NoSuchRosterException in project liferay-ide by liferay.
the class RosterPersistenceImpl method findByUuid_Last.
/**
* Returns the last roster 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 last matching roster
* @throws NoSuchRosterException if a matching roster could not be found
*/
@Override
public Roster findByUuid_Last(String uuid, OrderByComparator<Roster> orderByComparator) throws NoSuchRosterException {
Roster roster = fetchByUuid_Last(uuid, orderByComparator);
if (roster != null) {
return roster;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchRosterException(msg.toString());
}
Aggregations