agave-tags/tags-core/src/main/java/org/iplantc/service/tags/dao/TagEventDao.java
/**
	 * Deletes all {@link TagEvent} for the tag with given {@code tagUuid}.
	 *
	 * @param tagUuid the uuid of the tag whose events we will query
	 * @throws TagEventPersistenceException if unable to delete events for the given tag
	 */
Deletes all  TagEvent for the tag with given  tagUuid.
@param tagUuid the uuid of the tag whose events we will query
@throws TagEventPersistenceException if unable to delete events for the given tag
Deletes all TagEvent for the tag with given tagUuid . @param tagUuid the uuid of the tag whose events we will query @throws TagEventPersistenceException if unable to delete events for the given tag
public void deleteByTagId(String tagUuid) throws TagEventPersistenceException
	{
		if (StringUtils.isEmpty(tagUuid)) {
			return;
		}
		try
		{
			Session session = getSession();
			String hql = "DELETE from TagEvent t where t.entity = :uuid";
			session.createQuery(hql)
					.setString("uuid", tagUuid)
					.setCacheMode(CacheMode.IGNORE)
					.setCacheable(false)
					.executeUpdate();
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception ignored) {}
			throw new TagEventPersistenceException("Failed to delete events for tag " + tagUuid, ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception ignored) {}
		}
	}
public void deleteByTagId ( String tagUuid ) throws TagEventPersistenceException { if ( StringUtils . isEmpty ( tagUuid ) ) { return ; } try { Session session = getSession ( ) ; String hql = "DELETE from TagEvent t where t.entity = :uuid" ; session . createQuery ( hql ) . setString ( "uuid" , tagUuid ) . setCacheMode ( CacheMode . IGNORE ) . setCacheable ( false ) . executeUpdate ( ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception ignored ) { } throw new TagEventPersistenceException ( "Failed to delete events for tag " + tagUuid , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception ignored ) { } } }
Deletes all {@link TagEvent} for the tag with given {@code tagUuid}.
Deletes all { @link TagEvent } for the tag with given { @code tagUuid } .