use of org.liferay.jukebox.model.impl.SongImpl 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);
}
}
use of org.liferay.jukebox.model.impl.SongImpl in project liferay-ide by liferay.
the class SongPersistenceImpl method filterFindByGroupId_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 = ?.
*
* @param songId the primary key of the current song
* @param groupId the group 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[] filterFindByGroupId_PrevAndNext(long songId, long groupId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByGroupId_PrevAndNext(songId, groupId, orderByComparator);
}
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = filterGetByGroupId_PrevAndNext(session, song, groupId, orderByComparator, true);
array[1] = song;
array[2] = filterGetByGroupId_PrevAndNext(session, song, groupId, 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 findByG_LikeN_S_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where groupId = ? and name LIKE ? and status = ?.
*
* @param songId the primary key of the current song
* @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 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[] findByG_LikeN_S_PrevAndNext(long songId, long groupId, String name, int status, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByG_LikeN_S_PrevAndNext(session, song, groupId, name, status, orderByComparator, true);
array[1] = song;
array[2] = getByG_LikeN_S_PrevAndNext(session, song, groupId, name, status, 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 findByGroupId_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where groupId = ?.
*
* @param songId the primary key of the current song
* @param groupId the group 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[] findByGroupId_PrevAndNext(long songId, long groupId, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByGroupId_PrevAndNext(session, song, groupId, orderByComparator, true);
array[1] = song;
array[2] = getByGroupId_PrevAndNext(session, song, groupId, 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 findByG_S_PrevAndNext.
/**
* Returns the songs before and after the current song in the ordered set where groupId = ? and status = ?.
*
* @param songId the primary key of the current song
* @param groupId the group 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[] findByG_S_PrevAndNext(long songId, long groupId, int status, OrderByComparator orderByComparator) throws NoSuchSongException, SystemException {
Song song = findByPrimaryKey(songId);
Session session = null;
try {
session = openSession();
Song[] array = new SongImpl[3];
array[0] = getByG_S_PrevAndNext(session, song, groupId, status, orderByComparator, true);
array[1] = song;
array[2] = getByG_S_PrevAndNext(session, song, groupId, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations