use of org.liferay.jukebox.NoSuchSongException in project liferay-ide by liferay.
the class SongPersistenceImpl method findByUuid_C_First.
/**
* Returns the first song in the ordered set where uuid = ? and companyId = ?.
*
* @param uuid the uuid
* @param companyId the company ID
* @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_C_First(String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = fetchByUuid_C_First(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());
}
use of org.liferay.jukebox.NoSuchSongException in project liferay-ide by liferay.
the class SongPersistenceImpl method findByG_A_S_First.
/**
* Returns the first song in the ordered set where groupId = ? and albumId = ? and status = ?.
*
* @param groupId the group ID
* @param albumId the album ID
* @param status the status
* @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 findByG_A_S_First(long groupId, long albumId, int status, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = fetchByG_A_S_First(groupId, albumId, status, orderByComparator);
if (song != null) {
return song;
}
StringBundler msg = new StringBundler(8);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", albumId=");
msg.append(albumId);
msg.append(", status=");
msg.append(status);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchSongException(msg.toString());
}
use of org.liferay.jukebox.NoSuchSongException in project liferay-ide by liferay.
the class SongPersistenceImpl method findByG_LikeN_S_Last.
/**
* Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?.
*
* @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 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 findByG_LikeN_S_Last(long groupId, String name, int status, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = fetchByG_LikeN_S_Last(groupId, name, status, orderByComparator);
if (song != null) {
return song;
}
StringBundler msg = new StringBundler(8);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", name=");
msg.append(name);
msg.append(", status=");
msg.append(status);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchSongException(msg.toString());
}
use of org.liferay.jukebox.NoSuchSongException in project liferay-ide by liferay.
the class SongPersistenceImpl method findByCompanyId_First.
/**
* Returns the first song in the ordered set where companyId = ?.
*
* @param companyId the company ID
* @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 findByCompanyId_First(long companyId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = fetchByCompanyId_First(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());
}
use of org.liferay.jukebox.NoSuchSongException in project liferay-ide by liferay.
the class SongPersistenceImpl method findByArtistId_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where artistId = ?.
*
* @param songId the primary key of the current song
* @param artistId the artist ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next song
* @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Song[] findByArtistId_PrevAndNext(long songId, long artistId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByArtistId_PrevAndNext(session, song, artistId, orderByComparator, true);
array[1] = song;
array[2] = getByArtistId_PrevAndNext(session, song, artistId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations