Search in sources :

Example 11 with NoSuchArtistException

use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.

the class ArtistPersistenceImpl method findByUuid_First.

/**
 * Returns the first artist 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 artist
 * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Artist findByUuid_First(String uuid, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
    Artist artist = fetchByUuid_First(uuid, orderByComparator);
    if (artist != null) {
        return artist;
    }
    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 NoSuchArtistException(msg.toString());
}
Also used : Artist(org.liferay.jukebox.model.Artist) StringBundler(com.liferay.portal.kernel.util.StringBundler) NoSuchArtistException(org.liferay.jukebox.NoSuchArtistException)

Example 12 with NoSuchArtistException

use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.

the class ArtistPersistenceImpl method findByGroupId_Last.

/**
 * Returns the last artist in the ordered set where groupId = &#63;.
 *
 * @param groupId the group ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching artist
 * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Artist findByGroupId_Last(long groupId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
    Artist artist = fetchByGroupId_Last(groupId, orderByComparator);
    if (artist != null) {
        return artist;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("groupId=");
    msg.append(groupId);
    msg.append(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchArtistException(msg.toString());
}
Also used : Artist(org.liferay.jukebox.model.Artist) StringBundler(com.liferay.portal.kernel.util.StringBundler) NoSuchArtistException(org.liferay.jukebox.NoSuchArtistException)

Example 13 with NoSuchArtistException

use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.

the class ArtistPersistenceImpl method findByCompanyId_PrevAndNext.

/**
 * Returns the artists before and after the current artist in the ordered set where companyId = &#63;.
 *
 * @param artistId the primary key of the current artist
 * @param companyId the company ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the previous, current, and next artist
 * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Artist[] findByCompanyId_PrevAndNext(long artistId, long companyId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
    Artist artist = findByPrimaryKey(artistId);
    Session session = null;
    try {
        session = openSession();
        Artist[] array = new ArtistImpl[3];
        array[0] = getByCompanyId_PrevAndNext(session, artist, companyId, orderByComparator, true);
        array[1] = artist;
        array[2] = getByCompanyId_PrevAndNext(session, artist, companyId, orderByComparator, false);
        return array;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : Artist(org.liferay.jukebox.model.Artist) SystemException(com.liferay.portal.kernel.exception.SystemException) NoSuchArtistException(org.liferay.jukebox.NoSuchArtistException) Session(com.liferay.portal.kernel.dao.orm.Session) ArtistImpl(org.liferay.jukebox.model.impl.ArtistImpl)

Example 14 with NoSuchArtistException

use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.

the class ArtistPersistenceImpl method findByG_LikeN_S_PrevAndNext.

/**
 * Returns the artists before and after the current artist in the ordered set where groupId = &#63; and name LIKE &#63; and status = &#63;.
 *
 * @param artistId the primary key of the current artist
 * @param groupId the group ID
 * @param name the name
 * @param status the status
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the previous, current, and next artist
 * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Artist[] findByG_LikeN_S_PrevAndNext(long artistId, long groupId, String name, int status, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
    Artist artist = findByPrimaryKey(artistId);
    Session session = null;
    try {
        session = openSession();
        Artist[] array = new ArtistImpl[3];
        array[0] = getByG_LikeN_S_PrevAndNext(session, artist, groupId, name, status, orderByComparator, true);
        array[1] = artist;
        array[2] = getByG_LikeN_S_PrevAndNext(session, artist, groupId, name, status, orderByComparator, false);
        return array;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : Artist(org.liferay.jukebox.model.Artist) SystemException(com.liferay.portal.kernel.exception.SystemException) NoSuchArtistException(org.liferay.jukebox.NoSuchArtistException) Session(com.liferay.portal.kernel.dao.orm.Session) ArtistImpl(org.liferay.jukebox.model.impl.ArtistImpl)

Example 15 with NoSuchArtistException

use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.

the class ArtistPersistenceImpl method findByUuid_C_Last.

/**
 * Returns the last artist in the ordered set where uuid = &#63; and companyId = &#63;.
 *
 * @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 artist
 * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Artist findByUuid_C_Last(String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
    Artist artist = fetchByUuid_C_Last(uuid, companyId, orderByComparator);
    if (artist != null) {
        return artist;
    }
    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(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchArtistException(msg.toString());
}
Also used : Artist(org.liferay.jukebox.model.Artist) StringBundler(com.liferay.portal.kernel.util.StringBundler) NoSuchArtistException(org.liferay.jukebox.NoSuchArtistException)

Aggregations

NoSuchArtistException (org.liferay.jukebox.NoSuchArtistException)30 Artist (org.liferay.jukebox.model.Artist)30 StringBundler (com.liferay.portal.kernel.util.StringBundler)17 Session (com.liferay.portal.kernel.dao.orm.Session)13 SystemException (com.liferay.portal.kernel.exception.SystemException)13 ArtistImpl (org.liferay.jukebox.model.impl.ArtistImpl)13