Search in sources :

Example 21 with NoSuchSongException

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

the class SongPersistenceImpl method findByUserId_Last.

/**
 * Returns the last song in the ordered set where userId = ?.
 *
 * @param userId the user ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching song
 * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Song findByUserId_Last(long userId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
    Song song = fetchByUserId_Last(userId, orderByComparator);
    if (song != null) {
        return song;
    }
    StringBundler msg = new StringBundler(4);
    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
    msg.append("userId=");
    msg.append(userId);
    msg.append(StringPool.CLOSE_CURLY_BRACE);
    throw new NoSuchSongException(msg.toString());
}
Also used : Song(org.liferay.jukebox.model.Song) NoSuchSongException(org.liferay.jukebox.NoSuchSongException) StringBundler(com.liferay.portal.kernel.util.StringBundler)

Example 22 with NoSuchSongException

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

the class SongPersistenceImpl method findByUuid_C_Last.

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

Example 23 with NoSuchSongException

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

the class SongPersistenceImpl method findByUuid_First.

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

Example 24 with NoSuchSongException

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

the class SongPersistenceImpl method findByCompanyId_Last.

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

Example 25 with NoSuchSongException

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

the class SongPersistenceImpl method findByAlbumId_Last.

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

Aggregations

NoSuchSongException (org.liferay.jukebox.NoSuchSongException)41 Song (org.liferay.jukebox.model.Song)41 StringBundler (com.liferay.portal.kernel.util.StringBundler)24 Session (com.liferay.portal.kernel.dao.orm.Session)17 SystemException (com.liferay.portal.kernel.exception.SystemException)17 SongImpl (org.liferay.jukebox.model.impl.SongImpl)17