Changeset 5073 for branches/OKB/HeuristicLab.Services.OKB/3.3
- Timestamp:
- 12/09/10 02:27:03 (14 years ago)
- Location:
- branches/OKB/HeuristicLab.Services.OKB/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB/HeuristicLab.Services.OKB/3.3/Interfaces/IOKBService.cs
r4591 r5073 188 188 IEnumerable<Run> GetRuns(long experimentId); 189 189 [OperationContract] 190 IEnumerable<Run> QueryRuns(string query); 191 [OperationContract] 190 192 long AddRun(Run dto); 191 193 [OperationContract] -
branches/OKB/HeuristicLab.Services.OKB/3.3/OKBService.cs
r5071 r5073 534 534 } 535 535 } 536 public IEnumerable<DataTransfer.Run> QueryRuns(string query) { 537 using (OKBDataContext okb = new OKBDataContext()) { 538 DataLoadOptions dlo = new DataLoadOptions(); 539 dlo.LoadWith<Run>(x => x.ResultBlobValues); 540 dlo.LoadWith<Run>(x => x.ResultBoolValues); 541 dlo.LoadWith<Run>(x => x.ResultFloatValues); 542 dlo.LoadWith<Run>(x => x.ResultIntValues); 543 dlo.LoadWith<Run>(x => x.ResultStringValues); 544 dlo.LoadWith<Run>(x => x.Experiment); 545 dlo.LoadWith<ResultBlobValue>(x => x.Result); 546 dlo.LoadWith<ResultBlobValue>(x => x.DataType); 547 dlo.LoadWith<ResultBoolValue>(x => x.Result); 548 dlo.LoadWith<ResultBoolValue>(x => x.DataType); 549 dlo.LoadWith<ResultFloatValue>(x => x.Result); 550 dlo.LoadWith<ResultFloatValue>(x => x.DataType); 551 dlo.LoadWith<ResultIntValue>(x => x.Result); 552 dlo.LoadWith<ResultIntValue>(x => x.DataType); 553 dlo.LoadWith<ResultStringValue>(x => x.Result); 554 dlo.LoadWith<ResultStringValue>(x => x.DataType); 555 dlo.LoadWith<Result>(x => x.Algorithm); 556 dlo.LoadWith<Result>(x => x.DataType); 557 dlo.LoadWith<Experiment>(x => x.Algorithm); 558 dlo.LoadWith<Experiment>(x => x.Problem); 559 dlo.LoadWith<Experiment>(x => x.AlgorithmParameterBlobValues); 560 dlo.LoadWith<Experiment>(x => x.AlgorithmParameterBoolValues); 561 dlo.LoadWith<Experiment>(x => x.AlgorithmParameterFloatValues); 562 dlo.LoadWith<Experiment>(x => x.AlgorithmParameterIntValues); 563 dlo.LoadWith<Experiment>(x => x.AlgorithmParameterStringValues); 564 dlo.LoadWith<Experiment>(x => x.ProblemParameterBlobValues); 565 dlo.LoadWith<Experiment>(x => x.ProblemParameterBoolValues); 566 dlo.LoadWith<Experiment>(x => x.ProblemParameterFloatValues); 567 dlo.LoadWith<Experiment>(x => x.ProblemParameterIntValues); 568 dlo.LoadWith<Experiment>(x => x.ProblemParameterStringValues); 569 dlo.LoadWith<AlgorithmParameterBlobValue>(x => x.AlgorithmParameter); 570 dlo.LoadWith<AlgorithmParameterBlobValue>(x => x.DataType); 571 dlo.LoadWith<AlgorithmParameterBoolValue>(x => x.AlgorithmParameter); 572 dlo.LoadWith<AlgorithmParameterBoolValue>(x => x.DataType); 573 dlo.LoadWith<AlgorithmParameterFloatValue>(x => x.AlgorithmParameter); 574 dlo.LoadWith<AlgorithmParameterFloatValue>(x => x.DataType); 575 dlo.LoadWith<AlgorithmParameterIntValue>(x => x.AlgorithmParameter); 576 dlo.LoadWith<AlgorithmParameterIntValue>(x => x.DataType); 577 dlo.LoadWith<AlgorithmParameterStringValue>(x => x.AlgorithmParameter); 578 dlo.LoadWith<AlgorithmParameterStringValue>(x => x.DataType); 579 dlo.LoadWith<ProblemParameterBlobValue>(x => x.ProblemParameter); 580 dlo.LoadWith<ProblemParameterBlobValue>(x => x.DataType); 581 dlo.LoadWith<ProblemParameterBoolValue>(x => x.ProblemParameter); 582 dlo.LoadWith<ProblemParameterBoolValue>(x => x.DataType); 583 dlo.LoadWith<ProblemParameterFloatValue>(x => x.ProblemParameter); 584 dlo.LoadWith<ProblemParameterFloatValue>(x => x.DataType); 585 dlo.LoadWith<ProblemParameterIntValue>(x => x.ProblemParameter); 586 dlo.LoadWith<ProblemParameterIntValue>(x => x.DataType); 587 dlo.LoadWith<ProblemParameterStringValue>(x => x.ProblemParameter); 588 dlo.LoadWith<ProblemParameterStringValue>(x => x.DataType); 589 dlo.LoadWith<AlgorithmParameter>(x => x.Algorithm); 590 dlo.LoadWith<AlgorithmParameter>(x => x.DataType); 591 dlo.LoadWith<ProblemParameter>(x => x.Problem); 592 dlo.LoadWith<ProblemParameter>(x => x.DataType); 593 dlo.LoadWith<Algorithm>(x => x.AlgorithmClass); 594 dlo.LoadWith<Algorithm>(x => x.Platform); 595 dlo.LoadWith<Problem>(x => x.ProblemClass); 596 dlo.LoadWith<Problem>(x => x.Platform); 597 okb.LoadOptions = dlo; 598 var runs = okb.Runs.Where(x => x.ResultFloatValues.Any(y => y.Result.Name == "BestQuality" && y.Value > double.Parse(query))); 599 return runs.Select(x => Convert.ToDto(x)).ToArray(); 600 } 601 } 536 602 public long AddRun(DataTransfer.Run dto) { 537 603 using (OKBDataContext okb = new OKBDataContext()) {
Note: See TracChangeset
for help on using the changeset viewer.