Changeset 5502
- Timestamp:
- 02/17/11 03:01:24 (14 years ago)
- Location:
- branches/OKB (trunk integration)
- Files:
-
- 12 added
- 27 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.OKB.sln
r5298 r5502 3 3 # Visual Studio 2010 4 4 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E843318-7235-4B2B-81A7-160FDDADD9E1}" 5 EndProject6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.OKB.DataTransfer-3.3", "HeuristicLab.Services.OKB.DataTransfer\3.3\HeuristicLab.Services.OKB.DataTransfer-3.3.csproj", "{209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}"7 5 EndProject 8 6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.OKB.DataAccess-3.3", "HeuristicLab.Services.OKB.DataAccess\3.3\HeuristicLab.Services.OKB.DataAccess-3.3.csproj", "{E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}" … … 24 22 EndGlobalSection 25 23 GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU27 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Debug|Any CPU.Build.0 = Debug|Any CPU28 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Debug|x64.ActiveCfg = Debug|Any CPU29 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Debug|x86.ActiveCfg = Debug|Any CPU30 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Release|Any CPU.ActiveCfg = Release|Any CPU31 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Release|Any CPU.Build.0 = Release|Any CPU32 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Release|x64.ActiveCfg = Release|Any CPU33 {209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}.Release|x86.ActiveCfg = Release|Any CPU34 24 {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 25 {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|Any CPU.Build.0 = Debug|Any CPU -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/HeuristicLab.Services.OKB.DataAccess-3.3.csproj
r5378 r5502 184 184 <None Include="SQL Scripts\Create OKB.sql" /> 185 185 </ItemGroup> 186 <ItemGroup>187 <ProjectReference Include="..\..\HeuristicLab.Services.OKB.DataTransfer\3.3\HeuristicLab.Services.OKB.DataTransfer-3.3.csproj">188 <Project>{209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}</Project>189 <Name>HeuristicLab.Services.OKB.DataTransfer-3.3</Name>190 </ProjectReference>191 </ItemGroup>192 186 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 193 187 <PropertyGroup> -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/HeuristicLab.Services.OKB.DataAccess-3.3.Tests.csproj
r5304 r5502 55 55 <Name>HeuristicLab.Clients.OKB-3.3</Name> 56 56 </ProjectReference> 57 <ProjectReference Include="..\..\..\HeuristicLab.Services.OKB.DataTransfer\3.3\HeuristicLab.Services.OKB.DataTransfer-3.3.csproj">58 <Project>{209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}</Project>59 <Name>HeuristicLab.Services.OKB.DataTransfer-3.3</Name>60 </ProjectReference>61 57 <ProjectReference Include="..\..\..\HeuristicLab.Services.OKB\3.3\HeuristicLab.Services.OKB-3.3.csproj"> 62 58 <Project>{766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}</Project> -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj
r5482 r5502 134 134 <Compile Include="Authentication\DataTransfer\User.cs" /> 135 135 <Compile Include="Authentication\IAuthenticationService.cs" /> 136 <Compile Include="Convert.cs" />137 136 <Compile Include="Properties\AssemblyInfo.cs" /> 137 <Compile Include="Query\Convert.cs" /> 138 138 <Compile Include="Query\DataTransfer\Algorithm.cs" /> 139 <Compile Include="Query\DataTransfer\AlgorithmClass.cs" />140 139 <Compile Include="Query\DataTransfer\BinaryValue.cs" /> 141 140 <Compile Include="Query\DataTransfer\BooleanOperation.cs" /> … … 163 162 <Compile Include="Query\DataTransfer\OrdinalComparisonIntFilter.cs" /> 164 163 <Compile Include="Query\DataTransfer\OrdinalComparisonLongFilter.cs" /> 165 <Compile Include="Query\DataTransfer\Platform.cs" />166 164 <Compile Include="Query\DataTransfer\Problem.cs" /> 167 <Compile Include="Query\DataTransfer\ProblemClass.cs" />168 165 <Compile Include="Query\DataTransfer\Run.cs" /> 169 166 <Compile Include="Query\DataTransfer\StringComparison.cs" /> … … 175 172 <SubType>Code</SubType> 176 173 </Compile> 177 <Compile Include="Query\Filters\AlgorithmDataDataTypeNameFilter.cs">178 <SubType>Code</SubType>179 </Compile>180 174 <Compile Include="Query\Filters\AlgorithmNameFilter.cs"> 181 175 <SubType>Code</SubType> 182 176 </Compile> 183 <Compile Include="Query\Filters\AlgorithmParameterBlobValueDataTypeNameFilter.cs">184 <SubType>Code</SubType>185 </Compile>186 <Compile Include="Query\Filters\AlgorithmParameterBlobValueValueFilter.cs">187 <SubType>Code</SubType>188 </Compile>189 <Compile Include="Query\Filters\AlgorithmParameterBoolValueValueFilter.cs">190 <SubType>Code</SubType>191 </Compile>192 <Compile Include="Query\Filters\AlgorithmParameterFloatValueValueFilter.cs">193 <SubType>Code</SubType>194 </Compile>195 <Compile Include="Query\Filters\AlgorithmParameterIntValueValueFilter.cs">196 <SubType>Code</SubType>197 </Compile>198 <Compile Include="Query\Filters\AlgorithmParameterNameFilter.cs">199 <SubType>Code</SubType>200 </Compile>201 <Compile Include="Query\Filters\AlgorithmParameterStringValueValueFilter.cs">202 <SubType>Code</SubType>203 </Compile>204 <Compile Include="Query\Filters\AlgorithmPlatformNameFilter.cs">205 <SubType>Code</SubType>206 </Compile>207 177 <Compile Include="Query\Filters\AndFilter.cs"> 208 178 <SubType>Code</SubType> 209 179 </Compile> 180 <Compile Include="Query\Filters\AlgorithmDataTypeNameFilter.cs" /> 181 <Compile Include="Query\Filters\AlgorithmPlatformNameFilter.cs" /> 182 <Compile Include="Query\Filters\BoolValueFilter.cs" /> 183 <Compile Include="Query\Filters\BinaryValueFilter.cs" /> 184 <Compile Include="Query\Filters\StringValueFilter.cs" /> 185 <Compile Include="Query\Filters\FloatValueFilter.cs" /> 186 <Compile Include="Query\Filters\DoubleValueFilter.cs" /> 187 <Compile Include="Query\Filters\LongValueFilter.cs" /> 188 <Compile Include="Query\Filters\IntValueFilter.cs"> 189 <SubType>Code</SubType> 190 </Compile> 191 <Compile Include="Query\Filters\ValueDataTypeNameFilter.cs" /> 192 <Compile Include="Query\Filters\ProblemPlatformNameFilter.cs" /> 193 <Compile Include="Query\Filters\ProblemDataTypeNameFilter.cs" /> 210 194 <Compile Include="Query\Filters\IFilter.cs" /> 211 195 <Compile Include="Query\Filters\OrFilter.cs"> … … 215 199 <SubType>Code</SubType> 216 200 </Compile> 217 <Compile Include="Query\Filters\ProblemDataDataTypeNameFilter.cs">218 <SubType>Code</SubType>219 </Compile>220 201 <Compile Include="Query\Filters\ProblemNameFilter.cs"> 221 202 <SubType>Code</SubType> 222 203 </Compile> 223 <Compile Include="Query\Filters\ProblemParameterBlobValueDataTypeNameFilter.cs">224 <SubType>Code</SubType>225 </Compile>226 <Compile Include="Query\Filters\ProblemParameterBlobValueValueFilter.cs">227 <SubType>Code</SubType>228 </Compile>229 <Compile Include="Query\Filters\ProblemParameterBoolValueValueFilter.cs">230 <SubType>Code</SubType>231 </Compile>232 <Compile Include="Query\Filters\ProblemParameterFloatValueValueFilter.cs">233 <SubType>Code</SubType>234 </Compile>235 <Compile Include="Query\Filters\ProblemParameterIntValueValueFilter.cs">236 <SubType>Code</SubType>237 </Compile>238 <Compile Include="Query\Filters\ProblemParameterNameFilter.cs">239 <SubType>Code</SubType>240 </Compile>241 <Compile Include="Query\Filters\ProblemParameterStringValueValueFilter.cs">242 <SubType>Code</SubType>243 </Compile>244 <Compile Include="Query\Filters\ProblemPlatformNameFilter.cs">245 <SubType>Code</SubType>246 </Compile>247 <Compile Include="Query\Filters\ResultBlobValueDataTypeNameFilter.cs">248 <SubType>Code</SubType>249 </Compile>250 <Compile Include="Query\Filters\ResultBlobValueValueFilter.cs">251 <SubType>Code</SubType>252 </Compile>253 <Compile Include="Query\Filters\ResultBoolValueValueFilter.cs">254 <SubType>Code</SubType>255 </Compile>256 <Compile Include="Query\Filters\ResultFloatValueValueFilter.cs">257 <SubType>Code</SubType>258 </Compile>259 <Compile Include="Query\Filters\ResultIntValueValueFilter.cs">260 <SubType>Code</SubType>261 </Compile>262 <Compile Include="Query\Filters\ResultNameFilter.cs">263 <SubType>Code</SubType>264 </Compile>265 <Compile Include="Query\Filters\ResultStringValueValueFilter.cs">266 <SubType>Code</SubType>267 </Compile>268 204 <Compile Include="Query\Filters\RunClientNameFilter.cs"> 269 205 <SubType>Code</SubType> … … 278 214 <SubType>Code</SubType> 279 215 </Compile> 216 <Compile Include="Query\Filters\ValueNameFilter.cs"> 217 <SubType>Code</SubType> 218 </Compile> 280 219 <Compile Include="Query\IQueryService.cs" /> 281 <Compile Include="Query\QueryService.cs" /> 220 <Compile Include="Query\QueryService.cs"> 221 <SubType>Code</SubType> 222 </Compile> 282 223 <Compile Include="RunCreation\Convert.cs" /> 283 224 <Compile Include="RunCreation\DataTransfer\Algorithm.cs" /> … … 310 251 <Name>HeuristicLab.Services.OKB.DataAccess-3.3</Name> 311 252 </ProjectReference> 312 <ProjectReference Include="..\..\HeuristicLab.Services.OKB.DataTransfer\3.3\HeuristicLab.Services.OKB.DataTransfer-3.3.csproj">313 <Project>{209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}</Project>314 <Name>HeuristicLab.Services.OKB.DataTransfer-3.3</Name>315 </ProjectReference>316 253 </ItemGroup> 317 254 <ItemGroup /> -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/DataTransfer/Algorithm.cs
r5482 r5502 30 30 public string Description { get; set; } 31 31 [DataMember] 32 public PlatformPlatform { get; set; }32 public string Platform { get; set; } 33 33 [DataMember] 34 public AlgorithmClassAlgorithmClass { get; set; }34 public string AlgorithmClass { get; set; } 35 35 [DataMember] 36 36 public DataType DataType { get; set; } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/DataTransfer/BinaryValue.cs
r5482 r5502 26 26 public class BinaryValue : Value { 27 27 [DataMember] 28 public long BinaryDataId{ get; set; }28 public byte[] Value { get; set; } 29 29 } 30 30 } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/DataTransfer/Problem.cs
r5482 r5502 30 30 public string Description { get; set; } 31 31 [DataMember] 32 public PlatformPlatform { get; set; }32 public string Platform { get; set; } 33 33 [DataMember] 34 public ProblemClassProblemClass { get; set; }34 public string ProblemClass { get; set; } 35 35 [DataMember] 36 36 public DataType DataType { get; set; } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/AlgorithmClassNameFilter.cs
r5482 r5502 21 21 22 22 using System; 23 using System.Data.Linq.SqlClient; 23 24 using System.Linq.Expressions; 24 25 using HeuristicLab.Services.OKB.DataAccess; … … 33 34 switch (Comparison) { 34 35 case DataTransfer.StringComparison.Equal: 35 return x => x. Experiment.Algorithm.AlgorithmClass.Name == Value;36 return x => x.Algorithm.AlgorithmClass.Name == Value; 36 37 case DataTransfer.StringComparison.NotEqual: 37 return x => x. Experiment.Algorithm.AlgorithmClass.Name != Value;38 return x => x.Algorithm.AlgorithmClass.Name != Value; 38 39 case DataTransfer.StringComparison.Contains: 39 return x => x. Experiment.Algorithm.AlgorithmClass.Name.Contains(Value);40 return x => x.Algorithm.AlgorithmClass.Name.Contains(Value); 40 41 case DataTransfer.StringComparison.NotContains: 41 return x => !x.Experiment.Algorithm.AlgorithmClass.Name.Contains(Value); 42 return x => !x.Algorithm.AlgorithmClass.Name.Contains(Value); 43 case DataTransfer.StringComparison.Like: 44 return x => SqlMethods.Like(x.Algorithm.AlgorithmClass.Name, Value); 45 case DataTransfer.StringComparison.NotLike: 46 return x => !SqlMethods.Like(x.Algorithm.AlgorithmClass.Name, Value); 42 47 default: 43 48 return x => true; … … 50 55 Value = value; 51 56 } 52 public AlgorithmClassNameFilter(DataTransfer.S etComparisonStringFilter filter) {57 public AlgorithmClassNameFilter(DataTransfer.StringComparisonFilter filter) { 53 58 Comparison = filter.Comparison; 54 59 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/AlgorithmNameFilter.cs
r5482 r5502 21 21 22 22 using System; 23 using System.Data.Linq.SqlClient; 23 24 using System.Linq.Expressions; 24 25 using HeuristicLab.Services.OKB.DataAccess; … … 33 34 switch (Comparison) { 34 35 case DataTransfer.StringComparison.Equal: 35 return x => x. Experiment.Algorithm.Name == Value;36 return x => x.Algorithm.Name == Value; 36 37 case DataTransfer.StringComparison.NotEqual: 37 return x => x. Experiment.Algorithm.Name != Value;38 return x => x.Algorithm.Name != Value; 38 39 case DataTransfer.StringComparison.Contains: 39 return x => x. Experiment.Algorithm.Name.Contains(Value);40 return x => x.Algorithm.Name.Contains(Value); 40 41 case DataTransfer.StringComparison.NotContains: 41 return x => !x.Experiment.Algorithm.Name.Contains(Value); 42 return x => !x.Algorithm.Name.Contains(Value); 43 case DataTransfer.StringComparison.Like: 44 return x => SqlMethods.Like(x.Algorithm.Name, Value); 45 case DataTransfer.StringComparison.NotLike: 46 return x => !SqlMethods.Like(x.Algorithm.Name, Value); 42 47 default: 43 48 return x => true; … … 50 55 Value = value; 51 56 } 52 public AlgorithmNameFilter(DataTransfer.S etComparisonStringFilter filter) {57 public AlgorithmNameFilter(DataTransfer.StringComparisonFilter filter) { 53 58 Comparison = filter.Comparison; 54 59 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/AlgorithmPlatformNameFilter.cs
r5482 r5502 21 21 22 22 using System; 23 using System.Data.Linq.SqlClient; 23 24 using System.Linq.Expressions; 24 25 using HeuristicLab.Services.OKB.DataAccess; … … 33 34 switch (Comparison) { 34 35 case DataTransfer.StringComparison.Equal: 35 return x => x. Experiment.Algorithm.Platform.Name == Value;36 return x => x.Algorithm.Platform.Name == Value; 36 37 case DataTransfer.StringComparison.NotEqual: 37 return x => x. Experiment.Algorithm.Platform.Name != Value;38 return x => x.Algorithm.Platform.Name != Value; 38 39 case DataTransfer.StringComparison.Contains: 39 return x => x. Experiment.Algorithm.Platform.Name.Contains(Value);40 return x => x.Algorithm.Platform.Name.Contains(Value); 40 41 case DataTransfer.StringComparison.NotContains: 41 return x => !x.Experiment.Algorithm.Platform.Name.Contains(Value); 42 return x => !x.Algorithm.Platform.Name.Contains(Value); 43 case DataTransfer.StringComparison.Like: 44 return x => SqlMethods.Like(x.Algorithm.Platform.Name, Value); 45 case DataTransfer.StringComparison.NotLike: 46 return x => !SqlMethods.Like(x.Algorithm.Platform.Name, Value); 42 47 default: 43 48 return x => true; … … 50 55 Value = value; 51 56 } 52 public AlgorithmPlatformNameFilter(DataTransfer.S etComparisonStringFilter filter) {57 public AlgorithmPlatformNameFilter(DataTransfer.StringComparisonFilter filter) { 53 58 Comparison = filter.Comparison; 54 59 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/AndFilter.cs
r5482 r5502 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using System.Linq.Expressions; 25 26 using HeuristicLab.Services.OKB.DataAccess; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/OrFilter.cs
r5482 r5502 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using System.Linq.Expressions; 25 26 using HeuristicLab.Services.OKB.DataAccess; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/ProblemClassNameFilter.cs
r5482 r5502 21 21 22 22 using System; 23 using System.Data.Linq.SqlClient; 23 24 using System.Linq.Expressions; 24 25 using HeuristicLab.Services.OKB.DataAccess; … … 33 34 switch (Comparison) { 34 35 case DataTransfer.StringComparison.Equal: 35 return x => x. Experiment.Problem.ProblemClass.Name == Value;36 return x => x.Problem.ProblemClass.Name == Value; 36 37 case DataTransfer.StringComparison.NotEqual: 37 return x => x. Experiment.Problem.ProblemClass.Name != Value;38 return x => x.Problem.ProblemClass.Name != Value; 38 39 case DataTransfer.StringComparison.Contains: 39 return x => x. Experiment.Problem.ProblemClass.Name.Contains(Value);40 return x => x.Problem.ProblemClass.Name.Contains(Value); 40 41 case DataTransfer.StringComparison.NotContains: 41 return x => !x.Experiment.Problem.ProblemClass.Name.Contains(Value); 42 return x => !x.Problem.ProblemClass.Name.Contains(Value); 43 case DataTransfer.StringComparison.Like: 44 return x => SqlMethods.Like(x.Problem.ProblemClass.Name, Value); 45 case DataTransfer.StringComparison.NotLike: 46 return x => !SqlMethods.Like(x.Problem.ProblemClass.Name, Value); 42 47 default: 43 48 return x => true; … … 50 55 Value = value; 51 56 } 52 public ProblemClassNameFilter(DataTransfer.S etComparisonStringFilter filter) {57 public ProblemClassNameFilter(DataTransfer.StringComparisonFilter filter) { 53 58 Comparison = filter.Comparison; 54 59 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/ProblemNameFilter.cs
r5482 r5502 21 21 22 22 using System; 23 using System.Data.Linq.SqlClient; 23 24 using System.Linq.Expressions; 24 25 using HeuristicLab.Services.OKB.DataAccess; … … 33 34 switch (Comparison) { 34 35 case DataTransfer.StringComparison.Equal: 35 return x => x. Experiment.Problem.Name == Value;36 return x => x.Problem.Name == Value; 36 37 case DataTransfer.StringComparison.NotEqual: 37 return x => x. Experiment.Problem.Name != Value;38 return x => x.Problem.Name != Value; 38 39 case DataTransfer.StringComparison.Contains: 39 return x => x. Experiment.Problem.Name.Contains(Value);40 return x => x.Problem.Name.Contains(Value); 40 41 case DataTransfer.StringComparison.NotContains: 41 return x => !x.Experiment.Problem.Name.Contains(Value); 42 return x => !x.Problem.Name.Contains(Value); 43 case DataTransfer.StringComparison.Like: 44 return x => SqlMethods.Like(x.Problem.Name, Value); 45 case DataTransfer.StringComparison.NotLike: 46 return x => !SqlMethods.Like(x.Problem.Name, Value); 42 47 default: 43 48 return x => true; … … 50 55 Value = value; 51 56 } 52 public ProblemNameFilter(DataTransfer.S etComparisonStringFilter filter) {57 public ProblemNameFilter(DataTransfer.StringComparisonFilter filter) { 53 58 Comparison = filter.Comparison; 54 59 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/ProblemPlatformNameFilter.cs
r5378 r5502 21 21 22 22 using System; 23 using System.Data.Linq.SqlClient; 23 24 using System.Linq.Expressions; 24 25 using HeuristicLab.Services.OKB.DataAccess; 25 26 26 namespace HeuristicLab.Services.OKB {27 namespace HeuristicLab.Services.OKB.Query.Filters { 27 28 public class ProblemPlatformNameFilter : IFilter { 28 29 public DataTransfer.StringComparison Comparison { get; set; } … … 33 34 switch (Comparison) { 34 35 case DataTransfer.StringComparison.Equal: 35 return x => x. Experiment.Problem.Platform.Name == Value;36 return x => x.Problem.Platform.Name == Value; 36 37 case DataTransfer.StringComparison.NotEqual: 37 return x => x. Experiment.Problem.Platform.Name != Value;38 return x => x.Problem.Platform.Name != Value; 38 39 case DataTransfer.StringComparison.Contains: 39 return x => x. Experiment.Problem.Platform.Name.Contains(Value);40 return x => x.Problem.Platform.Name.Contains(Value); 40 41 case DataTransfer.StringComparison.NotContains: 41 return x => !x.Experiment.Problem.Platform.Name.Contains(Value); 42 return x => !x.Problem.Platform.Name.Contains(Value); 43 case DataTransfer.StringComparison.Like: 44 return x => SqlMethods.Like(x.Problem.Platform.Name, Value); 45 case DataTransfer.StringComparison.NotLike: 46 return x => !SqlMethods.Like(x.Problem.Platform.Name, Value); 42 47 default: 43 48 return x => true; … … 50 55 Value = value; 51 56 } 52 public ProblemPlatformNameFilter(DataTransfer.S etComparisonStringFilter filter) {57 public ProblemPlatformNameFilter(DataTransfer.StringComparisonFilter filter) { 53 58 Comparison = filter.Comparison; 54 59 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/RunClientNameFilter.cs
r5378 r5502 24 24 using HeuristicLab.Services.OKB.DataAccess; 25 25 26 namespace HeuristicLab.Services.OKB {26 namespace HeuristicLab.Services.OKB.Query.Filters { 27 27 public class RunClientNameFilter : IFilter { 28 28 public DataTransfer.StringComparison Comparison { get; set; } … … 40 40 case DataTransfer.StringComparison.NotContains: 41 41 throw new NotSupportedException(); 42 case DataTransfer.StringComparison.Like: 43 throw new NotSupportedException(); 44 case DataTransfer.StringComparison.NotLike: 45 throw new NotSupportedException(); 42 46 default: 43 47 return x => true; … … 50 54 Value = value; 51 55 } 52 public RunClientNameFilter(DataTransfer.S etComparisonStringFilter filter) {56 public RunClientNameFilter(DataTransfer.StringComparisonFilter filter) { 53 57 Comparison = filter.Comparison; 54 58 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/RunCreatedDateFilter.cs
r5295 r5502 24 24 using HeuristicLab.Services.OKB.DataAccess; 25 25 26 namespace HeuristicLab.Services.OKB {26 namespace HeuristicLab.Services.OKB.Query.Filters { 27 27 public class RunCreatedDateFilter : IFilter { 28 28 public DataTransfer.OrdinalComparison Comparison { get; set; } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/RunRandomSeedFilter.cs
r5295 r5502 24 24 using HeuristicLab.Services.OKB.DataAccess; 25 25 26 namespace HeuristicLab.Services.OKB {26 namespace HeuristicLab.Services.OKB.Query.Filters { 27 27 public class RunRandomSeedFilter : IFilter { 28 28 public DataTransfer.OrdinalComparison Comparison { get; set; } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/Filters/RunUserNameFilter.cs
r5378 r5502 24 24 using HeuristicLab.Services.OKB.DataAccess; 25 25 26 namespace HeuristicLab.Services.OKB {26 namespace HeuristicLab.Services.OKB.Query.Filters { 27 27 public class RunUserNameFilter : IFilter { 28 28 public DataTransfer.StringComparison Comparison { get; set; } … … 40 40 case DataTransfer.StringComparison.NotContains: 41 41 throw new NotSupportedException(); 42 case DataTransfer.StringComparison.Like: 43 throw new NotSupportedException(); 44 case DataTransfer.StringComparison.NotLike: 45 throw new NotSupportedException(); 42 46 default: 43 47 return x => true; … … 50 54 Value = value; 51 55 } 52 public RunUserNameFilter(DataTransfer.S etComparisonStringFilter filter) {56 public RunUserNameFilter(DataTransfer.StringComparisonFilter filter) { 53 57 Comparison = filter.Comparison; 54 58 Value = filter.Value; -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/IQueryService.cs
r5482 r5502 41 41 42 42 [OperationContract] 43 IEnumerable<Run> GetRuns(IEnumerable<long> ids );43 IEnumerable<Run> GetRuns(IEnumerable<long> ids, bool includeBinaryValues); 44 44 } 45 45 } -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Query/QueryService.cs
r5482 r5502 27 27 using HeuristicLab.Services.OKB.DataAccess; 28 28 using HeuristicLab.Services.OKB.Query.DataTransfer; 29 using HeuristicLab.Services.OKB.Query.Filters; 29 30 30 31 namespace HeuristicLab.Services.OKB.Query { … … 37 38 List<Filter> filters = new List<Filter>(); 38 39 using (OKBDataContext okb = new OKBDataContext()) { 39 // run filters40 #region Run Filters 40 41 filters.Add(new OrdinalComparisonLongFilter(typeof(RunRandomSeedFilter).AssemblyQualifiedName, "Run Random Seed")); 41 42 filters.Add(new OrdinalComparisonDateTimeFilter(typeof(RunCreatedDateFilter).AssemblyQualifiedName, "Run Created Date")); 42 filters.Add(new SetComparisonStringFilter(typeof(RunUserNameFilter).AssemblyQualifiedName, "Run User Name")); 43 filters.Add(new SetComparisonStringFilter(typeof(RunClientNameFilter).AssemblyQualifiedName, "Run Client Name")); 44 45 // result filters 46 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ResultNameFilter).AssemblyQualifiedName, "Result Name", okb.Results.Select(x => x.Name).Distinct().ToArray())); 47 foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct()) 48 filters.Add(new NameSetComparisonStringAvailableValuesFilter(typeof(ResultBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Result " + name + " Value Data Type Name", name, okb.ResultBlobValues.Where(x => x.Result.Name == name).Select(x => x.DataType.Name).Distinct().ToArray())); 49 foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct()) 50 filters.Add(new NameEqualityComparisonByteArrayFilter(typeof(ResultBlobValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name)); 51 foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "bit").Select(x => x.Name).Distinct()) 52 filters.Add(new NameEqualityComparisonBoolFilter(typeof(ResultBoolValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name)); 53 foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "float").Select(x => x.Name).Distinct()) 54 filters.Add(new NameOrdinalComparisonDoubleFilter(typeof(ResultFloatValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name)); 55 foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "bigint").Select(x => x.Name).Distinct()) 56 filters.Add(new NameOrdinalComparisonLongFilter(typeof(ResultIntValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name)); 57 foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "nvarchar").Select(x => x.Name).Distinct()) 58 filters.Add(new NameSetComparisonStringFilter(typeof(ResultStringValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name)); 59 60 // algorithm parameter filters 61 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterNameFilter).AssemblyQualifiedName, "Algorithm Parameter Name", okb.AlgorithmParameters.Select(x => x.Name).Distinct().ToArray())); 62 foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct()) 63 filters.Add(new NameSetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value Data Type Name", name, okb.AlgorithmParameterBlobValues.Where(x => x.AlgorithmParameter.Name == name).Select(x => x.DataType.Name).Distinct().ToArray())); 64 foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct()) 65 filters.Add(new NameEqualityComparisonByteArrayFilter(typeof(AlgorithmParameterBlobValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name)); 66 foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bit").Select(x => x.Name).Distinct()) 67 filters.Add(new NameEqualityComparisonBoolFilter(typeof(AlgorithmParameterBoolValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name)); 68 foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "float").Select(x => x.Name).Distinct()) 69 filters.Add(new NameOrdinalComparisonDoubleFilter(typeof(AlgorithmParameterFloatValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name)); 70 foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bigint").Select(x => x.Name).Distinct()) 71 filters.Add(new NameOrdinalComparisonLongFilter(typeof(AlgorithmParameterIntValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name)); 72 foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "nvarchar").Select(x => x.Name).Distinct()) 73 filters.Add(new NameSetComparisonStringFilter(typeof(AlgorithmParameterStringValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name)); 74 75 // algorithm filters 76 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmNameFilter).AssemblyQualifiedName, "Algorithm Name", okb.Algorithms.Select(x => x.Name).Distinct().ToArray())); 77 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmClassNameFilter).AssemblyQualifiedName, "Algorithm Class Name", okb.AlgorithmClasses.Select(x => x.Name).Distinct().ToArray())); 78 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmPlatformNameFilter).AssemblyQualifiedName, "Algorithm Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray())); 79 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmDataDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Data Type Name", okb.Algorithms.Select(x => x.AlgorithmData.DataType.Name).Distinct().ToArray())); 80 81 // problem parameter filters 82 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemParameterNameFilter).AssemblyQualifiedName, "Problem Parameter Name", okb.ProblemParameters.Select(x => x.Name).Distinct().ToArray())); 83 foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct()) 84 filters.Add(new NameSetComparisonStringAvailableValuesFilter(typeof(ProblemParameterBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value Data Type Name", name, okb.ProblemParameterBlobValues.Where(x => x.ProblemParameter.Name == name).Select(x => x.DataType.Name).Distinct().ToArray())); 85 foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct()) 86 filters.Add(new NameEqualityComparisonByteArrayFilter(typeof(ProblemParameterBlobValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name)); 87 foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bit").Select(x => x.Name).Distinct()) 88 filters.Add(new NameEqualityComparisonBoolFilter(typeof(ProblemParameterBoolValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name)); 89 foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "float").Select(x => x.Name).Distinct()) 90 filters.Add(new NameOrdinalComparisonDoubleFilter(typeof(ProblemParameterFloatValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name)); 91 foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bigint").Select(x => x.Name).Distinct()) 92 filters.Add(new NameOrdinalComparisonLongFilter(typeof(ProblemParameterIntValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name)); 93 foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "nvarchar").Select(x => x.Name).Distinct()) 94 filters.Add(new NameSetComparisonStringFilter(typeof(ProblemParameterStringValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name)); 95 96 // problem filters 97 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemNameFilter).AssemblyQualifiedName, "Problem Name", okb.Problems.Select(x => x.Name).Distinct().ToArray())); 98 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemClassNameFilter).AssemblyQualifiedName, "Problem Class Name", okb.ProblemClasses.Select(x => x.Name).Distinct().ToArray())); 99 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemPlatformNameFilter).AssemblyQualifiedName, "Problem Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray())); 100 filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemDataDataTypeNameFilter).AssemblyQualifiedName, "Problem Data Type Name", okb.Problems.Select(x => x.ProblemData.DataType.Name).Distinct().ToArray())); 101 102 // and/or filters 43 filters.Add(new StringComparisonFilter(typeof(RunUserNameFilter).AssemblyQualifiedName, "Run User Name")); 44 filters.Add(new StringComparisonFilter(typeof(RunClientNameFilter).AssemblyQualifiedName, "Run Client Name")); 45 #endregion 46 47 #region Parameter Filters 48 filters.Add(new StringComparisonAvailableValuesFilter( 49 typeof(ValueNameFilter).AssemblyQualifiedName, 50 "Parameter Name", 51 okb.ValueNames.Where(x => x.Category == ValueNameCategory.Parameter).Select(x => x.Name).Distinct().ToArray() 52 )); 53 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Binary)).Select(x => x.Name).Distinct()) 54 filters.Add(new NameStringComparisonAvailableValuesFilter( 55 typeof(ValueDataTypeNameFilter).AssemblyQualifiedName, 56 "Parameter " + name + " Value Data Type Name", 57 name, 58 okb.Values.Where(x => (x.ValueName.Name == name) && (x.ValueName.Category == ValueNameCategory.Parameter) && (x.ValueName.Type == ValueNameType.Binary)).Select(x => x.DataType.Name).Distinct().ToArray() 59 )); 60 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Bool)).Select(x => x.Name).Distinct()) 61 filters.Add(new NameEqualityComparisonBoolFilter( 62 typeof(BoolValueFilter).AssemblyQualifiedName, 63 "Parameter " + name + " Value", 64 name 65 )); 66 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Int)).Select(x => x.Name).Distinct()) 67 filters.Add(new NameOrdinalComparisonIntFilter( 68 typeof(IntValueFilter).AssemblyQualifiedName, 69 "Parameter " + name + " Value", 70 name 71 )); 72 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Long)).Select(x => x.Name).Distinct()) 73 filters.Add(new NameOrdinalComparisonLongFilter( 74 typeof(LongValueFilter).AssemblyQualifiedName, 75 "Parameter " + name + " Value", 76 name 77 )); 78 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Float)).Select(x => x.Name).Distinct()) 79 filters.Add(new NameOrdinalComparisonFloatFilter( 80 typeof(FloatValueFilter).AssemblyQualifiedName, 81 "Parameter " + name + " Value", 82 name 83 )); 84 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Double)).Select(x => x.Name).Distinct()) 85 filters.Add(new NameOrdinalComparisonDoubleFilter( 86 typeof(DoubleValueFilter).AssemblyQualifiedName, 87 "Parameter " + name + " Value", 88 name 89 )); 90 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.String)).Select(x => x.Name).Distinct()) 91 filters.Add(new NameStringComparisonFilter( 92 typeof(StringValueFilter).AssemblyQualifiedName, 93 "Parameter " + name + " Value", 94 name 95 )); 96 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Parameter) && (x.Type == ValueNameType.Binary)).Select(x => x.Name).Distinct()) 97 filters.Add(new NameEqualityComparisonByteArrayFilter( 98 typeof(BinaryValueFilter).AssemblyQualifiedName, 99 "Parameter " + name + " Value", 100 name 101 )); 102 #endregion 103 104 #region Result Filters 105 filters.Add(new StringComparisonAvailableValuesFilter( 106 typeof(ValueNameFilter).AssemblyQualifiedName, 107 "Result Name", 108 okb.ValueNames.Where(x => x.Category == ValueNameCategory.Result).Select(x => x.Name).Distinct().ToArray() 109 )); 110 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Binary)).Select(x => x.Name).Distinct()) 111 filters.Add(new NameStringComparisonAvailableValuesFilter( 112 typeof(ValueDataTypeNameFilter).AssemblyQualifiedName, 113 "Result " + name + " Value Data Type Name", 114 name, 115 okb.Values.Where(x => (x.ValueName.Name == name) && (x.ValueName.Category == ValueNameCategory.Result) && (x.ValueName.Type == ValueNameType.Binary)).Select(x => x.DataType.Name).Distinct().ToArray() 116 )); 117 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Bool)).Select(x => x.Name).Distinct()) 118 filters.Add(new NameEqualityComparisonBoolFilter( 119 typeof(BoolValueFilter).AssemblyQualifiedName, 120 "Result " + name + " Value", 121 name 122 )); 123 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Int)).Select(x => x.Name).Distinct()) 124 filters.Add(new NameOrdinalComparisonIntFilter( 125 typeof(IntValueFilter).AssemblyQualifiedName, 126 "Result " + name + " Value", 127 name 128 )); 129 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Long)).Select(x => x.Name).Distinct()) 130 filters.Add(new NameOrdinalComparisonLongFilter( 131 typeof(LongValueFilter).AssemblyQualifiedName, 132 "Result " + name + " Value", 133 name 134 )); 135 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Float)).Select(x => x.Name).Distinct()) 136 filters.Add(new NameOrdinalComparisonFloatFilter( 137 typeof(FloatValueFilter).AssemblyQualifiedName, 138 "Result " + name + " Value", 139 name 140 )); 141 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Double)).Select(x => x.Name).Distinct()) 142 filters.Add(new NameOrdinalComparisonDoubleFilter( 143 typeof(DoubleValueFilter).AssemblyQualifiedName, 144 "Result " + name + " Value", 145 name 146 )); 147 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.String)).Select(x => x.Name).Distinct()) 148 filters.Add(new NameStringComparisonFilter( 149 typeof(StringValueFilter).AssemblyQualifiedName, 150 "Result " + name + " Value", 151 name 152 )); 153 foreach (string name in okb.ValueNames.Where(x => (x.Category == ValueNameCategory.Result) && (x.Type == ValueNameType.Binary)).Select(x => x.Name).Distinct()) 154 filters.Add(new NameEqualityComparisonByteArrayFilter( 155 typeof(BinaryValueFilter).AssemblyQualifiedName, 156 "Result " + name + " Value", 157 name 158 )); 159 #endregion 160 161 #region Algorithm Filters 162 filters.Add(new StringComparisonAvailableValuesFilter( 163 typeof(AlgorithmNameFilter).AssemblyQualifiedName, 164 "Algorithm Name", 165 okb.Algorithms.Select(x => x.Name).Distinct().ToArray() 166 )); 167 filters.Add(new StringComparisonAvailableValuesFilter( 168 typeof(AlgorithmClassNameFilter).AssemblyQualifiedName, 169 "Algorithm Class Name", 170 okb.AlgorithmClasses.Select(x => x.Name).Distinct().ToArray() 171 )); 172 filters.Add(new StringComparisonAvailableValuesFilter( 173 typeof(AlgorithmPlatformNameFilter).AssemblyQualifiedName, 174 "Algorithm Platform Name", 175 okb.Platforms.Select(x => x.Name).Distinct().ToArray() 176 )); 177 filters.Add(new StringComparisonAvailableValuesFilter( 178 typeof(AlgorithmDataTypeNameFilter).AssemblyQualifiedName, 179 "Algorithm Data Type Name", 180 okb.Algorithms.Select(x => x.DataType.Name).Distinct().ToArray() 181 )); 182 #endregion 183 184 #region Problem Filters 185 filters.Add(new StringComparisonAvailableValuesFilter( 186 typeof(ProblemNameFilter).AssemblyQualifiedName, 187 "Problem Name", 188 okb.Problems.Select(x => x.Name).Distinct().ToArray() 189 )); 190 filters.Add(new StringComparisonAvailableValuesFilter( 191 typeof(ProblemClassNameFilter).AssemblyQualifiedName, 192 "Problem Class Name", 193 okb.ProblemClasses.Select(x => x.Name).Distinct().ToArray() 194 )); 195 filters.Add(new StringComparisonAvailableValuesFilter( 196 typeof(ProblemPlatformNameFilter).AssemblyQualifiedName, 197 "Problem Platform Name", 198 okb.Platforms.Select(x => x.Name).Distinct().ToArray() 199 )); 200 filters.Add(new StringComparisonAvailableValuesFilter( 201 typeof(ProblemDataTypeNameFilter).AssemblyQualifiedName, 202 "Problem Data Type Name", 203 okb.Problems.Select(x => x.DataType.Name).Distinct().ToArray() 204 )); 205 #endregion 206 207 #region Combined Filters 103 208 filters.Add(new CombinedFilter(typeof(AndFilter).AssemblyQualifiedName, "AND", BooleanOperation.And)); 104 209 filters.Add(new CombinedFilter(typeof(OrFilter).AssemblyQualifiedName, "OR", BooleanOperation.Or)); 210 #endregion 105 211 } 106 212 return filters.OrderBy(x => x.Label); … … 119 225 } 120 226 121 public IEnumerable<DataTransfer.Run> GetRuns(IEnumerable<long> ids ) {227 public IEnumerable<DataTransfer.Run> GetRuns(IEnumerable<long> ids, bool includeBinaryValues) { 122 228 using (OKBDataContext okb = new OKBDataContext()) { 123 229 DataLoadOptions dlo = new DataLoadOptions(); 124 dlo.LoadWith<DataAccess.Run>(x => x.ResultBlobValues); 125 dlo.LoadWith<DataAccess.Run>(x => x.ResultBoolValues); 126 dlo.LoadWith<DataAccess.Run>(x => x.ResultFloatValues); 127 dlo.LoadWith<DataAccess.Run>(x => x.ResultIntValues); 128 dlo.LoadWith<DataAccess.Run>(x => x.ResultStringValues); 129 dlo.LoadWith<DataAccess.Run>(x => x.Experiment); 130 dlo.LoadWith<DataAccess.ResultBlobValue>(x => x.Result); 131 dlo.LoadWith<DataAccess.ResultBlobValue>(x => x.DataType); 132 dlo.LoadWith<DataAccess.ResultBoolValue>(x => x.Result); 133 dlo.LoadWith<DataAccess.ResultFloatValue>(x => x.Result); 134 dlo.LoadWith<DataAccess.ResultIntValue>(x => x.Result); 135 dlo.LoadWith<DataAccess.ResultStringValue>(x => x.Result); 136 dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterBlobValues); 137 dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterBoolValues); 138 dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterFloatValues); 139 dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterIntValues); 140 dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterStringValues); 141 dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterBlobValues); 142 dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterBoolValues); 143 dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterFloatValues); 144 dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterIntValues); 145 dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterStringValues); 146 //dlo.LoadWith<DataAccess.Experiment>(x => x.Algorithm); 147 //dlo.LoadWith<DataAccess.Experiment>(x => x.Problem); 148 dlo.LoadWith<DataAccess.AlgorithmParameterBlobValue>(x => x.AlgorithmParameter); 149 dlo.LoadWith<DataAccess.AlgorithmParameterBlobValue>(x => x.DataType); 150 dlo.LoadWith<DataAccess.AlgorithmParameterBoolValue>(x => x.AlgorithmParameter); 151 dlo.LoadWith<DataAccess.AlgorithmParameterFloatValue>(x => x.AlgorithmParameter); 152 dlo.LoadWith<DataAccess.AlgorithmParameterIntValue>(x => x.AlgorithmParameter); 153 dlo.LoadWith<DataAccess.AlgorithmParameterStringValue>(x => x.AlgorithmParameter); 154 dlo.LoadWith<DataAccess.ProblemParameterBlobValue>(x => x.ProblemParameter); 155 dlo.LoadWith<DataAccess.ProblemParameterBlobValue>(x => x.DataType); 156 dlo.LoadWith<DataAccess.ProblemParameterBoolValue>(x => x.ProblemParameter); 157 dlo.LoadWith<DataAccess.ProblemParameterFloatValue>(x => x.ProblemParameter); 158 dlo.LoadWith<DataAccess.ProblemParameterIntValue>(x => x.ProblemParameter); 159 dlo.LoadWith<DataAccess.ProblemParameterStringValue>(x => x.ProblemParameter); 160 //dlo.LoadWith<DataAccess.Algorithm>(x => x.AlgorithmParameters); 161 //dlo.LoadWith<DataAccess.Algorithm>(x => x.Results); 162 //dlo.LoadWith<DataAccess.Algorithm>(x => x.AlgorithmClass); 163 //dlo.LoadWith<DataAccess.Algorithm>(x => x.Platform); 164 //dlo.LoadWith<DataAccess.Problem>(x => x.ProblemParameters); 165 //dlo.LoadWith<DataAccess.Problem>(x => x.ProblemClass); 230 // TODO: specify LoadWiths 166 231 okb.LoadOptions = dlo; 167 232 168 return okb.Runs.Where(x => ids.Contains(x.Id)).Select(x => Convert ToQueryResult(x)).ToArray();233 return okb.Runs.Where(x => ids.Contains(x.Id)).Select(x => Convert.ToDto(x, includeBinaryValues)).ToArray(); 169 234 } 170 235 } … … 174 239 return runs.Where(f.Expression); 175 240 } 176 177 private QueryResult ConvertToQueryResult(DataAccess.Run run) {178 List<QueryValue> algorithmParameters = new List<QueryValue>();179 List<QueryValue> problemParameters = new List<QueryValue>();180 List<QueryValue> results = new List<QueryValue>();181 182 foreach (DataAccess.AlgorithmParameterBlobValue value in run.Experiment.AlgorithmParameterBlobValues)183 algorithmParameters.Add(new QueryBlobValue { Name = value.AlgorithmParameter.Name, DataTypeName = value.DataType.Name + " (" + value.DataType.TypeName + ")", Value = value.Value.ToArray() });184 foreach (DataAccess.AlgorithmParameterBoolValue value in run.Experiment.AlgorithmParameterBoolValues)185 algorithmParameters.Add(new QueryBoolValue { Name = value.AlgorithmParameter.Name, Value = value.Value });186 foreach (DataAccess.AlgorithmParameterFloatValue value in run.Experiment.AlgorithmParameterFloatValues)187 algorithmParameters.Add(new QueryFloatValue { Name = value.AlgorithmParameter.Name, Value = value.Value });188 foreach (DataAccess.AlgorithmParameterIntValue value in run.Experiment.AlgorithmParameterIntValues)189 algorithmParameters.Add(new QueryIntValue { Name = value.AlgorithmParameter.Name, Value = value.Value });190 foreach (DataAccess.AlgorithmParameterStringValue value in run.Experiment.AlgorithmParameterStringValues)191 algorithmParameters.Add(new QueryStringValue { Name = value.AlgorithmParameter.Name, Value = value.Value });192 193 foreach (DataAccess.ProblemParameterBlobValue value in run.Experiment.ProblemParameterBlobValues)194 problemParameters.Add(new QueryBlobValue { Name = value.ProblemParameter.Name, DataTypeName = value.DataType.Name + " (" + value.DataType.TypeName + ")", Value = value.Value.ToArray() });195 foreach (DataAccess.ProblemParameterBoolValue value in run.Experiment.ProblemParameterBoolValues)196 problemParameters.Add(new QueryBoolValue { Name = value.ProblemParameter.Name, Value = value.Value });197 foreach (DataAccess.ProblemParameterFloatValue value in run.Experiment.ProblemParameterFloatValues)198 problemParameters.Add(new QueryFloatValue { Name = value.ProblemParameter.Name, Value = value.Value });199 foreach (DataAccess.ProblemParameterIntValue value in run.Experiment.ProblemParameterIntValues)200 problemParameters.Add(new QueryIntValue { Name = value.ProblemParameter.Name, Value = value.Value });201 foreach (DataAccess.ProblemParameterStringValue value in run.Experiment.ProblemParameterStringValues)202 problemParameters.Add(new QueryStringValue { Name = value.ProblemParameter.Name, Value = value.Value });203 204 foreach (DataAccess.ResultBlobValue value in run.ResultBlobValues)205 results.Add(new QueryBlobValue { Name = value.Result.Name, DataTypeName = value.DataType.Name + " (" + value.DataType.TypeName + ")", Value = value.Value.ToArray() });206 foreach (DataAccess.ResultBoolValue value in run.ResultBoolValues)207 results.Add(new QueryBoolValue { Name = value.Result.Name, Value = value.Value });208 foreach (DataAccess.ResultFloatValue value in run.ResultFloatValues)209 results.Add(new QueryFloatValue { Name = value.Result.Name, Value = value.Value });210 foreach (DataAccess.ResultIntValue value in run.ResultIntValues)211 results.Add(new QueryIntValue { Name = value.Result.Name, Value = value.Value });212 foreach (DataAccess.ResultStringValue value in run.ResultStringValues)213 results.Add(new QueryStringValue { Name = value.Result.Name, Value = value.Value });214 215 QueryResult result = new QueryResult();216 result.Id = run.Id;217 result.AlgorithmParameters = algorithmParameters;218 result.ProblemParameters = problemParameters;219 result.Results = results;220 return result;221 }222 241 } 223 242 }
Note: See TracChangeset
for help on using the changeset viewer.