use of org.liferay.jukebox.NoSuchAlbumException 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 = ? and artistId = ? and status = ?.
*
* @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);
}
}
use of org.liferay.jukebox.NoSuchAlbumException in project liferay-ide by liferay.
the class AlbumPersistenceImpl method findByG_S_First.
/**
* Returns the first album in the ordered set where groupId = ? and status = ?.
*
* @param groupId the group ID
* @param status the status
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching album
* @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Album findByG_S_First(long groupId, int status, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
Album album = fetchByG_S_First(groupId, status, orderByComparator);
if (album != null) {
return album;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", status=");
msg.append(status);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchAlbumException(msg.toString());
}
use of org.liferay.jukebox.NoSuchAlbumException 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 = ?.
*
* @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);
}
}
use of org.liferay.jukebox.NoSuchAlbumException in project liferay-ide by liferay.
the class AlbumPersistenceImpl method findByG_A_S_Last.
/**
* Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?.
*
* @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 last matching album
* @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Album findByG_A_S_Last(long groupId, long artistId, int status, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
Album album = fetchByG_A_S_Last(groupId, artistId, status, orderByComparator);
if (album != null) {
return album;
}
StringBundler msg = new StringBundler(8);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", artistId=");
msg.append(artistId);
msg.append(", status=");
msg.append(status);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchAlbumException(msg.toString());
}
use of org.liferay.jukebox.NoSuchAlbumException in project liferay-ide by liferay.
the class AlbumPersistenceImpl method findByG_U_Last.
/**
* Returns the last album in the ordered set where groupId = ? and userId = ?.
*
* @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 last matching album
* @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Album findByG_U_Last(long groupId, long userId, OrderByComparator orderByComparator) throws NoSuchAlbumException, SystemException {
Album album = fetchByG_U_Last(groupId, userId, orderByComparator);
if (album != null) {
return album;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("groupId=");
msg.append(groupId);
msg.append(", userId=");
msg.append(userId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchAlbumException(msg.toString());
}
Aggregations