agave-monitors/monitors-core/src/main/java/org/iplantc/service/monitor/dao/MonitorCheckDao.java
/**
	 * Finds check by uuid within a tenant
	 * 
	 * @param uuid the monitor uuid to find
	 * @return the monitor with the given uuid or null if not found
	 * @throws MonitorException when unable to query the db
	 */
Finds check by uuid within a tenant

@param uuid the monitor uuid to find
@return the monitor with the given uuid or null if not found
@throws MonitorException when unable to query the db
Finds check by uuid within a tenant @param uuid the monitor uuid to find @return the monitor with the given uuid or null if not found @throws MonitorException when unable to query the db
public MonitorCheck findByUuid(String uuid) throws MonitorException
	{
		try
		{
			Session session = getSession();
			String hql = "from MonitorCheck t where t.uuid = :uuid";
			MonitorCheck check = (MonitorCheck)session.createQuery(hql)
					.setString("uuid",uuid)
					.uniqueResult();
			session.flush();
			return check;
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception ignored) {}
			throw new MonitorException(ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception ignored) {}
		}
	}
public MonitorCheck findByUuid ( String uuid ) throws MonitorException { try { Session session = getSession ( ) ; String hql = "from MonitorCheck t where t.uuid = :uuid" ; MonitorCheck check = ( MonitorCheck ) session . createQuery ( hql ) . setString ( "uuid" , uuid ) . uniqueResult ( ) ; session . flush ( ) ; return check ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception ignored ) { } throw new MonitorException ( ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception ignored ) { } } }
Finds check by uuid within a tenant
Finds check by uuid within a tenant