use of org.liferay.jukebox.model.impl.ArtistImpl in project liferay-ide by liferay.
the class ArtistPersistenceImpl method filterFindByU_G_PrevAndNext.
/**
* Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where userId = ? and groupId = ?.
*
* @param artistId the primary key of the current artist
* @param userId the user ID
* @param groupId the group ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next artist
* @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist[] filterFindByU_G_PrevAndNext(long artistId, long userId, long groupId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByU_G_PrevAndNext(artistId, userId, groupId, orderByComparator);
}
Artist artist = findByPrimaryKey(artistId);
Session session = null;
try {
session = openSession();
Artist[] array = new ArtistImpl[3];
array[0] = filterGetByU_G_PrevAndNext(session, artist, userId, groupId, orderByComparator, true);
array[1] = artist;
array[2] = filterGetByU_G_PrevAndNext(session, artist, userId, groupId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.ArtistImpl in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByG_S_PrevAndNext.
/**
* Returns the artists before and after the current artist in the ordered set where groupId = ? and status = ?.
*
* @param artistId the primary key of the current artist
* @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 artist
* @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist[] findByG_S_PrevAndNext(long artistId, long groupId, int status, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = findByPrimaryKey(artistId);
Session session = null;
try {
session = openSession();
Artist[] array = new ArtistImpl[3];
array[0] = getByG_S_PrevAndNext(session, artist, groupId, status, orderByComparator, true);
array[1] = artist;
array[2] = getByG_S_PrevAndNext(session, artist, groupId, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.ArtistImpl in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByCompanyId_PrevAndNext.
/**
* Returns the artists before and after the current artist in the ordered set where companyId = ?.
*
* @param artistId the primary key of the current artist
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next artist
* @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist[] findByCompanyId_PrevAndNext(long artistId, long companyId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = findByPrimaryKey(artistId);
Session session = null;
try {
session = openSession();
Artist[] array = new ArtistImpl[3];
array[0] = getByCompanyId_PrevAndNext(session, artist, companyId, orderByComparator, true);
array[1] = artist;
array[2] = getByCompanyId_PrevAndNext(session, artist, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.ArtistImpl in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByG_LikeN_S_PrevAndNext.
/**
* Returns the artists before and after the current artist in the ordered set where groupId = ? and name LIKE ? and status = ?.
*
* @param artistId the primary key of the current artist
* @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 artist
* @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist[] findByG_LikeN_S_PrevAndNext(long artistId, long groupId, String name, int status, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = findByPrimaryKey(artistId);
Session session = null;
try {
session = openSession();
Artist[] array = new ArtistImpl[3];
array[0] = getByG_LikeN_S_PrevAndNext(session, artist, groupId, name, status, orderByComparator, true);
array[1] = artist;
array[2] = getByG_LikeN_S_PrevAndNext(session, artist, groupId, name, status, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of org.liferay.jukebox.model.impl.ArtistImpl in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the artists before and after the current artist in the ordered set where uuid = ? and companyId = ?.
*
* @param artistId the primary key of the current artist
* @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 artist
* @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist[] findByUuid_C_PrevAndNext(long artistId, String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = findByPrimaryKey(artistId);
Session session = null;
try {
session = openSession();
Artist[] array = new ArtistImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, artist, uuid, companyId, orderByComparator, true);
array[1] = artist;
array[2] = getByUuid_C_PrevAndNext(session, artist, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations