if (assignment.hasUnsavedLimitValues) { saveLimitValues(tempSession, assignment); }
  public void postFlush(Iterator entities) throws CallbackException  {    Session     tempSession;    Transaction tx;        while (entities.hasNext())    {      Object entity = entities.next();            if (entity instanceof AssignmentImpl)      {        AssignmentImpl assignment = (AssignmentImpl)entity;        tempSession = this.sessionFactory.openSession(this.connection);        tx = startXact(tempSession);                if (assignment.hasUnsavedLimitValues)        {          saveLimitValues(tempSession, assignment);        }        if (assignment.needsInitialHistoryRecord())        {          saveInitialHistoryRecord(tempSession, assignment);        }                try        {          tx.commit();          tempSession.flush();          tempSession.close();        }        catch (HibernateException he)        {          throw new CallbackException(he);        }      }    }  }