agave-profiles/profiles-core/src/main/java/org/iplantc/service/profile/dao/InternalUserDao.java
/**
	 * Saves or updates the InternalUser
	 * @param task
	 * @throws ProfileException
	 */
Saves or updates the InternalUser
@param task
@throws ProfileException
Saves or updates the InternalUser @param task @throws ProfileException
public void persist(InternalUser task) throws ProfileException
	{
		if (task == null)
			throw new ProfileException("Profile cannot be null");
		try
		{	
			Session session = getSession();
			session.saveOrUpdate(task);
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception e) {}
			throw new ProfileException("Failed to save internal user", ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception e) {e.printStackTrace();}
		}
	}
public void persist ( InternalUser task ) throws ProfileException { if ( task == null ) throw new ProfileException ( "Profile cannot be null" ) ; try { Session session = getSession ( ) ; session . saveOrUpdate ( task ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception e ) { } throw new ProfileException ( "Failed to save internal user" , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }
Saves or updates the InternalUser
 @param task
 @throws ProfileException
Saves or updates the InternalUser @param task @throws ProfileException