Search in sources :

Example 6 with AlbumImpl

use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.

the class AlbumPersistenceImpl method findByGroupId_PrevAndNext.

/**
 * Returns the albums before and after the current album in the ordered set where groupId = ?.
 *
 * @param albumId the primary key of the current album
 * @param groupId the group ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the previous, current, and next album
 * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Album[] findByGroupId_PrevAndNext(long albumId, long groupId, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
    Album album = findByPrimaryKey(albumId);
    Session session = null;
    try {
        session = openSession();
        Album[] array = new AlbumImpl[3];
        array[0] = getByGroupId_PrevAndNext(session, album, groupId, orderByComparator, true);
        array[1] = album;
        array[2] = getByGroupId_PrevAndNext(session, album, groupId, orderByComparator, false);
        return array;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : AlbumImpl(org.liferay.jukebox.model.impl.AlbumImpl) Album(org.liferay.jukebox.model.Album) SystemException(com.liferay.portal.kernel.exception.SystemException) NoSuchAlbumException(org.liferay.jukebox.NoSuchAlbumException) Session(com.liferay.portal.kernel.dao.orm.Session)

Example 7 with AlbumImpl

use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.

the class AlbumPersistenceImpl method findByG_A_S_PrevAndNext.

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

Example 8 with AlbumImpl

use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.

the class AlbumPersistenceImpl method filterFindByG_A_S_PrevAndNext.

/**
 * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = &#63; and artistId = &#63; and status = &#63;.
 *
 * @param albumId the primary key of the current album
 * @param groupId the group ID
 * @param artistId the artist ID
 * @param status the status
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the previous, current, and next album
 * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Album[] filterFindByG_A_S_PrevAndNext(long albumId, long groupId, long artistId, int status, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
    if (!InlineSQLHelperUtil.isEnabled(groupId)) {
        return findByG_A_S_PrevAndNext(albumId, groupId, artistId, status, orderByComparator);
    }
    Album album = findByPrimaryKey(albumId);
    Session session = null;
    try {
        session = openSession();
        Album[] array = new AlbumImpl[3];
        array[0] = filterGetByG_A_S_PrevAndNext(session, album, groupId, artistId, status, orderByComparator, true);
        array[1] = album;
        array[2] = filterGetByG_A_S_PrevAndNext(session, album, groupId, artistId, status, orderByComparator, false);
        return array;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : AlbumImpl(org.liferay.jukebox.model.impl.AlbumImpl) Album(org.liferay.jukebox.model.Album) SystemException(com.liferay.portal.kernel.exception.SystemException) NoSuchAlbumException(org.liferay.jukebox.NoSuchAlbumException) Session(com.liferay.portal.kernel.dao.orm.Session)

Example 9 with AlbumImpl

use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.

the class AlbumPersistenceImpl method findByUserId_PrevAndNext.

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

Example 10 with AlbumImpl

use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.

the class AlbumPersistenceImpl method findByG_S_PrevAndNext.

/**
 * Returns the albums before and after the current album in the ordered set where groupId = &#63; and status = &#63;.
 *
 * @param albumId the primary key of the current album
 * @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 album
 * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found
 * @throws SystemException if a system exception occurred
 */
@Override
public Album[] findByG_S_PrevAndNext(long albumId, long groupId, int status, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
    Album album = findByPrimaryKey(albumId);
    Session session = null;
    try {
        session = openSession();
        Album[] array = new AlbumImpl[3];
        array[0] = getByG_S_PrevAndNext(session, album, groupId, status, orderByComparator, true);
        array[1] = album;
        array[2] = getByG_S_PrevAndNext(session, album, groupId, status, orderByComparator, false);
        return array;
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }
}
Also used : AlbumImpl(org.liferay.jukebox.model.impl.AlbumImpl) Album(org.liferay.jukebox.model.Album) SystemException(com.liferay.portal.kernel.exception.SystemException) NoSuchAlbumException(org.liferay.jukebox.NoSuchAlbumException) Session(com.liferay.portal.kernel.dao.orm.Session)

Aggregations

AlbumImpl (org.liferay.jukebox.model.impl.AlbumImpl)17 Album (org.liferay.jukebox.model.Album)16 Session (com.liferay.portal.kernel.dao.orm.Session)15 SystemException (com.liferay.portal.kernel.exception.SystemException)15 NoSuchAlbumException (org.liferay.jukebox.NoSuchAlbumException)15