agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/dao/AbstractDaoTest.java
/**
     * Removes all storage and execution systems from the db
     */
Removes all storage and execution systems from the db
Removes all storage and execution systems from the db
protected void clearSystems()
    {
        Session session = null;
        try
        {
            HibernateUtil.beginTransaction();
            session = HibernateUtil.getSession();
            session.clear();
            HibernateUtil.disableAllFilters();
            session.createQuery("DELETE ExecutionSystem").executeUpdate();
            session.createQuery("DELETE BatchQueue").executeUpdate();
            session.createQuery("DELETE AuthConfig").executeUpdate();
            session.createQuery("DELETE LoginConfig").executeUpdate();
            session.createQuery("DELETE CredentialServer").executeUpdate();
            session.createQuery("DELETE TransferTask").executeUpdate();
            session.createQuery("DELETE RemoteConfig").executeUpdate();
            session.createQuery("DELETE StorageSystem").executeUpdate();
            session.createQuery("DELETE StorageConfig").executeUpdate();
            session.createQuery("DELETE SystemRole").executeUpdate();
            session.createQuery("DELETE SystemHistoryEvent").executeUpdate();
            session.createQuery("DELETE SystemPermission").executeUpdate();
            session.createSQLQuery("delete from userdefaultsystems").executeUpdate();
            session.flush();
        } catch (Throwable t) {
            t.printStackTrace();
        }
        finally
        {
            try { HibernateUtil.commitTransaction(); } catch (Exception ignored) {}
        }
    }
protected void clearSystems ( ) { Session session = null ; try { HibernateUtil . beginTransaction ( ) ; session = HibernateUtil . getSession ( ) ; session . clear ( ) ; HibernateUtil . disableAllFilters ( ) ; session . createQuery ( "DELETE ExecutionSystem" ) . executeUpdate ( ) ; session . createQuery ( "DELETE BatchQueue" ) . executeUpdate ( ) ; session . createQuery ( "DELETE AuthConfig" ) . executeUpdate ( ) ; session . createQuery ( "DELETE LoginConfig" ) . executeUpdate ( ) ; session . createQuery ( "DELETE CredentialServer" ) . executeUpdate ( ) ; session . createQuery ( "DELETE TransferTask" ) . executeUpdate ( ) ; session . createQuery ( "DELETE RemoteConfig" ) . executeUpdate ( ) ; session . createQuery ( "DELETE StorageSystem" ) . executeUpdate ( ) ; session . createQuery ( "DELETE StorageConfig" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SystemRole" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SystemHistoryEvent" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SystemPermission" ) . executeUpdate ( ) ; session . createSQLQuery ( "delete from userdefaultsystems" ) . executeUpdate ( ) ; session . flush ( ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception ignored ) { } } }
Removes all storage and execution systems from the db
Removes all storage and execution systems from the db