use of org.liferay.jukebox.model.impl.SongImpl in project liferay-ide by liferay.
the class SongPersistenceImpl method filterFindByG_A_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ?.
*
* @param songId the primary key of the current song
* @param groupId the group ID
* @param albumId the album 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[] filterFindByG_A_PrevAndNext(long songId, long groupId, long albumId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByG_A_PrevAndNext(songId, groupId, albumId, orderByComparator);
}
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = filterGetByG_A_PrevAndNext(session, song, groupId, albumId, orderByComparator, true);
array[1] = song;
array[2] = filterGetByG_A_PrevAndNext(session, song, groupId, albumId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.SongImpl in project liferay-ide by liferay.
the class SongPersistenceImpl method findByUserId_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where userId = ?.
*
* @param songId the primary key of the current song
* @param userId the user 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[] findByUserId_PrevAndNext(long songId, long userId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByUserId_PrevAndNext(session, song, userId, orderByComparator, true);
array[1] = song;
array[2] = getByUserId_PrevAndNext(session, song, userId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.SongImpl in project liferay-ide by liferay.
the class SongPersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where uuid = ? and companyId = ?.
*
* @param songId the primary key of the current song
* @param uuid the uuid
* @param companyId the company 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[] findByUuid_C_PrevAndNext(long songId, String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, song, uuid, companyId, orderByComparator, true);
array[1] = song;
array[2] = getByUuid_C_PrevAndNext(session, song, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.SongImpl in project liferay-ide by liferay.
the class SongPersistenceImpl method findByUuid_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where uuid = ?.
*
* @param songId the primary key of the current song
* @param uuid the uuid
* @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[] findByUuid_PrevAndNext(long songId, String uuid, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByUuid_PrevAndNext(session, song, uuid, orderByComparator, true);
array[1] = song;
array[2] = getByUuid_PrevAndNext(session, song, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.SongImpl in project liferay-ide by liferay.
the class SongPersistenceImpl method filterFindByG_A_S_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?.
*
* @param songId the primary key of the current song
* @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 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[] filterFindByG_A_S_PrevAndNext(long songId, long groupId, long albumId, int status, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByG_A_S_PrevAndNext(songId, groupId, albumId, status, orderByComparator);
}
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = filterGetByG_A_S_PrevAndNext(session, song, groupId, albumId, status, orderByComparator, true);
array[1] = song;
array[2] = filterGetByG_A_S_PrevAndNext(session, song, groupId, albumId, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations