agave-notifications/notifications-core/src/main/java/org/iplantc/service/notification/dao/NotificationAttemptDao.java
/**
	 * Fetches a {@link NotificationAttempt} by its uuid.
	 * 
	 * @param uuid {@link NotificationAttempt#getUuid()} to search by
	 * @return
	 * @throws NotificationException
	 */
Fetches a  NotificationAttempt by its uuid.

@param uuid  NotificationAttempt#getUuid() to search by
@return
@throws NotificationException
Fetches a NotificationAttempt by its uuid . @param uuid NotificationAttempt#getUuid () to search by @return @throws NotificationException
public NotificationAttempt findByUuid(String uuid) throws NotificationException
	{
		try
		{
			Session session = getSession();
			String hql = "from NotificationAttempt where uuid = :uuid";
			NotificationAttempt attempt = (NotificationAttempt)session.createQuery(hql)
					.setString("uuid",uuid)
					.uniqueResult();
			session.flush();
			return attempt;
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception e) {}
			throw new NotificationException(ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception e) {}
		}
	}
public NotificationAttempt findByUuid ( String uuid ) throws NotificationException { try { Session session = getSession ( ) ; String hql = "from NotificationAttempt where uuid = :uuid" ; NotificationAttempt attempt = ( NotificationAttempt ) session . createQuery ( hql ) . setString ( "uuid" , uuid ) . uniqueResult ( ) ; session . flush ( ) ; return attempt ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception e ) { } throw new NotificationException ( ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Fetches a {@link NotificationAttempt} by its uuid.
Fetches a { @link NotificationAttempt } by its uuid .