use of com.liferay.roster.exception.NoSuchClubException in project liferay-ide by liferay.
the class ClubPersistenceImpl method findByUuid_Last.
/**
* Returns the last club 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 club
* @throws NoSuchClubException if a matching club could not be found
*/
@Override
public Club findByUuid_Last(String uuid, OrderByComparator<Club> orderByComparator) throws NoSuchClubException {
Club club = fetchByUuid_Last(uuid, orderByComparator);
if (club != null) {
return club;
}
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 NoSuchClubException(msg.toString());
}
use of com.liferay.roster.exception.NoSuchClubException in project liferay-ide by liferay.
the class ClubPersistenceImpl method findByUuid_First.
/**
* Returns the first club 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 club
* @throws NoSuchClubException if a matching club could not be found
*/
@Override
public Club findByUuid_First(String uuid, OrderByComparator<Club> orderByComparator) throws NoSuchClubException {
Club club = fetchByUuid_First(uuid, orderByComparator);
if (club != null) {
return club;
}
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 NoSuchClubException(msg.toString());
}
use of com.liferay.roster.exception.NoSuchClubException in project liferay-ide by liferay.
the class ClubPersistenceImpl method remove.
/**
* Removes the club with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param primaryKey the primary key of the club
* @return the club that was removed
* @throws NoSuchClubException if a club with the primary key could not be found
*/
@Override
public Club remove(Serializable primaryKey) throws NoSuchClubException {
Session session = null;
try {
session = openSession();
Club club = (Club) session.get(ClubImpl.class, primaryKey);
if (club == null) {
if (_log.isWarnEnabled()) {
_log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
}
throw new NoSuchClubException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
}
return remove(club);
} catch (NoSuchClubException nsee) {
throw nsee;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.roster.exception.NoSuchClubException in project liferay-ide by liferay.
the class ClubPersistenceImpl method findByUuid_PrevAndNext.
/**
* Returns the clubs before and after the current club in the ordered set where uuid = ?.
*
* @param clubId the primary key of the current club
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next club
* @throws NoSuchClubException if a club with the primary key could not be found
*/
@Override
public Club[] findByUuid_PrevAndNext(long clubId, String uuid, OrderByComparator<Club> orderByComparator) throws NoSuchClubException {
Club club = findByPrimaryKey(clubId);
Session session = null;
try {
session = openSession();
Club[] array = new ClubImpl[3];
array[0] = getByUuid_PrevAndNext(session, club, uuid, orderByComparator, true);
array[1] = club;
array[2] = getByUuid_PrevAndNext(session, club, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations