agave-files/files-core/src/test/java/org/iplantc/service/io/BaseTestCase.java
/**
     * Clears all logical files and related entity tables from db
     * @throws Exception if something goes wrong
     */
Clears all logical files and related entity tables from db
@throws Exception if something goes wrong
Clears all logical files and related entity tables from db @throws Exception if something goes wrong
protected void clearLogicalFiles() throws Exception {
		Session session = null;
		try
		{
			HibernateUtil.beginTransaction();
			session = HibernateUtil.getSession();
			session.clear();
			HibernateUtil.disableAllFilters();
			session.createQuery("DELETE LogicalFile").executeUpdate();
			session.createQuery("DELETE StagingTask").executeUpdate();
			session.createQuery("DELETE RemoteFilePermission").executeUpdate();
			session.createQuery("DELETE TransferTaskPermission").executeUpdate();
			session.createQuery("DELETE TransferTask").executeUpdate();
			session.createQuery("DELETE Notification").executeUpdate();
		}
		catch (HibernateException ex)
		{
			throw new SystemException(ex);
		}
		finally
		{
			try {
                if (session != null) {
                    session.close();
                }
            } catch (Exception ignored) {}
		}
	}
protected void clearLogicalFiles ( ) throws Exception { Session session = null ; try { HibernateUtil . beginTransaction ( ) ; session = HibernateUtil . getSession ( ) ; session . clear ( ) ; HibernateUtil . disableAllFilters ( ) ; session . createQuery ( "DELETE LogicalFile" ) . executeUpdate ( ) ; session . createQuery ( "DELETE StagingTask" ) . executeUpdate ( ) ; session . createQuery ( "DELETE RemoteFilePermission" ) . executeUpdate ( ) ; session . createQuery ( "DELETE TransferTaskPermission" ) . executeUpdate ( ) ; session . createQuery ( "DELETE TransferTask" ) . executeUpdate ( ) ; session . createQuery ( "DELETE Notification" ) . executeUpdate ( ) ; } catch ( HibernateException ex ) { throw new SystemException ( ex ) ; } finally { try { if ( session != null ) { session . close ( ) ; } } catch ( Exception ignored ) { } } }
Clears all logical files and related entity tables from db
 @throws Exception if something goes wrong
Clears all logical files and related entity tables from db @throws Exception if something goes wrong