agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/dao/JobPermissionDao.java
/**
	 * Deletes all permissions for the job with given id
	 * 
	 * @param jobId
	 * @throws JobException
	 */
Deletes all permissions for the job with given id

@param jobId
@throws JobException
Deletes all permissions for the job with given id @param jobId @throws JobException
public static void deleteByJobId(Long jobId) throws JobException
	{
		if (jobId == null) {
			return;
		}
		try
		{
			Session session = getSession();
			String hql = "delete from JobPermission where jobId = :jobid";
			session.createQuery(hql)
					.setLong("jobid", jobId)
					.executeUpdate();
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception e) {}
			throw new JobException("Failed to delete permissions for job " + jobId, ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception e) {}
		}
	}
public static void deleteByJobId ( Long jobId ) throws JobException { if ( jobId == null ) { return ; } try { Session session = getSession ( ) ; String hql = "delete from JobPermission where jobId = :jobid" ; session . createQuery ( hql ) . setLong ( "jobid" , jobId ) . executeUpdate ( ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception e ) { } throw new JobException ( "Failed to delete permissions for job " + jobId , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Deletes all permissions for the job with given id
Deletes all permissions for the job with given id