Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj	(revision 5304)
@@ -108,9 +108,8 @@
     <Compile Include="ServiceClients\AlgorithmData.cs" />
     <Compile Include="ServiceClients\AlgorithmParameter.cs" />
-    <Compile Include="ServiceClients\AndFilter.cs" />
+    <Compile Include="ServiceClients\CombinedFilter.cs" />
     <Compile Include="ServiceClients\OKBServiceClients.cs" />
     <Compile Include="ServiceClients\SetComparisonStringAvailableValuesFilter.cs" />
     <Compile Include="ServiceClients\NameSetComparisonStringAvailableValuesFilter.cs" />
-    <Compile Include="ServiceClients\OrFilter.cs" />
     <Compile Include="ServiceClients\OrdinalComparisonDateTimeFilter.cs" />
     <Compile Include="ServiceClients\OrdinalComparisonLongFilter.cs" />
@@ -183,10 +182,4 @@
       <DependentUpon>AlgorithmParameterView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Views\AndFilterView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="Views\AndFilterView.Designer.cs">
-      <DependentUpon>AndFilterView.cs</DependentUpon>
-    </Compile>
     <Compile Include="Views\SetComparisonStringAvailableValuesFilterView.cs">
       <SubType>UserControl</SubType>
@@ -200,10 +193,4 @@
     <Compile Include="Views\NameSetComparisonStringAvailableValuesFilterView.Designer.cs">
       <DependentUpon>NameSetComparisonStringAvailableValuesFilterView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="Views\OrFilterView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="Views\OrFilterView.Designer.cs">
-      <DependentUpon>OrFilterView.cs</DependentUpon>
     </Compile>
     <Compile Include="Views\CombinedFilterView.cs">
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBClient.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBClient.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBClient.cs	(revision 5304)
@@ -603,86 +603,4 @@
       }
     }
-    public RunCollection ConvertOKBRunsToOptimizationRuns(IItemCollection<Run> runs) {
-      RunCollection runCollection = new RunCollection();
-      foreach (Run run in runs) {
-        Optimization.Run r = new Optimization.Run();
-        foreach (ResultValue resultValue in run.ResultValues) {
-          Result result = GetResult(resultValue.ResultId);
-          if (resultValue is ResultBlobValue) {
-            IItem item = null;
-            using (MemoryStream stream = new MemoryStream(((ResultBlobValue)resultValue).Value)) {
-              try {
-                item = XmlParser.Deserialize<IItem>(stream);
-              }
-              catch (Exception ex) {
-                ErrorHandling.ShowErrorDialog(ex);
-              }
-              stream.Close();
-            }
-            r.Results.Add(result.Name, item);
-          } else if (resultValue is ResultBoolValue) {
-            r.Results.Add(result.Name, new BoolValue(((ResultBoolValue)resultValue).Value));
-          } else if (resultValue is ResultFloatValue) {
-            r.Results.Add(result.Name, new DoubleValue(((ResultFloatValue)resultValue).Value));
-          } else if (resultValue is ResultIntValue) {
-            r.Results.Add(result.Name, new IntValue((int)((ResultIntValue)resultValue).Value));
-          } else if (resultValue is ResultStringValue) {
-            r.Results.Add(result.Name, new StringValue(((ResultStringValue)resultValue).Value));
-          }
-        }
-
-        Experiment exp = GetExperiment(run.ExperimentId);
-        foreach (AlgorithmParameterValue algorithmParameterValue in exp.AlgorithmParameterValues) {
-          AlgorithmParameter algorithmParameter = GetAlgorithmParameter(algorithmParameterValue.AlgorithmParameterId);
-          if (algorithmParameterValue is AlgorithmParameterBlobValue) {
-            IItem item = null;
-            using (MemoryStream stream = new MemoryStream(((AlgorithmParameterBlobValue)algorithmParameterValue).Value)) {
-              try {
-                item = XmlParser.Deserialize<IItem>(stream);
-              }
-              catch (Exception ex) {
-                ErrorHandling.ShowErrorDialog(ex);
-              }
-              stream.Close();
-            }
-            r.Parameters.Add(algorithmParameter.Name, item);
-          } else if (algorithmParameterValue is AlgorithmParameterBoolValue) {
-            r.Parameters.Add(algorithmParameter.Name, new BoolValue(((AlgorithmParameterBoolValue)algorithmParameterValue).Value));
-          } else if (algorithmParameterValue is AlgorithmParameterFloatValue) {
-            r.Parameters.Add(algorithmParameter.Name, new DoubleValue(((AlgorithmParameterFloatValue)algorithmParameterValue).Value));
-          } else if (algorithmParameterValue is AlgorithmParameterIntValue) {
-            r.Parameters.Add(algorithmParameter.Name, new IntValue((int)((AlgorithmParameterIntValue)algorithmParameterValue).Value));
-          } else if (algorithmParameterValue is AlgorithmParameterStringValue) {
-            r.Parameters.Add(algorithmParameter.Name, new StringValue(((AlgorithmParameterStringValue)algorithmParameterValue).Value));
-          }
-        }
-        foreach (ProblemParameterValue problemParameterValue in exp.ProblemParameterValues) {
-          ProblemParameter problemParameter = GetProblemParameter(problemParameterValue.ProblemParameterId);
-          if (problemParameterValue is ProblemParameterBlobValue) {
-            IItem item = null;
-            using (MemoryStream stream = new MemoryStream(((ProblemParameterBlobValue)problemParameterValue).Value)) {
-              try {
-                item = XmlParser.Deserialize<IItem>(stream);
-              }
-              catch (Exception ex) {
-                ErrorHandling.ShowErrorDialog(ex);
-              }
-              stream.Close();
-            }
-            r.Parameters.Add(problemParameter.Name, item);
-          } else if (problemParameterValue is ProblemParameterBoolValue) {
-            r.Parameters.Add(problemParameter.Name, new BoolValue(((ProblemParameterBoolValue)problemParameterValue).Value));
-          } else if (problemParameterValue is ProblemParameterFloatValue) {
-            r.Parameters.Add(problemParameter.Name, new DoubleValue(((ProblemParameterFloatValue)problemParameterValue).Value));
-          } else if (problemParameterValue is ProblemParameterIntValue) {
-            r.Parameters.Add(problemParameter.Name, new IntValue((int)((ProblemParameterIntValue)problemParameterValue).Value));
-          } else if (problemParameterValue is ProblemParameterStringValue) {
-            r.Parameters.Add(problemParameter.Name, new StringValue(((ProblemParameterStringValue)problemParameterValue).Value));
-          }
-        }
-        runCollection.Add(r);
-      }
-      return runCollection;
-    }
     #endregion
 
@@ -695,6 +613,6 @@
         }
         catch (Exception ex) {
-          ErrorHandling.ShowErrorDialog("Refresh filters.", ex);
-          return null;
+          ErrorHandling.ShowErrorDialog("Get filters failed.", ex);
+          return Enumerable.Empty<Filter>();
         }
       }
@@ -704,21 +622,28 @@
       return GetFilters(false);
     }
-    public long QueryNumberOfRuns(Filter filter) {
-      try {
-        return CallQueryService<long>(x => x.QueryNumberOfRuns(filter));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh runs failed.", ex);
+    public long GetNumberOfQueryResults(Filter filter) {
+      try {
+        return CallQueryService<long>(x => x.GetNumberOfQueryResults(filter));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Get number of query results failed.", ex);
         return -1;
       }
     }
-    public ItemCollection<Run> QueryRuns(Filter filter) {
-      try {
-        ItemCollection<Run> runs = new ItemCollection<Run>();
-        runs.AddRange(CallQueryService<List<Run>>(s => s.QueryRuns(filter)).OrderByDescending(x => x.CreatedDate));
-        return runs;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh runs failed.", ex);
+    public IEnumerable<long> GetQueryResultIds(Filter filter) {
+      try {
+        return CallQueryService<IEnumerable<long>>(x => x.GetQueryResultIds(filter));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Get query result ids failed.", ex);
+        return Enumerable.Empty<long>();
+      }
+    }
+    public IEnumerable<QueryResult> GetQueryResults(IEnumerable<long> ids) {
+      try {
+        return CallQueryService<IEnumerable<QueryResult>>(s => s.GetQueryResults(ids.ToList()));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Get query results failed.", ex);
         return null;
       }
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBExperiment.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBExperiment.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBExperiment.cs	(revision 5304)
@@ -118,31 +118,34 @@
       }
     }
+    private RunCollection runs;
     public RunCollection Runs {
-      get {
-        if (Algorithm != null) return Algorithm.Runs;
-        else return null;
-      }
+      get { return runs; }
     }
 
     #region Persistence Properties
     [Storable(Name = "AlgorithmId")]
-    private long AlgorithmIdPersistence {
+    private long StorableAlgorithmId {
       get { return algorithmId; }
       set { algorithmId = value; }
     }
     [Storable(Name = "Algorithm")]
-    private IAlgorithm AlgorithmPersistence {
+    private IAlgorithm StorableAlgorithm {
       get { return Algorithm; }
       set { Algorithm = value; }
     }
     [Storable(Name = "ProblemId")]
-    private long ProblemIdPersistence {
+    private long StorableProblemId {
       get { return problemId; }
       set { problemId = value; }
     }
     [Storable(Name = "Problem")]
-    private IProblem ProblemPersistence {
+    private IProblem StorableProblem {
       get { return Problem; }
       set { Problem = value; }
+    }
+    [Storable(Name = "Runs")]
+    private RunCollection StorableRuns {
+      get { return runs; }
+      set { runs = value; }
     }
     #endregion
@@ -156,4 +159,5 @@
       problemId = original.problemId;
       problem = cloner.Clone(original.problem);
+      runs = cloner.Clone(original.runs);
       RegisterAlgorithmEvents();
     }
@@ -162,4 +166,5 @@
       name = ItemName;
       description = ItemDescription;
+      runs = new RunCollection();
     }
 
@@ -290,4 +295,7 @@
         Algorithm.Started += new EventHandler(algorithm_Started);
         Algorithm.Stopped += new EventHandler(algorithm_Stopped);
+        Algorithm.Runs.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsAdded);
+        Algorithm.Runs.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsRemoved);
+        Algorithm.Runs.CollectionReset += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_CollectionReset);
       }
     }
@@ -302,4 +310,7 @@
         Algorithm.Started -= new EventHandler(algorithm_Started);
         Algorithm.Stopped -= new EventHandler(algorithm_Stopped);
+        Algorithm.Runs.ItemsAdded -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsAdded);
+        Algorithm.Runs.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsRemoved);
+        Algorithm.Runs.CollectionReset -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_CollectionReset);
       }
     }
@@ -334,4 +345,14 @@
         OnExceptionOccurred(ex);
       }
+    }
+    private void algorithm_Runs_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      runs.AddRange(e.Items);
+    }
+    private void algorithm_Runs_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      runs.RemoveRange(e.Items);
+    }
+    private void algorithm_Runs_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      runs.Clear();
+      runs.AddRange(algorithm.Runs);
     }
     #endregion
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/AndFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/AndFilter.cs	(revision 5303)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Linq;
-
-namespace HeuristicLab.Clients.OKB {
-  public partial class AndFilter {
-    public override Filter Clone() {
-      return new AndFilter() { FilterTypeName = FilterTypeName, Label = Label, Filters = Filters.Select(x => x.Clone()).ToList() };
-    }
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/CombinedFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/CombinedFilter.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/CombinedFilter.cs	(revision 5304)
@@ -0,0 +1,30 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+
+namespace HeuristicLab.Clients.OKB {
+  public partial class CombinedFilter {
+    public override Filter Clone() {
+      return new CombinedFilter() { FilterTypeName = FilterTypeName, Label = Label, Operation = Operation, Filters = Filters.Select(x => x.Clone()).ToList() };
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/OKBServiceClients.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/OKBServiceClients.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/OKBServiceClients.cs	(revision 5304)
@@ -576,9 +576,9 @@
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterStringValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterBoolValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterBlobValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterIntValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterBoolValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterFloatValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AlgorithmParameterStringValue))]
   public partial class AlgorithmParameterValue : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
 
@@ -652,9 +652,9 @@
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterBlobValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterIntValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterFloatValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterStringValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterBoolValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterFloatValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterIntValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterBlobValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ProblemParameterStringValue))]
   public partial class ProblemParameterValue : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
 
@@ -727,4 +727,46 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class AlgorithmParameterStringValue : HeuristicLab.Clients.OKB.AlgorithmParameterValue {
+
+    private string ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterBoolValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class AlgorithmParameterBoolValue : HeuristicLab.Clients.OKB.AlgorithmParameterValue {
+
+    private bool ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public bool Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterBlobValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   public partial class AlgorithmParameterBlobValue : HeuristicLab.Clients.OKB.AlgorithmParameterValue {
@@ -769,25 +811,4 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterBoolValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class AlgorithmParameterBoolValue : HeuristicLab.Clients.OKB.AlgorithmParameterValue {
-
-    private bool ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public bool Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((this.ValueField.Equals(value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterFloatValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   public partial class AlgorithmParameterFloatValue : HeuristicLab.Clients.OKB.AlgorithmParameterValue {
@@ -811,6 +832,69 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "AlgorithmParameterStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class AlgorithmParameterStringValue : HeuristicLab.Clients.OKB.AlgorithmParameterValue {
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterBlobValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ProblemParameterBlobValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
+
+    private byte[] ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public byte[] Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterIntValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ProblemParameterIntValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
+
+    private long ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public long Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterFloatValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ProblemParameterFloatValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
+
+    private double ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public double Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ProblemParameterStringValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
 
     private string ValueField;
@@ -853,94 +937,10 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterFloatValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ProblemParameterFloatValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
-
-    private double ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public double Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((this.ValueField.Equals(value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterIntValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ProblemParameterIntValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
-
-    private long ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public long Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((this.ValueField.Equals(value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterBlobValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ProblemParameterBlobValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
-
-    private byte[] ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public byte[] Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ProblemParameterStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ProblemParameterStringValue : HeuristicLab.Clients.OKB.ProblemParameterValue {
-
-    private string ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public string Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "ResultValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultBlobValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultBoolValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultIntValue))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultBlobValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultStringValue))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultFloatValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.ResultIntValue))]
   public partial class ResultValue : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
 
@@ -1013,4 +1013,25 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ResultBlobValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ResultBlobValue : HeuristicLab.Clients.OKB.ResultValue {
+
+    private byte[] ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public byte[] Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "ResultBoolValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   public partial class ResultBoolValue : HeuristicLab.Clients.OKB.ResultValue {
@@ -1034,4 +1055,46 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ResultStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ResultStringValue : HeuristicLab.Clients.OKB.ResultValue {
+
+    private string ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ResultFloatValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class ResultFloatValue : HeuristicLab.Clients.OKB.ResultValue {
+
+    private double ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public double Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "ResultIntValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   public partial class ResultIntValue : HeuristicLab.Clients.OKB.ResultValue {
@@ -1041,67 +1104,4 @@
     [System.Runtime.Serialization.DataMemberAttribute()]
     public long Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((this.ValueField.Equals(value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ResultBlobValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ResultBlobValue : HeuristicLab.Clients.OKB.ResultValue {
-
-    private byte[] ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public byte[] Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ResultStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ResultStringValue : HeuristicLab.Clients.OKB.ResultValue {
-
-    private string ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public string Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "ResultFloatValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class ResultFloatValue : HeuristicLab.Clients.OKB.ResultValue {
-
-    private double ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public double Value {
       get {
         return this.ValueField;
@@ -1266,12 +1266,10 @@
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.SetComparisonStringFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.SetComparisonStringAvailableValuesFilter))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.CombinedFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonDateTimeFilter))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonLongFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.NameOrdinalComparisonDoubleFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.NameOrdinalComparisonLongFilter))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonLongFilter))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.CombinedFilter))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AndFilter))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.EqualityComparisonFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.NameEqualityComparisonBoolFilter))]
@@ -1458,9 +1456,45 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "CombinedFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class CombinedFilter : HeuristicLab.Clients.OKB.Filter {
+
+    private System.Collections.Generic.List<HeuristicLab.Clients.OKB.Filter> FiltersField;
+
+    private HeuristicLab.Clients.OKB.BooleanOperation OperationField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.Filter> Filters {
+      get {
+        return this.FiltersField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.FiltersField, value) != true)) {
+          this.FiltersField = value;
+          this.RaisePropertyChanged("Filters");
+        }
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public HeuristicLab.Clients.OKB.BooleanOperation Operation {
+      get {
+        return this.OperationField;
+      }
+      set {
+        if ((this.OperationField.Equals(value) != true)) {
+          this.OperationField = value;
+          this.RaisePropertyChanged("Operation");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "OrdinalComparisonFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonDateTimeFilter))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonLongFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.NameOrdinalComparisonDoubleFilter))]
   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.NameOrdinalComparisonLongFilter))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrdinalComparisonLongFilter))]
   public partial class OrdinalComparisonFilter : HeuristicLab.Clients.OKB.Filter {
 
@@ -1504,4 +1538,25 @@
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "OrdinalComparisonLongFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class OrdinalComparisonLongFilter : HeuristicLab.Clients.OKB.OrdinalComparisonFilter {
+
+    private long ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public long Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "NameOrdinalComparisonDoubleFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   public partial class NameOrdinalComparisonDoubleFilter : HeuristicLab.Clients.OKB.OrdinalComparisonFilter {
@@ -1572,60 +1627,4 @@
       }
     }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "OrdinalComparisonLongFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class OrdinalComparisonLongFilter : HeuristicLab.Clients.OKB.OrdinalComparisonFilter {
-
-    private long ValueField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public long Value {
-      get {
-        return this.ValueField;
-      }
-      set {
-        if ((this.ValueField.Equals(value) != true)) {
-          this.ValueField = value;
-          this.RaisePropertyChanged("Value");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "CombinedFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.AndFilter))]
-  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.OrFilter))]
-  public partial class CombinedFilter : HeuristicLab.Clients.OKB.Filter {
-
-    private System.Collections.Generic.List<HeuristicLab.Clients.OKB.Filter> FiltersField;
-
-    [System.Runtime.Serialization.DataMemberAttribute()]
-    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.Filter> Filters {
-      get {
-        return this.FiltersField;
-      }
-      set {
-        if ((object.ReferenceEquals(this.FiltersField, value) != true)) {
-          this.FiltersField = value;
-          this.RaisePropertyChanged("Filters");
-        }
-      }
-    }
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "AndFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class AndFilter : HeuristicLab.Clients.OKB.CombinedFilter {
-  }
-
-  [System.Diagnostics.DebuggerStepThroughAttribute()]
-  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
-  [System.Runtime.Serialization.DataContractAttribute(Name = "OrFilter", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
-  public partial class OrFilter : HeuristicLab.Clients.OKB.CombinedFilter {
   }
 
@@ -1743,4 +1742,15 @@
 
   [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "BooleanOperation", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public enum BooleanOperation : int {
+
+    [System.Runtime.Serialization.EnumMemberAttribute()]
+    And = 0,
+
+    [System.Runtime.Serialization.EnumMemberAttribute()]
+    Or = 1,
+  }
+
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
   [System.Runtime.Serialization.DataContractAttribute(Name = "OrdinalComparison", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
   public enum OrdinalComparison : int {
@@ -1774,4 +1784,256 @@
     [System.Runtime.Serialization.EnumMemberAttribute()]
     NotEqual = 1,
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryResult", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class QueryResult : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+
+    private System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryValue> AlgorithmParametersField;
+
+    private long IdField;
+
+    private System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryValue> ProblemParametersField;
+
+    private System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryValue> ResultsField;
+
+    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+      get {
+        return this.extensionDataField;
+      }
+      set {
+        this.extensionDataField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryValue> AlgorithmParameters {
+      get {
+        return this.AlgorithmParametersField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.AlgorithmParametersField, value) != true)) {
+          this.AlgorithmParametersField = value;
+          this.RaisePropertyChanged("AlgorithmParameters");
+        }
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public long Id {
+      get {
+        return this.IdField;
+      }
+      set {
+        if ((this.IdField.Equals(value) != true)) {
+          this.IdField = value;
+          this.RaisePropertyChanged("Id");
+        }
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryValue> ProblemParameters {
+      get {
+        return this.ProblemParametersField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ProblemParametersField, value) != true)) {
+          this.ProblemParametersField = value;
+          this.RaisePropertyChanged("ProblemParameters");
+        }
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryValue> Results {
+      get {
+        return this.ResultsField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ResultsField, value) != true)) {
+          this.ResultsField = value;
+          this.RaisePropertyChanged("Results");
+        }
+      }
+    }
+
+    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+    protected void RaisePropertyChanged(string propertyName) {
+      System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+      if ((propertyChanged != null)) {
+        propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.QueryIntValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.QueryStringValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.QueryFloatValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.QueryBoolValue))]
+  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.OKB.QueryBlobValue))]
+  public partial class QueryValue : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
+
+    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+
+    private string NameField;
+
+    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+      get {
+        return this.extensionDataField;
+      }
+      set {
+        this.extensionDataField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string Name {
+      get {
+        return this.NameField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.NameField, value) != true)) {
+          this.NameField = value;
+          this.RaisePropertyChanged("Name");
+        }
+      }
+    }
+
+    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+
+    protected void RaisePropertyChanged(string propertyName) {
+      System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+      if ((propertyChanged != null)) {
+        propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryIntValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class QueryIntValue : HeuristicLab.Clients.OKB.QueryValue {
+
+    private long ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public long Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryStringValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class QueryStringValue : HeuristicLab.Clients.OKB.QueryValue {
+
+    private string ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryFloatValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class QueryFloatValue : HeuristicLab.Clients.OKB.QueryValue {
+
+    private double ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public double Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryBoolValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class QueryBoolValue : HeuristicLab.Clients.OKB.QueryValue {
+
+    private bool ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public bool Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((this.ValueField.Equals(value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "QueryBlobValue", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.OKB.DataTransfer")]
+  public partial class QueryBlobValue : HeuristicLab.Clients.OKB.QueryValue {
+
+    private string DataTypeNameField;
+
+    private byte[] ValueField;
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string DataTypeName {
+      get {
+        return this.DataTypeNameField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.DataTypeNameField, value) != true)) {
+          this.DataTypeNameField = value;
+          this.RaisePropertyChanged("DataTypeName");
+        }
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public byte[] Value {
+      get {
+        return this.ValueField;
+      }
+      set {
+        if ((object.ReferenceEquals(this.ValueField, value) != true)) {
+          this.ValueField = value;
+          this.RaisePropertyChanged("Value");
+        }
+      }
+    }
   }
 
@@ -2243,9 +2505,12 @@
     System.Collections.Generic.List<HeuristicLab.Clients.OKB.Filter> GetFilters();
 
-    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IQueryService/QueryNumberOfRuns", ReplyAction = "http://tempuri.org/IQueryService/QueryNumberOfRunsResponse")]
-    long QueryNumberOfRuns(HeuristicLab.Clients.OKB.Filter filter);
-
-    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IQueryService/QueryRuns", ReplyAction = "http://tempuri.org/IQueryService/QueryRunsResponse")]
-    System.Collections.Generic.List<HeuristicLab.Clients.OKB.Run> QueryRuns(HeuristicLab.Clients.OKB.Filter filter);
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IQueryService/GetNumberOfQueryResults", ReplyAction = "http://tempuri.org/IQueryService/GetNumberOfQueryResultsResponse")]
+    long GetNumberOfQueryResults(HeuristicLab.Clients.OKB.Filter filter);
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IQueryService/GetQueryResultIds", ReplyAction = "http://tempuri.org/IQueryService/GetQueryResultIdsResponse")]
+    System.Collections.Generic.List<long> GetQueryResultIds(HeuristicLab.Clients.OKB.Filter filter);
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IQueryService/GetQueryResults", ReplyAction = "http://tempuri.org/IQueryService/GetQueryResultsResponse")]
+    System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryResult> GetQueryResults(System.Collections.Generic.List<long> ids);
   }
 
@@ -2281,10 +2546,14 @@
     }
 
-    public long QueryNumberOfRuns(HeuristicLab.Clients.OKB.Filter filter) {
-      return base.Channel.QueryNumberOfRuns(filter);
-    }
-
-    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.Run> QueryRuns(HeuristicLab.Clients.OKB.Filter filter) {
-      return base.Channel.QueryRuns(filter);
+    public long GetNumberOfQueryResults(HeuristicLab.Clients.OKB.Filter filter) {
+      return base.Channel.GetNumberOfQueryResults(filter);
+    }
+
+    public System.Collections.Generic.List<long> GetQueryResultIds(HeuristicLab.Clients.OKB.Filter filter) {
+      return base.Channel.GetQueryResultIds(filter);
+    }
+
+    public System.Collections.Generic.List<HeuristicLab.Clients.OKB.QueryResult> GetQueryResults(System.Collections.Generic.List<long> ids) {
+      return base.Channel.GetQueryResults(ids);
     }
   }
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/OrFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ServiceClients/OrFilter.cs	(revision 5303)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Linq;
-
-namespace HeuristicLab.Clients.OKB {
-  public partial class OrFilter {
-    public override Filter Clone() {
-      return new OrFilter() { FilterTypeName = FilterTypeName, Label = Label, Filters = Filters.Select(x => x.Clone()).ToList() };
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/AndFilterView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/AndFilterView.Designer.cs	(revision 5303)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-namespace HeuristicLab.Clients.OKB {
-  partial class AndFilterView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // AndFilterView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "AndFilterView";
-      this.Size = new System.Drawing.Size(727, 327);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-
-
-
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/AndFilterView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/AndFilterView.cs	(revision 5303)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Windows.Forms;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Clients.OKB {
-  [View("AndFilter View")]
-  [Content(typeof(AndFilter), true)]
-  public partial class AndFilterView : CombinedFilterView {
-    public new AndFilter Content {
-      get { return (AndFilter)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public AndFilterView() {
-      InitializeComponent();
-      string nl = Environment.NewLine;
-      label.Text = "A" + nl + "N" + nl + "D";
-    }
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/CombinedFilterView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/CombinedFilterView.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/CombinedFilterView.cs	(revision 5304)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Windows.Forms;
@@ -48,5 +49,9 @@
       base.OnContentChanged();
       RemoveFilters();
+      label.Text = string.Empty;
       if (Content != null) {
+        string nl = Environment.NewLine;
+        label.Text = Content.Operation == BooleanOperation.And ? "A" + nl + "N" + nl + "D" : "O" + nl + "R";
+
         foreach (Filter filter in Content.Filters)
           AddFilter(filter);
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OrFilterView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OrFilterView.Designer.cs	(revision 5303)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-namespace HeuristicLab.Clients.OKB {
-  partial class OrFilterView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // OrFilterView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "OrFilterView";
-      this.Size = new System.Drawing.Size(727, 327);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-
-
-
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OrFilterView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OrFilterView.cs	(revision 5303)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Windows.Forms;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Clients.OKB {
-  [View("OrFilter View")]
-  [Content(typeof(OrFilter), true)]
-  public partial class OrFilterView : CombinedFilterView {
-    public new OrFilter Content {
-      get { return (OrFilter)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public OrFilterView() {
-      InitializeComponent();
-      string nl = Environment.NewLine;
-      label.Text = "O" + nl + "R";
-    }
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/QueryView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/QueryView.Designer.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/QueryView.Designer.cs	(revision 5304)
@@ -46,13 +46,13 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QueryView));
       this.refreshResultsButton = new System.Windows.Forms.Button();
       this.toolTip = new System.Windows.Forms.ToolTip(this.components);
-      this.showRunsButton = new System.Windows.Forms.Button();
-      this.runCollectionView = new HeuristicLab.Clients.OKB.RunCollectionView();
+      this.runCollectionView = new HeuristicLab.Optimization.Views.RunCollectionView();
       this.splitContainer = new System.Windows.Forms.SplitContainer();
       this.filtersGroupBox = new System.Windows.Forms.GroupBox();
+      this.filterPanel = new System.Windows.Forms.Panel();
       this.resultsGroupBox = new System.Windows.Forms.GroupBox();
-      this.nrOfRunsButton = new System.Windows.Forms.Button();
-      this.filterPanel = new System.Windows.Forms.Panel();
+      this.deserializeBlobsCheckBox = new System.Windows.Forms.CheckBox();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
@@ -73,14 +73,4 @@
       this.refreshResultsButton.UseVisualStyleBackColor = true;
       this.refreshResultsButton.Click += new System.EventHandler(this.refreshResultsButton_Click);
-      // 
-      // showRunsButton
-      // 
-      this.showRunsButton.Location = new System.Drawing.Point(36, 19);
-      this.showRunsButton.Name = "showRunsButton";
-      this.showRunsButton.Size = new System.Drawing.Size(75, 24);
-      this.showRunsButton.TabIndex = 1;
-      this.showRunsButton.Text = "&Show Runs";
-      this.showRunsButton.UseVisualStyleBackColor = true;
-      this.showRunsButton.Click += new System.EventHandler(this.showRunsButton_Click);
       // 
       // runCollectionView
@@ -130,30 +120,4 @@
       this.filtersGroupBox.Text = "Filters";
       // 
-      // resultsGroupBox
-      // 
-      this.resultsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.resultsGroupBox.Controls.Add(this.nrOfRunsButton);
-      this.resultsGroupBox.Controls.Add(this.refreshResultsButton);
-      this.resultsGroupBox.Controls.Add(this.runCollectionView);
-      this.resultsGroupBox.Controls.Add(this.showRunsButton);
-      this.resultsGroupBox.Location = new System.Drawing.Point(0, 3);
-      this.resultsGroupBox.Name = "resultsGroupBox";
-      this.resultsGroupBox.Size = new System.Drawing.Size(734, 211);
-      this.resultsGroupBox.TabIndex = 0;
-      this.resultsGroupBox.TabStop = false;
-      this.resultsGroupBox.Text = "Results";
-      // 
-      // nrOfRunsButton
-      // 
-      this.nrOfRunsButton.Location = new System.Drawing.Point(117, 19);
-      this.nrOfRunsButton.Name = "nrOfRunsButton";
-      this.nrOfRunsButton.Size = new System.Drawing.Size(75, 23);
-      this.nrOfRunsButton.TabIndex = 3;
-      this.nrOfRunsButton.Text = "No. of Runs";
-      this.nrOfRunsButton.UseVisualStyleBackColor = true;
-      this.nrOfRunsButton.Click += new System.EventHandler(this.nrOfRunsButton_Click);
-      // 
       // filterPanel
       // 
@@ -165,4 +129,31 @@
       this.filterPanel.Size = new System.Drawing.Size(722, 189);
       this.filterPanel.TabIndex = 0;
+      // 
+      // resultsGroupBox
+      // 
+      this.resultsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.resultsGroupBox.Controls.Add(this.deserializeBlobsCheckBox);
+      this.resultsGroupBox.Controls.Add(this.refreshResultsButton);
+      this.resultsGroupBox.Controls.Add(this.runCollectionView);
+      this.resultsGroupBox.Location = new System.Drawing.Point(0, 3);
+      this.resultsGroupBox.Name = "resultsGroupBox";
+      this.resultsGroupBox.Size = new System.Drawing.Size(734, 211);
+      this.resultsGroupBox.TabIndex = 0;
+      this.resultsGroupBox.TabStop = false;
+      this.resultsGroupBox.Text = "Results";
+      // 
+      // deserializeBlobsCheckBox
+      // 
+      this.deserializeBlobsCheckBox.AutoSize = true;
+      this.deserializeBlobsCheckBox.Checked = true;
+      this.deserializeBlobsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.deserializeBlobsCheckBox.Location = new System.Drawing.Point(62, 24);
+      this.deserializeBlobsCheckBox.Name = "deserializeBlobsCheckBox";
+      this.deserializeBlobsCheckBox.Size = new System.Drawing.Size(106, 17);
+      this.deserializeBlobsCheckBox.TabIndex = 3;
+      this.deserializeBlobsCheckBox.Text = "&Deserialize Blobs";
+      this.deserializeBlobsCheckBox.UseVisualStyleBackColor = true;
       // 
       // QueryView
@@ -179,4 +170,5 @@
       this.filtersGroupBox.ResumeLayout(false);
       this.resultsGroupBox.ResumeLayout(false);
+      this.resultsGroupBox.PerformLayout();
       this.ResumeLayout(false);
 
@@ -187,11 +179,10 @@
     private System.Windows.Forms.Button refreshResultsButton;
     private System.Windows.Forms.ToolTip toolTip;
-    private RunCollectionView runCollectionView;
-    private System.Windows.Forms.Button showRunsButton;
+    private HeuristicLab.Optimization.Views.RunCollectionView runCollectionView;
     private System.Windows.Forms.SplitContainer splitContainer;
     private System.Windows.Forms.GroupBox filtersGroupBox;
     private System.Windows.Forms.GroupBox resultsGroupBox;
-    private System.Windows.Forms.Button nrOfRunsButton;
     private System.Windows.Forms.Panel filterPanel;
+    private System.Windows.Forms.CheckBox deserializeBlobsCheckBox;
 
   }
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/QueryView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/QueryView.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/QueryView.cs	(revision 5304)
@@ -21,8 +21,14 @@
 
 using System;
+using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.Xml;
 
 namespace HeuristicLab.Clients.OKB {
@@ -30,5 +36,5 @@
   [Content(typeof(OKBClient), false)]
   public sealed partial class QueryView : HeuristicLab.MainForm.WindowsForms.View {
-    private AndFilterView andFilterView;
+    private CombinedFilterView combinedFilterView;
 
     public QueryView() {
@@ -40,20 +46,20 @@
       this.Cursor = Cursors.AppStarting;
 
-      Func<AndFilter> func = () => {
-        return OKBClient.Instance.GetFilters().OfType<AndFilter>().FirstOrDefault();
+      Func<CombinedFilter> func = () => {
+        return OKBClient.Instance.GetFilters().OfType<CombinedFilter>().Where(x => x.Operation == BooleanOperation.And).FirstOrDefault();
       };
 
       func.BeginInvoke((IAsyncResult result) => {
-        AndFilter filter = func.EndInvoke(result);
-        if (InvokeRequired) Invoke(new Action<AndFilter>(FinishedLoadingAndFilter), filter);
-        else FinishedLoadingAndFilter(filter);
+        CombinedFilter filter = func.EndInvoke(result);
+        if (InvokeRequired) Invoke(new Action<CombinedFilter>(FinishedLoadingFilter), filter);
+        else FinishedLoadingFilter(filter);
       }, null);
     }
 
-    private void FinishedLoadingAndFilter(AndFilter filter) {
+    private void FinishedLoadingFilter(CombinedFilter filter) {
       if (filter != null) {
-        andFilterView = (AndFilterView)MainFormManager.CreateView(typeof(AndFilterView));
-        andFilterView.Content = (AndFilter)filter.Clone();
-        Control control = (Control)andFilterView;
+        combinedFilterView = (CombinedFilterView)MainFormManager.CreateView(typeof(CombinedFilterView));
+        combinedFilterView.Content = (CombinedFilter)filter.Clone();
+        Control control = (Control)combinedFilterView;
         control.Dock = DockStyle.Fill;
         filterPanel.Controls.Add(control);
@@ -65,24 +71,81 @@
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
-      resultsGroupBox.Enabled = andFilterView != null;
-      showRunsButton.Enabled = (runCollectionView.Content != null) && (runCollectionView.Content.Count > 0);
+      resultsGroupBox.Enabled = combinedFilterView != null;
     }
 
     private void refreshResultsButton_Click(object sender, EventArgs e) {
-      DateTime start = DateTime.Now;
-      runCollectionView.Content = OKBClient.Instance.QueryRuns(andFilterView.Content);
-      MessageBox.Show((DateTime.Now - start).ToString());
+      bool deserialize = deserializeBlobsCheckBox.Checked;
+
+      System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
+      sw.Start();
+      long count = OKBClient.Instance.GetNumberOfQueryResults(combinedFilterView.Content);
+      sw.Stop();
+      MessageBox.Show(count.ToString() + " Runs");
+      if (MessageBox.Show(sw.Elapsed.ToString(), "GetNumberOfQueryResults", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
+
+      sw.Restart();
+      var ids = OKBClient.Instance.GetQueryResultIds(combinedFilterView.Content);
+      sw.Stop();
+      if (MessageBox.Show(sw.Elapsed.ToString(), "GetQueryResultIds", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
+
+      sw.Restart();
+      List<QueryResult> results = new List<QueryResult>();
+      while (ids.Count() > 0) {
+        results.AddRange(OKBClient.Instance.GetQueryResults(ids.Take(50)));
+        ids = ids.Skip(50);
+      }
+      sw.Stop();
+      if (MessageBox.Show(sw.Elapsed.ToString(), "GetQueryResults", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return;
+
+      sw.Restart();
+      IEnumerable<QueryResult> res = results.AsEnumerable();
+      RunCollection runs = new RunCollection();
+      runCollectionView.Content = runs;
+      while (res.Count() > 0) {
+        runs.AddRange(res.Take(50).Select(x => ConvertToOptimizationRun(x, deserialize)));
+        res = res.Skip(50);
+      }
+      sw.Stop();
+      MessageBox.Show(sw.Elapsed.ToString(), "Conversion", MessageBoxButtons.OK);
+
       SetEnabledStateOfControls();
     }
 
-    private void showRunsButton_Click(object sender, EventArgs e) {
-      DateTime start = DateTime.Now;
-      MainFormManager.MainForm.ShowContent(OKBClient.Instance.ConvertOKBRunsToOptimizationRuns(runCollectionView.Content));
-      MessageBox.Show((DateTime.Now - start).ToString());
+    private Optimization.IRun ConvertToOptimizationRun(QueryResult queryResult, bool deserialize) {
+      Optimization.Run run = new Optimization.Run();
+      foreach (QueryValue value in queryResult.AlgorithmParameters)
+        run.Parameters.Add(value.Name, ConvertToItem(value, deserialize));
+      foreach (QueryValue value in queryResult.ProblemParameters)
+        run.Parameters.Add(value.Name, ConvertToItem(value, deserialize));
+      foreach (QueryValue value in queryResult.Results)
+        run.Results.Add(value.Name, ConvertToItem(value, deserialize));
+      return run;
     }
 
-    private void nrOfRunsButton_Click(object sender, EventArgs e) {
-      long runs = OKBClient.Instance.QueryNumberOfRuns(andFilterView.Content);
-      MessageBox.Show(runs.ToString());
+    private IItem ConvertToItem(QueryValue value, bool deserialize) {
+      if (value is QueryBlobValue) {
+        if (deserialize) {
+          IItem item = null;
+          using (MemoryStream stream = new MemoryStream(((QueryBlobValue)value).Value)) {
+            try {
+              item = XmlParser.Deserialize<IItem>(stream);
+            }
+            catch (Exception) { }
+            stream.Close();
+          }
+          return item != null ? item : new StringValue(((QueryBlobValue)value).DataTypeName);
+        } else {
+          return new StringValue(((QueryBlobValue)value).DataTypeName);
+        }
+      } else if (value is QueryBoolValue) {
+        return new BoolValue(((QueryBoolValue)value).Value);
+      } else if (value is QueryFloatValue) {
+        return new DoubleValue(((QueryFloatValue)value).Value);
+      } else if (value is QueryIntValue) {
+        return new IntValue((int)((QueryIntValue)value).Value);
+      } else if (value is QueryStringValue) {
+        return new StringValue(((QueryStringValue)value).Value);
+      }
+      return null;
     }
   }
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/DBTests.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/DBTests.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/DBTests.cs	(revision 5304)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using System.Data.Linq;
 using System.Linq;
@@ -99,4 +100,88 @@
 
     [TestMethod]
+    public void FetchRunsTest() {
+      long[] ids;
+      using (OKBDataContext okb = new OKBDataContext()) {
+        ids = okb.Runs.Skip(100).Take(50).Select(x => x.Id).ToArray();
+      }
+
+      QueryService qs = new QueryService();
+      qs.GetQueryResults(ids);
+    }
+
+    [TestMethod]
+    public void GetFiltersTest() {
+      List<DataTransfer.Filter> filters = new List<DataTransfer.Filter>();
+      using (OKBDataContext okb = new OKBDataContext()) {
+        // run filters
+        filters.Add(new DataTransfer.OrdinalComparisonLongFilter(typeof(RunRandomSeedFilter).AssemblyQualifiedName, "Run Random Seed"));
+        filters.Add(new DataTransfer.OrdinalComparisonDateTimeFilter(typeof(RunCreatedDateFilter).AssemblyQualifiedName, "Run Created Date"));
+        filters.Add(new DataTransfer.SetComparisonStringFilter(typeof(RunUserNameFilter).AssemblyQualifiedName, "Run User Name"));
+        filters.Add(new DataTransfer.SetComparisonStringFilter(typeof(RunClientNameFilter).AssemblyQualifiedName, "Run Client Name"));
+
+        // result filters
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ResultNameFilter).AssemblyQualifiedName, "Result Name", okb.Results.Select(x => x.Name).Distinct().ToArray()));
+        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameSetComparisonStringAvailableValuesFilter(typeof(ResultBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value Data Type Name", entity.Name, okb.ResultBlobValues.Where(x => x.Result.Name == entity.Name).Select(x => x.DataType.Name).Distinct().ToArray()));
+        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameEqualityComparisonByteArrayFilter(typeof(ResultBlobValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
+        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "bit").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameEqualityComparisonBoolFilter(typeof(ResultBoolValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
+        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "float").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameOrdinalComparisonDoubleFilter(typeof(ResultFloatValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
+        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "bigint").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameOrdinalComparisonLongFilter(typeof(ResultIntValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
+        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "nvarchar").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameSetComparisonStringFilter(typeof(ResultStringValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
+
+        // algorithm parameter filters
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterNameFilter).AssemblyQualifiedName, "Algorithm Parameter Name", okb.AlgorithmParameters.Select(x => x.Name).Distinct().ToArray()));
+        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameSetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value Data Type Name", entity.Name, okb.AlgorithmParameterBlobValues.Where(x => x.AlgorithmParameter.Name == entity.Name).Select(x => x.DataType.Name).Distinct().ToArray()));
+        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameEqualityComparisonByteArrayFilter(typeof(AlgorithmParameterBlobValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
+        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bit").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameEqualityComparisonBoolFilter(typeof(AlgorithmParameterBoolValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
+        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "float").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameOrdinalComparisonDoubleFilter(typeof(AlgorithmParameterFloatValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
+        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bigint").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameOrdinalComparisonLongFilter(typeof(AlgorithmParameterIntValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
+        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "nvarchar").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameSetComparisonStringFilter(typeof(AlgorithmParameterStringValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
+
+        // algorithm filters
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmNameFilter).AssemblyQualifiedName, "Algorithm Name", okb.Algorithms.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmClassNameFilter).AssemblyQualifiedName, "Algorithm Class Name", okb.AlgorithmClasses.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmPlatformNameFilter).AssemblyQualifiedName, "Algorithm Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmDataDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Data Type Name", okb.Algorithms.Select(x => x.AlgorithmData.DataType.Name).Distinct().ToArray()));
+
+        // problem parameter filters
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemParameterNameFilter).AssemblyQualifiedName, "Problem Parameter Name", okb.ProblemParameters.Select(x => x.Name).Distinct().ToArray()));
+        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameSetComparisonStringAvailableValuesFilter(typeof(ProblemParameterBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value Data Type Name", entity.Name, okb.ProblemParameterBlobValues.Where(x => x.ProblemParameter.Name == entity.Name).Select(x => x.DataType.Name).Distinct().ToArray()));
+        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameEqualityComparisonByteArrayFilter(typeof(ProblemParameterBlobValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
+        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bit").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameEqualityComparisonBoolFilter(typeof(ProblemParameterBoolValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
+        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "float").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameOrdinalComparisonDoubleFilter(typeof(ProblemParameterFloatValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
+        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bigint").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameOrdinalComparisonLongFilter(typeof(ProblemParameterIntValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
+        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "nvarchar").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
+          filters.Add(new DataTransfer.NameSetComparisonStringFilter(typeof(ProblemParameterStringValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
+
+        // problem filters
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemNameFilter).AssemblyQualifiedName, "Problem Name", okb.Problems.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemClassNameFilter).AssemblyQualifiedName, "Problem Class Name", okb.ProblemClasses.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemPlatformNameFilter).AssemblyQualifiedName, "Problem Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemDataDataTypeNameFilter).AssemblyQualifiedName, "Problem Data Type Name", okb.Problems.Select(x => x.ProblemData.DataType.Name).Distinct().ToArray()));
+
+        // and/or filters
+        filters.Add(new DataTransfer.CombinedFilter(typeof(AndFilter).AssemblyQualifiedName, "And", DataTransfer.BooleanOperation.And));
+        filters.Add(new DataTransfer.CombinedFilter(typeof(OrFilter).AssemblyQualifiedName, "Or", DataTransfer.BooleanOperation.Or));
+      }
+    }
+
+    [TestMethod]
     public void ClearDB() {
       using (OKBDataContext okb = new OKBDataContext()) {
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/HeuristicLab.Services.OKB.DataAccess-3.3.Tests.csproj
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/HeuristicLab.Services.OKB.DataAccess-3.3.Tests.csproj	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/Tests/HeuristicLab.Services.OKB.DataAccess-3.3.Tests.csproj	(revision 5304)
@@ -51,4 +51,16 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\..\HeuristicLab.Clients.OKB\3.3\HeuristicLab.Clients.OKB-3.3.csproj">
+      <Project>{73857A9C-9706-4B72-8D9C-210B5B6A5691}</Project>
+      <Name>HeuristicLab.Clients.OKB-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Services.OKB.DataTransfer\3.3\HeuristicLab.Services.OKB.DataTransfer-3.3.csproj">
+      <Project>{209FD7A1-DFB2-4B9F-9268-B95E886B2F7A}</Project>
+      <Name>HeuristicLab.Services.OKB.DataTransfer-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Services.OKB\3.3\HeuristicLab.Services.OKB-3.3.csproj">
+      <Project>{766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}</Project>
+      <Name>HeuristicLab.Services.OKB-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Services.OKB.DataAccess-3.3.csproj">
       <Project>{E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}</Project>
Index: anches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/AndFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/AndFilter.cs	(revision 5303)
+++ 	(revision )
@@ -1,35 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Runtime.Serialization;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace HeuristicLab.Services.OKB.DataTransfer {
-  [DataContract]
-  public class AndFilter : CombinedFilter {
-    public AndFilter(string filterTypeName, string label) {
-      FilterTypeName = filterTypeName;
-      Label = label;
-      Filters = Enumerable.Empty<Filter>();
-    }
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/BooleanOperation.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/BooleanOperation.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/BooleanOperation.cs	(revision 5304)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public enum BooleanOperation {
+    [EnumMember]
+    And,
+    [EnumMember]
+    Or
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/CombinedFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/CombinedFilter.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/CombinedFilter.cs	(revision 5304)
@@ -21,11 +21,21 @@
 
 using System.Collections.Generic;
+using System.Linq;
 using System.Runtime.Serialization;
 
 namespace HeuristicLab.Services.OKB.DataTransfer {
   [DataContract]
-  public abstract class CombinedFilter : Filter {
+  public class CombinedFilter : Filter {
+    [DataMember]
+    public BooleanOperation Operation { get; protected set; }
     [DataMember]
     public IEnumerable<Filter> Filters { get; set; }
+
+    public CombinedFilter(string filterTypeName, string label, BooleanOperation operation) {
+      FilterTypeName = filterTypeName;
+      Label = label;
+      Operation = operation;
+      Filters = Enumerable.Empty<Filter>();
+    }
   }
 }
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/Filter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/Filter.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/Filter.cs	(revision 5304)
@@ -34,6 +34,5 @@
   [KnownType(typeof(NameSetComparisonStringFilter))]
   [KnownType(typeof(NameSetComparisonStringAvailableValuesFilter))]
-  [KnownType(typeof(AndFilter))]
-  [KnownType(typeof(OrFilter))]
+  [KnownType(typeof(CombinedFilter))]
   public abstract class Filter {
     [DataMember]
Index: anches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/OrFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/Filters/OrFilter.cs	(revision 5303)
+++ 	(revision )
@@ -1,34 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Runtime.Serialization;
-using System.Linq;
-
-namespace HeuristicLab.Services.OKB.DataTransfer {
-  [DataContract]
-  public class OrFilter : CombinedFilter {
-    public OrFilter(string filterTypeName, string label) {
-      FilterTypeName = filterTypeName;
-      Label = label;
-      Filters = Enumerable.Empty<Filter>();
-    }
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/HeuristicLab.Services.OKB.DataTransfer-3.3.csproj
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/HeuristicLab.Services.OKB.DataTransfer-3.3.csproj	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/HeuristicLab.Services.OKB.DataTransfer-3.3.csproj	(revision 5304)
@@ -58,9 +58,15 @@
     <Compile Include="AlgorithmParameterIntValue.cs" />
     <Compile Include="AlgorithmParameterStringValue.cs" />
+    <Compile Include="Filters\BooleanOperation.cs" />
+    <Compile Include="QueryBoolValue.cs" />
+    <Compile Include="QueryBlobValue.cs" />
+    <Compile Include="QueryFloatValue.cs" />
+    <Compile Include="QueryIntValue.cs" />
+    <Compile Include="QueryStringValue.cs" />
+    <Compile Include="QueryValue.cs" />
+    <Compile Include="QueryResult.cs" />
     <Compile Include="Filters\CombinedFilter.cs" />
-    <Compile Include="Filters\AndFilter.cs" />
     <Compile Include="Filters\NameSetComparisonStringAvailableValuesFilter.cs" />
     <Compile Include="Filters\SetComparisonStringAvailableValuesFilter.cs" />
-    <Compile Include="Filters\OrFilter.cs" />
     <Compile Include="Filters\OrdinalComparisonFilter.cs" />
     <Compile Include="Filters\SetComparisonFilter.cs" />
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryBlobValue.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryBlobValue.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryBlobValue.cs	(revision 5304)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public class QueryBlobValue : QueryValue {
+    [DataMember]
+    public string DataTypeName { get; set; }
+    [DataMember]
+    public byte[] Value { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryBoolValue.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryBoolValue.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryBoolValue.cs	(revision 5304)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public class QueryBoolValue : QueryValue {
+    [DataMember]
+    public bool Value { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryFloatValue.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryFloatValue.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryFloatValue.cs	(revision 5304)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public class QueryFloatValue : QueryValue {
+    [DataMember]
+    public double Value { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryIntValue.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryIntValue.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryIntValue.cs	(revision 5304)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public class QueryIntValue : QueryValue {
+    [DataMember]
+    public long Value { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryResult.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryResult.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryResult.cs	(revision 5304)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public class QueryResult {
+    [DataMember]
+    public long Id { get; set; }
+    [DataMember]
+    public IEnumerable<QueryValue> AlgorithmParameters { get; set; }
+    [DataMember]
+    public IEnumerable<QueryValue> ProblemParameters { get; set; }
+    [DataMember]
+    public IEnumerable<QueryValue> Results { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryStringValue.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryStringValue.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryStringValue.cs	(revision 5304)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  public class QueryStringValue : QueryValue {
+    [DataMember]
+    public string Value { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryValue.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryValue.cs	(revision 5304)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataTransfer/3.3/QueryValue.cs	(revision 5304)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.OKB.DataTransfer {
+  [DataContract]
+  [KnownType(typeof(QueryBlobValue))]
+  [KnownType(typeof(QueryBoolValue))]
+  [KnownType(typeof(QueryFloatValue))]
+  [KnownType(typeof(QueryIntValue))]
+  [KnownType(typeof(QueryStringValue))]
+  public abstract class QueryValue {
+    [DataMember]
+    public string Name { get; set; }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Filters/AndFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Filters/AndFilter.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Filters/AndFilter.cs	(revision 5304)
@@ -43,5 +43,5 @@
       Filters = new List<IFilter>(filters);
     }
-    public AndFilter(DataTransfer.AndFilter filter) {
+    public AndFilter(DataTransfer.CombinedFilter filter) {
       Filters = new List<IFilter>(filter.Filters.Select(x => (IFilter)Activator.CreateInstance(Type.GetType(x.FilterTypeName), x)));
     }
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Filters/OrFilter.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Filters/OrFilter.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Filters/OrFilter.cs	(revision 5304)
@@ -43,5 +43,5 @@
       Filters = new List<IFilter>(filters);
     }
-    public OrFilter(DataTransfer.OrFilter filter) {
+    public OrFilter(DataTransfer.CombinedFilter filter) {
       Filters = new List<IFilter>(filter.Filters.Select(x => (IFilter)Activator.CreateInstance(Type.GetType(x.FilterTypeName), x)));
     }
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Interfaces/IQueryService.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Interfaces/IQueryService.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Interfaces/IQueryService.cs	(revision 5304)
@@ -35,8 +35,11 @@
 
     [OperationContract]
-    long QueryNumberOfRuns(Filter filter);
+    long GetNumberOfQueryResults(Filter filter);
 
     [OperationContract]
-    IEnumerable<Run> QueryRuns(Filter filter);
+    IEnumerable<long> GetQueryResultIds(Filter filter);
+
+    [OperationContract]
+    IEnumerable<QueryResult> GetQueryResults(IEnumerable<long> ids);
   }
 }
Index: /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/QueryService.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/QueryService.cs	(revision 5303)
+++ /branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/QueryService.cs	(revision 5304)
@@ -26,4 +26,5 @@
 using System.ServiceModel;
 using HeuristicLab.Services.OKB.DataAccess;
+using HeuristicLab.Services.OKB.DataTransfer;
 
 namespace HeuristicLab.Services.OKB {
@@ -33,168 +34,189 @@
   [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
   public class QueryService : IQueryService {
-    public IEnumerable<DataTransfer.Filter> GetFilters() {
-      List<DataTransfer.Filter> filters = new List<DataTransfer.Filter>();
-      using (OKBDataContext okb = new OKBDataContext()) {
-        //DataLoadOptions dlo = new DataLoadOptions();
-        //dlo.LoadWith<Algorithm>(x => x.AlgorithmData);
-        //dlo.LoadWith<AlgorithmData>(x => x.DataType);
-        //dlo.LoadWith<Problem>(x => x.ProblemData);
-        //dlo.LoadWith<ProblemData>(x => x.DataType);
-        //dlo.LoadWith<AlgorithmParameter>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameter>(x => x.DataType);
-        //dlo.LoadWith<Result>(x => x.DataType);
-        //okb.LoadOptions = dlo;
-
+    public IEnumerable<Filter> GetFilters() {
+      List<Filter> filters = new List<Filter>();
+      using (OKBDataContext okb = new OKBDataContext()) {
         // run filters
-        filters.Add(new DataTransfer.OrdinalComparisonLongFilter(typeof(RunRandomSeedFilter).AssemblyQualifiedName, "Run Random Seed"));
-        filters.Add(new DataTransfer.OrdinalComparisonDateTimeFilter(typeof(RunCreatedDateFilter).AssemblyQualifiedName, "Run Created Date"));
-        filters.Add(new DataTransfer.SetComparisonStringFilter(typeof(RunUserNameFilter).AssemblyQualifiedName, "Run User Name"));
-        filters.Add(new DataTransfer.SetComparisonStringFilter(typeof(RunClientNameFilter).AssemblyQualifiedName, "Run Client Name"));
+        filters.Add(new OrdinalComparisonLongFilter(typeof(RunRandomSeedFilter).AssemblyQualifiedName, "Run Random Seed"));
+        filters.Add(new OrdinalComparisonDateTimeFilter(typeof(RunCreatedDateFilter).AssemblyQualifiedName, "Run Created Date"));
+        filters.Add(new SetComparisonStringFilter(typeof(RunUserNameFilter).AssemblyQualifiedName, "Run User Name"));
+        filters.Add(new SetComparisonStringFilter(typeof(RunClientNameFilter).AssemblyQualifiedName, "Run Client Name"));
 
         // result filters
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ResultNameFilter).AssemblyQualifiedName, "Result Name", okb.Results.Select(x => x.Name).Distinct().ToArray()));
-        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameSetComparisonStringAvailableValuesFilter(typeof(ResultBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value Data Type Name", entity.Name, okb.ResultBlobValues.Where(x => x.Result.Name == entity.Name).Select(x => x.DataType.Name).Distinct().ToArray()));
-        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameEqualityComparisonByteArrayFilter(typeof(ResultBlobValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
-        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "bit").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameEqualityComparisonBoolFilter(typeof(ResultBoolValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
-        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "float").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameOrdinalComparisonDoubleFilter(typeof(ResultFloatValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
-        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "bigint").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameOrdinalComparisonLongFilter(typeof(ResultIntValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
-        foreach (Result entity in okb.Results.Where(x => x.DataType.SqlName == "nvarchar").AsEnumerable().Distinct<Result>(new GenericEqualityComparer<Result>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameSetComparisonStringFilter(typeof(ResultStringValueValueFilter).AssemblyQualifiedName, "Result " + entity.Name + " Value", entity.Name));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ResultNameFilter).AssemblyQualifiedName, "Result Name", okb.Results.Select(x => x.Name).Distinct().ToArray()));
+        foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct())
+          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()));
+        foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct())
+          filters.Add(new NameEqualityComparisonByteArrayFilter(typeof(ResultBlobValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name));
+        foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "bit").Select(x => x.Name).Distinct())
+          filters.Add(new NameEqualityComparisonBoolFilter(typeof(ResultBoolValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name));
+        foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "float").Select(x => x.Name).Distinct())
+          filters.Add(new NameOrdinalComparisonDoubleFilter(typeof(ResultFloatValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name));
+        foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "bigint").Select(x => x.Name).Distinct())
+          filters.Add(new NameOrdinalComparisonLongFilter(typeof(ResultIntValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name));
+        foreach (string name in okb.Results.Where(x => x.DataType.SqlName == "nvarchar").Select(x => x.Name).Distinct())
+          filters.Add(new NameSetComparisonStringFilter(typeof(ResultStringValueValueFilter).AssemblyQualifiedName, "Result " + name + " Value", name));
 
         // algorithm parameter filters
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterNameFilter).AssemblyQualifiedName, "Algorithm Parameter Name", okb.AlgorithmParameters.Select(x => x.Name).Distinct().ToArray()));
-        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameSetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value Data Type Name", entity.Name, okb.AlgorithmParameterBlobValues.Where(x => x.AlgorithmParameter.Name == entity.Name).Select(x => x.DataType.Name).Distinct().ToArray()));
-        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameEqualityComparisonByteArrayFilter(typeof(AlgorithmParameterBlobValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
-        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bit").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameEqualityComparisonBoolFilter(typeof(AlgorithmParameterBoolValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
-        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "float").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameOrdinalComparisonDoubleFilter(typeof(AlgorithmParameterFloatValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
-        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bigint").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameOrdinalComparisonLongFilter(typeof(AlgorithmParameterIntValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
-        foreach (AlgorithmParameter entity in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "nvarchar").AsEnumerable().Distinct<AlgorithmParameter>(new GenericEqualityComparer<AlgorithmParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameSetComparisonStringFilter(typeof(AlgorithmParameterStringValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + entity.Name + " Value", entity.Name));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmParameterNameFilter).AssemblyQualifiedName, "Algorithm Parameter Name", okb.AlgorithmParameters.Select(x => x.Name).Distinct().ToArray()));
+        foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct())
+          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()));
+        foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct())
+          filters.Add(new NameEqualityComparisonByteArrayFilter(typeof(AlgorithmParameterBlobValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name));
+        foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bit").Select(x => x.Name).Distinct())
+          filters.Add(new NameEqualityComparisonBoolFilter(typeof(AlgorithmParameterBoolValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name));
+        foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "float").Select(x => x.Name).Distinct())
+          filters.Add(new NameOrdinalComparisonDoubleFilter(typeof(AlgorithmParameterFloatValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name));
+        foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "bigint").Select(x => x.Name).Distinct())
+          filters.Add(new NameOrdinalComparisonLongFilter(typeof(AlgorithmParameterIntValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name));
+        foreach (string name in okb.AlgorithmParameters.Where(x => x.DataType.SqlName == "nvarchar").Select(x => x.Name).Distinct())
+          filters.Add(new NameSetComparisonStringFilter(typeof(AlgorithmParameterStringValueValueFilter).AssemblyQualifiedName, "Algorithm Parameter " + name + " Value", name));
 
         // algorithm filters
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmNameFilter).AssemblyQualifiedName, "Algorithm Name", okb.Algorithms.Select(x => x.Name).Distinct().ToArray()));
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmClassNameFilter).AssemblyQualifiedName, "Algorithm Class Name", okb.AlgorithmClasses.Select(x => x.Name).Distinct().ToArray()));
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmPlatformNameFilter).AssemblyQualifiedName, "Algorithm Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray()));
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(AlgorithmDataDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Data Type Name", okb.Algorithms.Select(x => x.AlgorithmData.DataType.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmNameFilter).AssemblyQualifiedName, "Algorithm Name", okb.Algorithms.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmClassNameFilter).AssemblyQualifiedName, "Algorithm Class Name", okb.AlgorithmClasses.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmPlatformNameFilter).AssemblyQualifiedName, "Algorithm Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(AlgorithmDataDataTypeNameFilter).AssemblyQualifiedName, "Algorithm Data Type Name", okb.Algorithms.Select(x => x.AlgorithmData.DataType.Name).Distinct().ToArray()));
 
         // problem parameter filters
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemParameterNameFilter).AssemblyQualifiedName, "Problem Parameter Name", okb.ProblemParameters.Select(x => x.Name).Distinct().ToArray()));
-        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameSetComparisonStringAvailableValuesFilter(typeof(ProblemParameterBlobValueDataTypeNameFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value Data Type Name", entity.Name, okb.ProblemParameterBlobValues.Where(x => x.ProblemParameter.Name == entity.Name).Select(x => x.DataType.Name).Distinct().ToArray()));
-        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameEqualityComparisonByteArrayFilter(typeof(ProblemParameterBlobValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
-        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bit").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameEqualityComparisonBoolFilter(typeof(ProblemParameterBoolValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
-        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "float").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameOrdinalComparisonDoubleFilter(typeof(ProblemParameterFloatValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
-        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bigint").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameOrdinalComparisonLongFilter(typeof(ProblemParameterIntValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
-        foreach (ProblemParameter entity in okb.ProblemParameters.Where(x => x.DataType.SqlName == "nvarchar").AsEnumerable().Distinct<ProblemParameter>(new GenericEqualityComparer<ProblemParameter>((x, y) => x.Name == y.Name)))
-          filters.Add(new DataTransfer.NameSetComparisonStringFilter(typeof(ProblemParameterStringValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + entity.Name + " Value", entity.Name));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemParameterNameFilter).AssemblyQualifiedName, "Problem Parameter Name", okb.ProblemParameters.Select(x => x.Name).Distinct().ToArray()));
+        foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct())
+          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()));
+        foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "varbinary").Select(x => x.Name).Distinct())
+          filters.Add(new NameEqualityComparisonByteArrayFilter(typeof(ProblemParameterBlobValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name));
+        foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bit").Select(x => x.Name).Distinct())
+          filters.Add(new NameEqualityComparisonBoolFilter(typeof(ProblemParameterBoolValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name));
+        foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "float").Select(x => x.Name).Distinct())
+          filters.Add(new NameOrdinalComparisonDoubleFilter(typeof(ProblemParameterFloatValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name));
+        foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "bigint").Select(x => x.Name).Distinct())
+          filters.Add(new NameOrdinalComparisonLongFilter(typeof(ProblemParameterIntValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name));
+        foreach (string name in okb.ProblemParameters.Where(x => x.DataType.SqlName == "nvarchar").Select(x => x.Name).Distinct())
+          filters.Add(new NameSetComparisonStringFilter(typeof(ProblemParameterStringValueValueFilter).AssemblyQualifiedName, "Problem Parameter " + name + " Value", name));
 
         // problem filters
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemNameFilter).AssemblyQualifiedName, "Problem Name", okb.Problems.Select(x => x.Name).Distinct().ToArray()));
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemClassNameFilter).AssemblyQualifiedName, "Problem Class Name", okb.ProblemClasses.Select(x => x.Name).Distinct().ToArray()));
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemPlatformNameFilter).AssemblyQualifiedName, "Problem Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray()));
-        filters.Add(new DataTransfer.SetComparisonStringAvailableValuesFilter(typeof(ProblemDataDataTypeNameFilter).AssemblyQualifiedName, "Problem Data Type Name", okb.Problems.Select(x => x.ProblemData.DataType.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemNameFilter).AssemblyQualifiedName, "Problem Name", okb.Problems.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemClassNameFilter).AssemblyQualifiedName, "Problem Class Name", okb.ProblemClasses.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemPlatformNameFilter).AssemblyQualifiedName, "Problem Platform Name", okb.Platforms.Select(x => x.Name).Distinct().ToArray()));
+        filters.Add(new SetComparisonStringAvailableValuesFilter(typeof(ProblemDataDataTypeNameFilter).AssemblyQualifiedName, "Problem Data Type Name", okb.Problems.Select(x => x.ProblemData.DataType.Name).Distinct().ToArray()));
 
         // and/or filters
-        filters.Add(new DataTransfer.AndFilter(typeof(AndFilter).AssemblyQualifiedName, "And"));
-        filters.Add(new DataTransfer.OrFilter(typeof(OrFilter).AssemblyQualifiedName, "Or"));
+        filters.Add(new CombinedFilter(typeof(AndFilter).AssemblyQualifiedName, "AND", BooleanOperation.And));
+        filters.Add(new CombinedFilter(typeof(OrFilter).AssemblyQualifiedName, "OR", BooleanOperation.Or));
       }
       return filters.OrderBy(x => x.Label);
     }
-    public long QueryNumberOfRuns(DataTransfer.Filter filter) {
-      using (OKBDataContext okb = new OKBDataContext()) {
-        IFilter convertedFilter = (IFilter)Activator.CreateInstance(Type.GetType(filter.FilterTypeName), filter);
-        return okb.Runs.Where(convertedFilter.Expression).LongCount();
-      }
-    }
-    public IEnumerable<DataTransfer.Run> QueryRuns(DataTransfer.Filter filter) {
-      using (OKBDataContext okb = new OKBDataContext()) {
-        //DataLoadOptions dlo = new DataLoadOptions();
-        //dlo.LoadWith<Run>(x => x.ResultBlobValues);
-        //dlo.LoadWith<Run>(x => x.ResultBoolValues);
-        //dlo.LoadWith<Run>(x => x.ResultFloatValues);
-        //dlo.LoadWith<Run>(x => x.ResultIntValues);
-        //dlo.LoadWith<Run>(x => x.ResultStringValues);
-        //dlo.LoadWith<Run>(x => x.Experiment);
-        //dlo.LoadWith<ResultBlobValue>(x => x.Result);
-        //dlo.LoadWith<ResultBlobValue>(x => x.DataType);
-        //dlo.LoadWith<ResultBoolValue>(x => x.Result);
-        //dlo.LoadWith<ResultBoolValue>(x => x.DataType);
-        //dlo.LoadWith<ResultFloatValue>(x => x.Result);
-        //dlo.LoadWith<ResultFloatValue>(x => x.DataType);
-        //dlo.LoadWith<ResultIntValue>(x => x.Result);
-        //dlo.LoadWith<ResultIntValue>(x => x.DataType);
-        //dlo.LoadWith<ResultStringValue>(x => x.Result);
-        //dlo.LoadWith<ResultStringValue>(x => x.DataType);
-        //dlo.LoadWith<Result>(x => x.Algorithm);
-        //dlo.LoadWith<Result>(x => x.DataType);
-        //dlo.LoadWith<Experiment>(x => x.Algorithm);
-        //dlo.LoadWith<Experiment>(x => x.Problem);
-        //dlo.LoadWith<Experiment>(x => x.AlgorithmParameterBlobValues);
-        //dlo.LoadWith<Experiment>(x => x.AlgorithmParameterBoolValues);
-        //dlo.LoadWith<Experiment>(x => x.AlgorithmParameterFloatValues);
-        //dlo.LoadWith<Experiment>(x => x.AlgorithmParameterIntValues);
-        //dlo.LoadWith<Experiment>(x => x.AlgorithmParameterStringValues);
-        //dlo.LoadWith<Experiment>(x => x.ProblemParameterBlobValues);
-        //dlo.LoadWith<Experiment>(x => x.ProblemParameterBoolValues);
-        //dlo.LoadWith<Experiment>(x => x.ProblemParameterFloatValues);
-        //dlo.LoadWith<Experiment>(x => x.ProblemParameterIntValues);
-        //dlo.LoadWith<Experiment>(x => x.ProblemParameterStringValues);
-        //dlo.LoadWith<AlgorithmParameterBlobValue>(x => x.AlgorithmParameter);
-        //dlo.LoadWith<AlgorithmParameterBlobValue>(x => x.DataType);
-        //dlo.LoadWith<AlgorithmParameterBoolValue>(x => x.AlgorithmParameter);
-        //dlo.LoadWith<AlgorithmParameterBoolValue>(x => x.DataType);
-        //dlo.LoadWith<AlgorithmParameterFloatValue>(x => x.AlgorithmParameter);
-        //dlo.LoadWith<AlgorithmParameterFloatValue>(x => x.DataType);
-        //dlo.LoadWith<AlgorithmParameterIntValue>(x => x.AlgorithmParameter);
-        //dlo.LoadWith<AlgorithmParameterIntValue>(x => x.DataType);
-        //dlo.LoadWith<AlgorithmParameterStringValue>(x => x.AlgorithmParameter);
-        //dlo.LoadWith<AlgorithmParameterStringValue>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameterBlobValue>(x => x.ProblemParameter);
-        //dlo.LoadWith<ProblemParameterBlobValue>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameterBoolValue>(x => x.ProblemParameter);
-        //dlo.LoadWith<ProblemParameterBoolValue>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameterFloatValue>(x => x.ProblemParameter);
-        //dlo.LoadWith<ProblemParameterFloatValue>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameterIntValue>(x => x.ProblemParameter);
-        //dlo.LoadWith<ProblemParameterIntValue>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameterStringValue>(x => x.ProblemParameter);
-        //dlo.LoadWith<ProblemParameterStringValue>(x => x.DataType);
-        //dlo.LoadWith<AlgorithmParameter>(x => x.Algorithm);
-        //dlo.LoadWith<AlgorithmParameter>(x => x.DataType);
-        //dlo.LoadWith<ProblemParameter>(x => x.Problem);
-        //dlo.LoadWith<ProblemParameter>(x => x.DataType);
-        //dlo.LoadWith<Algorithm>(x => x.AlgorithmClass);
-        //dlo.LoadWith<Algorithm>(x => x.Platform);
-        //dlo.LoadWith<Problem>(x => x.ProblemClass);
-        //dlo.LoadWith<Problem>(x => x.Platform);
-        //okb.LoadOptions = dlo;
-
+
+    public long GetNumberOfQueryResults(Filter filter) {
+      using (OKBDataContext okb = new OKBDataContext()) {
+        return FilterRuns(okb.Runs, filter).LongCount();
+      }
+    }
+
+    public IEnumerable<long> GetQueryResultIds(Filter filter) {
+      using (OKBDataContext okb = new OKBDataContext()) {
+        return FilterRuns(okb.Runs, filter).Select(x => x.Id).ToArray();
+      }
+    }
+
+    public IEnumerable<QueryResult> GetQueryResults(IEnumerable<long> ids) {
+      using (OKBDataContext okb = new OKBDataContext()) {
         DataLoadOptions dlo = new DataLoadOptions();
-        dlo.LoadWith<Run>(x => x.ResultBlobValues);
-        dlo.LoadWith<Run>(x => x.ResultBoolValues);
-        dlo.LoadWith<Run>(x => x.ResultFloatValues);
-        dlo.LoadWith<Run>(x => x.ResultIntValues);
-        dlo.LoadWith<Run>(x => x.ResultStringValues);
+        dlo.LoadWith<DataAccess.Run>(x => x.ResultBlobValues);
+        dlo.LoadWith<DataAccess.Run>(x => x.ResultBoolValues);
+        dlo.LoadWith<DataAccess.Run>(x => x.ResultFloatValues);
+        dlo.LoadWith<DataAccess.Run>(x => x.ResultIntValues);
+        dlo.LoadWith<DataAccess.Run>(x => x.ResultStringValues);
+        dlo.LoadWith<DataAccess.Run>(x => x.Experiment);
+        dlo.LoadWith<DataAccess.ResultBlobValue>(x => x.Result);
+        dlo.LoadWith<DataAccess.ResultBlobValue>(x => x.DataType);
+        dlo.LoadWith<DataAccess.ResultBoolValue>(x => x.Result);
+        dlo.LoadWith<DataAccess.ResultFloatValue>(x => x.Result);
+        dlo.LoadWith<DataAccess.ResultIntValue>(x => x.Result);
+        dlo.LoadWith<DataAccess.ResultStringValue>(x => x.Result);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterBlobValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterBoolValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterFloatValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterIntValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.AlgorithmParameterStringValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterBlobValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterBoolValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterFloatValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterIntValues);
+        dlo.LoadWith<DataAccess.Experiment>(x => x.ProblemParameterStringValues);
+        //dlo.LoadWith<DataAccess.Experiment>(x => x.Algorithm);
+        //dlo.LoadWith<DataAccess.Experiment>(x => x.Problem);
+        dlo.LoadWith<DataAccess.AlgorithmParameterBlobValue>(x => x.AlgorithmParameter);
+        dlo.LoadWith<DataAccess.AlgorithmParameterBlobValue>(x => x.DataType);
+        dlo.LoadWith<DataAccess.AlgorithmParameterBoolValue>(x => x.AlgorithmParameter);
+        dlo.LoadWith<DataAccess.AlgorithmParameterFloatValue>(x => x.AlgorithmParameter);
+        dlo.LoadWith<DataAccess.AlgorithmParameterIntValue>(x => x.AlgorithmParameter);
+        dlo.LoadWith<DataAccess.AlgorithmParameterStringValue>(x => x.AlgorithmParameter);
+        dlo.LoadWith<DataAccess.ProblemParameterBlobValue>(x => x.ProblemParameter);
+        dlo.LoadWith<DataAccess.ProblemParameterBlobValue>(x => x.DataType);
+        dlo.LoadWith<DataAccess.ProblemParameterBoolValue>(x => x.ProblemParameter);
+        dlo.LoadWith<DataAccess.ProblemParameterFloatValue>(x => x.ProblemParameter);
+        dlo.LoadWith<DataAccess.ProblemParameterIntValue>(x => x.ProblemParameter);
+        dlo.LoadWith<DataAccess.ProblemParameterStringValue>(x => x.ProblemParameter);
+        //dlo.LoadWith<DataAccess.Algorithm>(x => x.AlgorithmParameters);
+        //dlo.LoadWith<DataAccess.Algorithm>(x => x.Results);
+        //dlo.LoadWith<DataAccess.Algorithm>(x => x.AlgorithmClass);
+        //dlo.LoadWith<DataAccess.Algorithm>(x => x.Platform);
+        //dlo.LoadWith<DataAccess.Problem>(x => x.ProblemParameters);
+        //dlo.LoadWith<DataAccess.Problem>(x => x.ProblemClass);
         okb.LoadOptions = dlo;
 
-        IFilter convertedFilter = (IFilter)Activator.CreateInstance(Type.GetType(filter.FilterTypeName), filter);
-        var runs = okb.Runs.Where(convertedFilter.Expression).ToArray();
-        var result = runs.Select(x => Convert.ToDto(x)).ToArray();
-        return result;
-      }
+        return okb.Runs.Where(x => ids.Contains(x.Id)).Select(x => ConvertToQueryResult(x)).ToArray();
+      }
+    }
+
+    private IQueryable<DataAccess.Run> FilterRuns(IQueryable<DataAccess.Run> runs, Filter filter) {
+      IFilter f = (IFilter)Activator.CreateInstance(Type.GetType(filter.FilterTypeName), filter);
+      return runs.Where(f.Expression);
+    }
+
+    private QueryResult ConvertToQueryResult(DataAccess.Run run) {
+      List<QueryValue> algorithmParameters = new List<QueryValue>();
+      List<QueryValue> problemParameters = new List<QueryValue>();
+      List<QueryValue> results = new List<QueryValue>();
+
+      foreach (DataAccess.AlgorithmParameterBlobValue value in run.Experiment.AlgorithmParameterBlobValues)
+        algorithmParameters.Add(new QueryBlobValue { Name = value.AlgorithmParameter.Name, DataTypeName = value.DataType.Name + " (" + value.DataType.TypeName + ")", Value = value.Value.ToArray() });
+      foreach (DataAccess.AlgorithmParameterBoolValue value in run.Experiment.AlgorithmParameterBoolValues)
+        algorithmParameters.Add(new QueryBoolValue { Name = value.AlgorithmParameter.Name, Value = value.Value });
+      foreach (DataAccess.AlgorithmParameterFloatValue value in run.Experiment.AlgorithmParameterFloatValues)
+        algorithmParameters.Add(new QueryFloatValue { Name = value.AlgorithmParameter.Name, Value = value.Value });
+      foreach (DataAccess.AlgorithmParameterIntValue value in run.Experiment.AlgorithmParameterIntValues)
+        algorithmParameters.Add(new QueryIntValue { Name = value.AlgorithmParameter.Name, Value = value.Value });
+      foreach (DataAccess.AlgorithmParameterStringValue value in run.Experiment.AlgorithmParameterStringValues)
+        algorithmParameters.Add(new QueryStringValue { Name = value.AlgorithmParameter.Name, Value = value.Value });
+
+      foreach (DataAccess.ProblemParameterBlobValue value in run.Experiment.ProblemParameterBlobValues)
+        problemParameters.Add(new QueryBlobValue { Name = value.ProblemParameter.Name, DataTypeName = value.DataType.Name + " (" + value.DataType.TypeName + ")", Value = value.Value.ToArray() });
+      foreach (DataAccess.ProblemParameterBoolValue value in run.Experiment.ProblemParameterBoolValues)
+        problemParameters.Add(new QueryBoolValue { Name = value.ProblemParameter.Name, Value = value.Value });
+      foreach (DataAccess.ProblemParameterFloatValue value in run.Experiment.ProblemParameterFloatValues)
+        problemParameters.Add(new QueryFloatValue { Name = value.ProblemParameter.Name, Value = value.Value });
+      foreach (DataAccess.ProblemParameterIntValue value in run.Experiment.ProblemParameterIntValues)
+        problemParameters.Add(new QueryIntValue { Name = value.ProblemParameter.Name, Value = value.Value });
+      foreach (DataAccess.ProblemParameterStringValue value in run.Experiment.ProblemParameterStringValues)
+        problemParameters.Add(new QueryStringValue { Name = value.ProblemParameter.Name, Value = value.Value });
+
+      foreach (DataAccess.ResultBlobValue value in run.ResultBlobValues)
+        results.Add(new QueryBlobValue { Name = value.Result.Name, DataTypeName = value.DataType.Name + " (" + value.DataType.TypeName + ")", Value = value.Value.ToArray() });
+      foreach (DataAccess.ResultBoolValue value in run.ResultBoolValues)
+        results.Add(new QueryBoolValue { Name = value.Result.Name, Value = value.Value });
+      foreach (DataAccess.ResultFloatValue value in run.ResultFloatValues)
+        results.Add(new QueryFloatValue { Name = value.Result.Name, Value = value.Value });
+      foreach (DataAccess.ResultIntValue value in run.ResultIntValues)
+        results.Add(new QueryIntValue { Name = value.Result.Name, Value = value.Value });
+      foreach (DataAccess.ResultStringValue value in run.ResultStringValues)
+        results.Add(new QueryStringValue { Name = value.Result.Name, Value = value.Value });
+
+      QueryResult result = new QueryResult();
+      result.Id = run.Id;
+      result.AlgorithmParameters = algorithmParameters;
+      result.ProblemParameters = problemParameters;
+      result.Results = results;
+      return result;
     }
   }
