use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.
the class AlbumPersistenceImpl method findByCompanyId_PrevAndNext.
/**
* Returns the albums before and after the current album in the ordered set where companyId = ?.
*
* @param albumId the primary key of the current album
* @param companyId the company 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[] findByCompanyId_PrevAndNext(long albumId, long companyId, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
Album album = findByPrimaryKey(albumId);
Session session = null;
try {
session = openSession();
Album[] array = new AlbumImpl[3];
array[0] = getByCompanyId_PrevAndNext(session, album, companyId, orderByComparator, true);
array[1] = album;
array[2] = getByCompanyId_PrevAndNext(session, album, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.
the class AlbumPersistenceImpl method filterFindByG_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 = ? and status = ?.
*
* @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[] filterFindByG_S_PrevAndNext(long albumId, long groupId, int status, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByG_S_PrevAndNext(albumId, groupId, status, orderByComparator);
}
Album album = findByPrimaryKey(albumId);
Session session = null;
try {
session = openSession();
Album[] array = new AlbumImpl[3];
array[0] = filterGetByG_S_PrevAndNext(session, album, groupId, status, orderByComparator, true);
array[1] = album;
array[2] = filterGetByG_S_PrevAndNext(session, album, groupId, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.
the class AlbumPersistenceImpl method findByUuid_PrevAndNext.
/**
* Returns the albums before and after the current album in the ordered set where uuid = ?.
*
* @param albumId the primary key of the current album
* @param uuid the uuid
* @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[] findByUuid_PrevAndNext(long albumId, String uuid, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
Album album = findByPrimaryKey(albumId);
Session session = null;
try {
session = openSession();
Album[] array = new AlbumImpl[3];
array[0] = getByUuid_PrevAndNext(session, album, uuid, orderByComparator, true);
array[1] = album;
array[2] = getByUuid_PrevAndNext(session, album, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.
the class AlbumPersistenceImpl method findByG_LikeN_S_PrevAndNext.
/**
* Returns the albums before and after the current album in the ordered set where groupId = ? and name LIKE ? and status = ?.
*
* @param albumId the primary key of the current album
* @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 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_LikeN_S_PrevAndNext(long albumId, long groupId, String name, 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_LikeN_S_PrevAndNext(session, album, groupId, name, status, orderByComparator, true);
array[1] = album;
array[2] = getByG_LikeN_S_PrevAndNext(session, album, groupId, name, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.AlbumImpl in project liferay-ide by liferay.
the class AlbumPersistenceImpl method filterFindByG_U_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 = ? and userId = ?.
*
* @param albumId the primary key of the current album
* @param groupId the group ID
* @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[] filterFindByG_U_PrevAndNext(long albumId, long groupId, long userId, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByG_U_PrevAndNext(albumId, groupId, userId, orderByComparator);
}
Album album = findByPrimaryKey(albumId);
Session session = null;
try {
session = openSession();
Album[] array = new AlbumImpl[3];
array[0] = filterGetByG_U_PrevAndNext(session, album, groupId, userId, orderByComparator, true);
array[1] = album;
array[2] = filterGetByG_U_PrevAndNext(session, album, groupId, userId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations