Search in sources :

Example 1 with NoSuchRosterMemberException

use of com.liferay.roster.exception.NoSuchRosterMemberException in project liferay-ide by liferay.

the class RosterMemberPersistenceImpl method findByRosterId_Last.

/**
 * Returns the last roster member in the ordered set where rosterId = ?.
 *
 * @param rosterId the roster ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching roster member
 * @throws NoSuchRosterMemberException if a matching roster member could not be found
 */
@Override
public RosterMember findByRosterId_Last(long rosterId, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
    RosterMember rosterMember = fetchByRosterId_Last(rosterId, orderByComparator);
    if (rosterMember != null) {
        return rosterMember;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("rosterId=");
    msg.append(rosterId);
    msg.append(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchRosterMemberException(msg.toString());
}
Also used : RosterMember(com.liferay.roster.model.RosterMember) NoSuchRosterMemberException(com.liferay.roster.exception.NoSuchRosterMemberException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 2 with NoSuchRosterMemberException

use of com.liferay.roster.exception.NoSuchRosterMemberException in project liferay-ide by liferay.

the class RosterMemberPersistenceImpl method findByUuid_First.

/**
 * Returns the first roster member in the ordered set where uuid = &#63;.
 *
 * @param uuid the uuid
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching roster member
 * @throws NoSuchRosterMemberException if a matching roster member could not be found
 */
@Override
public RosterMember findByUuid_First(String uuid, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
    RosterMember rosterMember = fetchByUuid_First(uuid, orderByComparator);
    if (rosterMember != null) {
        return rosterMember;
    }
    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 NoSuchRosterMemberException(msg.toString());
}
Also used : RosterMember(com.liferay.roster.model.RosterMember) NoSuchRosterMemberException(com.liferay.roster.exception.NoSuchRosterMemberException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 3 with NoSuchRosterMemberException

use of com.liferay.roster.exception.NoSuchRosterMemberException in project liferay-ide by liferay.

the class RosterMemberPersistenceImpl method findByRosterId_PrevAndNext.

/**
 * Returns the roster members before and after the current roster member in the ordered set where rosterId = &#63;.
 *
 * @param rosterMemberId the primary key of the current roster member
 * @param rosterId the roster ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the previous, current, and next roster member
 * @throws NoSuchRosterMemberException if a roster member with the primary key could not be found
 */
@Override
public RosterMember[] findByRosterId_PrevAndNext(long rosterMemberId, long rosterId, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
    RosterMember rosterMember = findByPrimaryKey(rosterMemberId);
    Session session = null;
    try {
        session = openSession();
        RosterMember[] array = new RosterMemberImpl[3];
        array[0] = getByRosterId_PrevAndNext(session, rosterMember, rosterId, orderByComparator, true);
        array[1] = rosterMember;
        array[2] = getByRosterId_PrevAndNext(session, rosterMember, rosterId, orderByComparator, false);
        return array;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : RosterMember(com.liferay.roster.model.RosterMember) RosterMemberImpl(com.liferay.roster.model.impl.RosterMemberImpl) NoSuchRosterMemberException(com.liferay.roster.exception.NoSuchRosterMemberException) Session(com.liferay.portal.kernel.dao.orm.Session)

Example 4 with NoSuchRosterMemberException

use of com.liferay.roster.exception.NoSuchRosterMemberException in project liferay-ide by liferay.

the class RosterMemberPersistenceImpl method findByUuid_Last.

/**
 * Returns the last roster member in the ordered set where uuid = &#63;.
 *
 * @param uuid the uuid
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching roster member
 * @throws NoSuchRosterMemberException if a matching roster member could not be found
 */
@Override
public RosterMember findByUuid_Last(String uuid, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
    RosterMember rosterMember = fetchByUuid_Last(uuid, orderByComparator);
    if (rosterMember != null) {
        return rosterMember;
    }
    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 NoSuchRosterMemberException(msg.toString());
}
Also used : RosterMember(com.liferay.roster.model.RosterMember) NoSuchRosterMemberException(com.liferay.roster.exception.NoSuchRosterMemberException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 5 with NoSuchRosterMemberException

use of com.liferay.roster.exception.NoSuchRosterMemberException in project liferay-ide by liferay.

the class RosterMemberPersistenceImpl method findByRosterId_First.

/**
 * Returns the first roster member in the ordered set where rosterId = &#63;.
 *
 * @param rosterId the roster ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching roster member
 * @throws NoSuchRosterMemberException if a matching roster member could not be found
 */
@Override
public RosterMember findByRosterId_First(long rosterId, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
    RosterMember rosterMember = fetchByRosterId_First(rosterId, orderByComparator);
    if (rosterMember != null) {
        return rosterMember;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("rosterId=");
    msg.append(rosterId);
    msg.append(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchRosterMemberException(msg.toString());
}
Also used : RosterMember(com.liferay.roster.model.RosterMember) NoSuchRosterMemberException(com.liferay.roster.exception.NoSuchRosterMemberException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Aggregations

NoSuchRosterMemberException (com.liferay.roster.exception.NoSuchRosterMemberException)7 RosterMember (com.liferay.roster.model.RosterMember)7 StringBundler (com.liferay.portal.kernel.util.StringBundler)4 Session (com.liferay.portal.kernel.dao.orm.Session)3 RosterMemberImpl (com.liferay.roster.model.impl.RosterMemberImpl)3