use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByU_G_First.
/**
* Returns the first artist in the ordered set where userId = ? and groupId = ?.
*
* @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 first matching artist
* @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist findByU_G_First(long userId, long groupId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = fetchByU_G_First(userId, groupId, orderByComparator);
if (artist != null) {
return artist;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("userId=");
msg.append(userId);
msg.append(", groupId=");
msg.append(groupId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchArtistException(msg.toString());
}
use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByUUID_G.
/**
* Returns the artist where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found.
*
* @param uuid the uuid
* @param groupId the group ID
* @return the matching artist
* @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist findByUUID_G(String uuid, long groupId) throws NoSuchArtistException, SystemException {
Artist artist = fetchByUUID_G(uuid, groupId);
if (artist == null) {
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(", groupId=");
msg.append(groupId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
if (_log.isWarnEnabled()) {
_log.warn(msg.toString());
}
throw new NoSuchArtistException(msg.toString());
}
return artist;
}
use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.
the class ArtistPersistenceImpl method filterFindByG_LikeN_S_PrevAndNext.
/**
* Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view 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[] filterFindByG_LikeN_S_PrevAndNext(long artistId, long groupId, String name, int status, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByG_LikeN_S_PrevAndNext(artistId, groupId, name, status, orderByComparator);
}
Artist artist = findByPrimaryKey(artistId);
Session session = null;
try {
session = openSession();
Artist[] array = new ArtistImpl[3];
array[0] = filterGetByG_LikeN_S_PrevAndNext(session, artist, groupId, name, status, orderByComparator, true);
array[1] = artist;
array[2] = filterGetByG_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.NoSuchArtistException in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByUserId_Last.
/**
* Returns the last artist in the ordered set where userId = ?.
*
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching artist
* @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist findByUserId_Last(long userId, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = fetchByUserId_Last(userId, orderByComparator);
if (artist != null) {
return artist;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("userId=");
msg.append(userId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchArtistException(msg.toString());
}
use of org.liferay.jukebox.NoSuchArtistException in project liferay-ide by liferay.
the class ArtistPersistenceImpl method findByUuid_Last.
/**
* Returns the last artist in the ordered set where uuid = ?.
*
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching artist
* @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Artist findByUuid_Last(String uuid, OrderByComparator orderByComparator) throws NoSuchArtistException, SystemException {
Artist artist = fetchByUuid_Last(uuid, orderByComparator);
if (artist != null) {
return artist;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchArtistException(msg.toString());
}
Aggregations