agave-tags/tags-core/src/main/java/org/iplantc/service/tags/dao/TagEventDao.java
/**
	 * Saves a new {@link TagEvent}. Updates existing ones.
	 * @param event the tag event to save
	 * @throws TagEventPersistenceException if unable to save the event
	 */
Saves a new  TagEvent. Updates existing ones.
@param event the tag event to save
@throws TagEventPersistenceException if unable to save the event
Saves a new TagEvent . Updates existing ones . @param event the tag event to save @throws TagEventPersistenceException if unable to save the event
public void persist(TagEvent event) throws TagEventPersistenceException
	{
		if (event == null)
			throw new TagEventPersistenceException("TagEvent cannot be null");
		try
		{
			Session session = getSession();
			session.saveOrUpdate(event);
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception ignored) {}
			throw new TagEventPersistenceException("Failed to save tag event.", ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception ignored) {}
		}
	}
public void persist ( TagEvent event ) throws TagEventPersistenceException { if ( event == null ) throw new TagEventPersistenceException ( "TagEvent cannot be null" ) ; try { Session session = getSession ( ) ; session . saveOrUpdate ( event ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception ignored ) { } throw new TagEventPersistenceException ( "Failed to save tag event." , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception ignored ) { } } }
Saves a new {@link TagEvent}.
Saves a new { @link TagEvent } .