agave-realtime/realtime-core/src/main/java/org/iplantc/service/realtime/dao/RealtimeChannelEventDao.java
/**
	 * Saves or updates the {@link RealtimeChannelEvent}.
	 * @param event the event to persist.
	 * @throws RealtimeChannelEventException
	 */
Saves or updates the  RealtimeChannelEvent.
@param event the event to persist.
Saves or updates the RealtimeChannelEvent . @param event the event to persist .
public static void persist(RealtimeChannelEvent event) throws RealtimeChannelEventException
	{
		if (event == null)
			throw new RealtimeChannelEventException("Event cannot be null");
		try
		{
			Session session = getSession();
			session.saveOrUpdate(event);
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception e) {}
			throw new RealtimeChannelEventException("Failed to save event.", ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception e) {}
		}
	}
public static void persist ( RealtimeChannelEvent event ) throws RealtimeChannelEventException { if ( event == null ) throw new RealtimeChannelEventException ( "Event cannot be null" ) ; try { Session session = getSession ( ) ; session . saveOrUpdate ( event ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception e ) { } throw new RealtimeChannelEventException ( "Failed to save event." , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Saves or updates the {@link RealtimeChannelEvent}.
Saves or updates the { @link RealtimeChannelEvent } .