agave-common/common-core/src/main/java/org/iplantc/service/common/dao/TenantDao.java
/**
	 * Deletes a tenant from the db.
	 * @param tenant the tenant to delete
	 * @throws TenantException if unable to query
	 */
Deletes a tenant from the db.
@param tenant the tenant to delete
@throws TenantException if unable to query
Deletes a tenant from the db . @param tenant the tenant to delete @throws TenantException if unable to query
public void delete(Tenant tenant) throws TenantException
	{
		if (tenant == null)
			throw new TenantException("Job cannot be null");
		try
		{
			Session session = getSession();
			session.clear();
			session.delete(tenant);
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Throwable ignored) {}
			throw new TenantException(ex);
		}
		finally {
			try { HibernateUtil.commitTransaction();} catch (Exception ignored) {}
		}
	}
public void delete ( Tenant tenant ) throws TenantException { if ( tenant == null ) throw new TenantException ( "Job cannot be null" ) ; try { Session session = getSession ( ) ; session . clear ( ) ; session . delete ( tenant ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Throwable ignored ) { } throw new TenantException ( ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception ignored ) { } } }
Deletes a tenant from the db.
Deletes a tenant from the db .