agave-apps/apps-core/src/test/java/org/iplantc/service/apps/util/DomainSetup.java
/**
     * Deletes all Software objects from the db.
     */
Deletes all Software objects from the db.
Deletes all Software objects from the db .
public void clearSoftware() throws Exception
    {
        Session session = null;
        try
        {
            HibernateUtil.beginTransaction();
            session = HibernateUtil.getSession();
            session.clear();
            HibernateUtil.disableAllFilters();
            session.createQuery("DELETE SoftwareParameter").executeUpdate();
            session.createQuery("DELETE SoftwareInput").executeUpdate();
            session.createQuery("DELETE SoftwareOutput").executeUpdate();
            session.createSQLQuery("delete from softwares_parameters").executeUpdate();
            session.createSQLQuery("delete from softwares_inputs").executeUpdate();
            session.createSQLQuery("delete from softwares_outputs").executeUpdate();
            session.createQuery("DELETE SoftwarePermission").executeUpdate();
            session.createQuery("DELETE SoftwareParameterEnumeratedValue").executeUpdate();
            session.createQuery("DELETE SoftwareEvent").executeUpdate();
            session.createQuery("DELETE Software").executeUpdate();
            session.flush();
        }
        finally
        {
            try { HibernateUtil.commitTransaction(); } catch (Exception e) {}
        }
    }
public void clearSoftware ( ) throws Exception { Session session = null ; try { HibernateUtil . beginTransaction ( ) ; session = HibernateUtil . getSession ( ) ; session . clear ( ) ; HibernateUtil . disableAllFilters ( ) ; session . createQuery ( "DELETE SoftwareParameter" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SoftwareInput" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SoftwareOutput" ) . executeUpdate ( ) ; session . createSQLQuery ( "delete from softwares_parameters" ) . executeUpdate ( ) ; session . createSQLQuery ( "delete from softwares_inputs" ) . executeUpdate ( ) ; session . createSQLQuery ( "delete from softwares_outputs" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SoftwarePermission" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SoftwareParameterEnumeratedValue" ) . executeUpdate ( ) ; session . createQuery ( "DELETE SoftwareEvent" ) . executeUpdate ( ) ; session . createQuery ( "DELETE Software" ) . executeUpdate ( ) ; session . flush ( ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Deletes all Software objects from the db.
Deletes all Software objects from the db .