/**
  * This form is used to build a StoredProcedureQueryImpl from a memento (usually from a
  * NamedStoredProcedureQuery).
  *
  * @param memento The memento
  * @param entityManager The EntityManager
  */
 @SuppressWarnings("unchecked")
 public StoredProcedureQueryImpl(
     ProcedureCallMemento memento, HibernateEntityManagerImplementor entityManager) {
   super(entityManager);
   this.procedureCall = memento.makeProcedureCall(entityManager.getSession());
   for (org.hibernate.procedure.ParameterRegistration nativeParamReg :
       procedureCall.getRegisteredParameters()) {
     registerParameter(new ParameterRegistrationImpl(this, nativeParamReg));
   }
 }