- Timestamp:
- 06/23/09 11:35:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/JobAdapter.cs
r2066 r2082 166 166 job.Percentage = 0.0; 167 167 168 if (!row.IsSerializedJobNull())169 job.SerializedJob = row.SerializedJob;170 else171 job.SerializedJob = null;172 173 168 if (!row.IsDateCreatedNull()) 174 169 job.DateCreated = row.DateCreated; … … 255 250 256 251 row.Percentage = job.Percentage; 257 258 row.SerializedJob = job.SerializedJob;259 252 260 253 if (job.DateCreated != DateTime.MinValue) … … 422 415 } 423 416 417 /// <summary> 418 /// Gets the computable job with the secified jobId 419 /// </summary> 420 /// <param name="jobId"></param> 421 /// <returns></returns> 422 public ComputableJob GetComputableJob(Guid jobId) { 423 return (ComputableJob)base.doInTransaction( 424 delegate() { 425 ComputableJob job = 426 new ComputableJob(); 427 428 job.JobInfo = GetById(jobId); 429 dsHiveServer.JobRow row 430 = GetRowById(jobId); 431 432 if (job.JobInfo != null && row != null && 433 !row.IsSerializedJobNull()) { 434 435 job.SerializedJob = 436 row.SerializedJob; 437 438 return job; 439 } else { 440 return null; 441 } 442 }); 443 } 444 445 /// <summary> 446 /// Saves or update the computable job 447 /// </summary> 448 /// <param name="jobId"></param> 449 public void UpdateComputableJob(ComputableJob job) { 450 if(job != null && 451 job.JobInfo != null) { 452 base.doInTransaction( 453 delegate() { 454 dsHiveServer.JobRow row 455 = GetRowById(job.JobInfo.Id); 456 457 if (row != null) { 458 Update(job.JobInfo); 459 row.SerializedJob = 460 job.SerializedJob; 461 462 base.Adapter.Update(row); 463 } 464 465 return true; 466 }); 467 } 468 469 } 470 424 471 #endregion 425 472 }
Note: See TracChangeset
for help on using the changeset viewer.