agave-apps/apps-core/src/test/java/org/iplantc/service/apps/util/DomainSetup.java
/**
     * Deletes all execution and storage systems from the db.
     */
Deletes all execution and storage systems from the db.
Deletes all execution and storage systems from the db .
public 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 SystemPermission").executeUpdate();
            session.createSQLQuery("delete from userdefaultsystems").executeUpdate();
            session.flush();
        }
        finally
        {
            try { HibernateUtil.commitTransaction(); } catch (Exception e) {}
        }
    }
public 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 SystemPermission" ) . executeUpdate ( ) ; session . createSQLQuery ( "delete from userdefaultsystems" ) . executeUpdate ( ) ; session . flush ( ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Deletes all execution and storage systems from the db.
Deletes all execution and storage systems from the db .