Changeset 2005 for trunk/sources/HeuristicLab.Hive.Server.Core/3.2
- Timestamp:
- 06/04/09 17:13:05 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Core/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs
r1948 r2005 151 151 152 152 /// <summary> 153 /// returns the job with the specified id 154 /// </summary> 155 /// <returns></returns> 156 public ResponseObject<Job> GetJobById(Guid jobId) { 157 ISession session = factory.GetSessionForCurrentThread(); 158 159 try { 160 IJobAdapter jobAdapter = 161 session.GetDataAdapter<Job, IJobAdapter>(); 162 163 ResponseObject<Job> response = new ResponseObject<Job>(); 164 165 response.Obj = jobAdapter.GetById(jobId); 166 if (response.Obj != null) { 167 response.Success = true; 168 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_GET_JOB_BY_ID; 169 } else { 170 response.Success = false; 171 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST; 172 } 173 174 return response; 175 } 176 finally { 177 if (session != null) 178 session.EndSession(); 179 } 180 } 181 182 /// <summary> 153 183 /// Adds a new job into the database 154 184 /// </summary> -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs
r1932 r2005 113 113 } 114 114 115 public ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.Job> GetJobById(Guid jobId) { 116 return jobManager.GetJobById(jobId); 117 } 118 115 119 public ResponseObject<Job> AddNewJob(Job job) { 116 120 if (HasPermission(PermissiveSecurityAction.Add_Job))
Note: See TracChangeset
for help on using the changeset viewer.