Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1627


Ignore:
Timestamp:
04/23/09 14:48:21 (16 years ago)
Author:
msteinbi
Message:

Implemented method GetAllJobResults in jobManager (#596)

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IJobManager.cs

    r1509 r1627  
    4242    ResponseObject<JobResult> GetLastJobResultOf(Guid jobId, bool requested);
    4343    [OperationContract]
     44    ResponseObject<List<JobResult>> GetAllJobResults(Guid jobId);
     45    [OperationContract]
    4446    Response RequestSnapshot(Guid jobId);
    4547    [OperationContract]
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs

    r1626 r1627  
    315315    }
    316316
     317    public ResponseObject<List<JobResult>> GetAllJobResults(Guid jobId) {
     318      ISession session = factory.GetSessionForCurrentThread();
     319      ResponseObject<List<JobResult>> response = new ResponseObject<List<JobResult>>();
     320
     321      try {
     322        IJobResultsAdapter jobResultAdapter =
     323            session.GetDataAdapter<JobResult, IJobResultsAdapter>();
     324        IJobAdapter jobAdapter = session.GetDataAdapter<Job, IJobAdapter>();
     325
     326        Job job = jobAdapter.GetById(jobId);
     327        if (job == null) {
     328          response.Success = false;
     329          response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST;
     330          return response;
     331        }
     332        response.Obj = new List<JobResult>(jobResultAdapter.GetResultsOf(job));
     333        response.Success = true;
     334        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT;
     335
     336        return response;
     337      }
     338      finally {
     339        if(session != null)
     340          session.EndSession();
     341      }
     342    }
     343     
    317344    #endregion
    318345  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs

    r1530 r1627  
    107107    }
    108108
     109    public ResponseObject<List<JobResult>> GetAllJobResults(Guid jobId) {
     110      throw new NotImplementedException();
     111    }
     112
    109113    #endregion
    110114  }
Note: See TracChangeset for help on using the changeset viewer.