agave-files/files-core/src/main/java/org/iplantc/service/io/dao/FileEventDao.java
/**
	 * Deletes all job events for the job with given id
	 * 
	 * @param logicalFileId
	 * @throws LogicalFileException
	 */
Deletes all job events for the job with given id


Deletes all job events for the job with given id
public static void deleteByLogicalFileId(Long logicalFileId) throws LogicalFileException
	{
		if (logicalFileId == null) {
			return;
		}
		try
		{
			Session session = getSession();
			String hql = "delete from FileEvent where logicalFile.id = :fileid";
			session.createQuery(hql)
					.setLong("fileid", logicalFileId)
					.executeUpdate();
			session.flush();
		}
		catch (HibernateException ex)
		{
			try
			{
				if (HibernateUtil.getSession().isOpen()) {
					HibernateUtil.rollbackTransaction();
				}
			}
			catch (Exception e) {}
			throw new LogicalFileException("Failed to delete events for job " + logicalFileId, ex);
		}
		finally {
			try { HibernateUtil.commitTransaction(); } catch (Exception e) {}
		}
	}
public static void deleteByLogicalFileId ( Long logicalFileId ) throws LogicalFileException { if ( logicalFileId == null ) { return ; } try { Session session = getSession ( ) ; String hql = "delete from FileEvent where logicalFile.id = :fileid" ; session . createQuery ( hql ) . setLong ( "fileid" , logicalFileId ) . executeUpdate ( ) ; session . flush ( ) ; } catch ( HibernateException ex ) { try { if ( HibernateUtil . getSession ( ) . isOpen ( ) ) { HibernateUtil . rollbackTransaction ( ) ; } } catch ( Exception e ) { } throw new LogicalFileException ( "Failed to delete events for job " + logicalFileId , ex ) ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Exception e ) { } } }
Deletes all job events for the job with given id
Deletes all job events for the job with given id