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