public static int deleteExpiredHistory(EntityManager em){
  requireArgument(em != null,"Entity manager cannot be null.");
  Query query=em.createNamedQuery("History.cullExpired");
  query.setParameter("expirationDate",new Date(System.currentTimeMillis() - (2 * MILLIS_PER_WEEK)));
  return query.executeUpdate();
}

public static int deleteExpiredHistory ( EntityManager em ) { requireArgument ( em != null , "Entity manager cannot be null." ) ; Query query = em . createNamedQuery ( "History.cullExpired" ) ; query . setParameter ( "expirationDate" , new Date ( System . currentTimeMillis ( ) - ( 2 * MILLIS_PER_WEEK ) ) ) ; return query . executeUpdate ( ) ; }
deletes the old job history .
