Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.OKB/3.3/Interfaces/IQueryService.cs @ 4279

Last change on this file since 4279 was 4279, checked in by swagner, 14 years ago

Integrated OKB services (#1166)

File size: 2.9 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System.Data;
23using System.Net.Security;
24using System.ServiceModel;
25
26namespace HeuristicLab.Services.OKB {
27
28  /// <summary>
29  /// Service interface for downloading selected information about <see cref="Experiment"/> <see cref="Run"/>s.
30  /// </summary>
31  [ServiceContract(SessionMode = SessionMode.Required, ProtectionLevel = ProtectionLevel.EncryptAndSign)]
32  public interface IQueryService {
33
34    /// <summary>
35    /// Gets a list of all possible attribute selectors.
36    /// </summary>
37    /// <returns>An array of <see cref="Server.AttributeSelector"/>s</returns>
38    [OperationContract(IsInitiating = true, IsTerminating = true)]
39    AttributeSelector[] GetAllAttributeSelectors();
40
41    /// <summary>
42    /// Prepares the a query using the specified selection criteria.
43    /// </summary>
44    /// <param name="selectors">The list of <see cref="Server.AttributeSelector"/>s.</param>
45    /// <returns>An empty <see cref="DataTable"/> containing only the column headers.</returns>
46    [OperationContract(IsInitiating = true, IsTerminating = false)]
47    DataTable PrepareQuery(AttributeSelector[] selectors);
48
49    /// <summary>
50    /// Gets the number of matching rows for the prepared query
51    /// (see <see cref="IQueryService.PrepareQuery"/>).
52    /// </summary>
53    /// <returns>The number of matching rows.</returns>
54    [OperationContract(IsInitiating = false, IsTerminating = false)]
55    int GetCount();
56
57    /// <summary>
58    /// Fetches the next <paramref name="nRows"/> rows for the
59    /// prepared query (see <see cref="IQueryService.PrepareQuery"/>).
60    /// </summary>
61    /// <param name="nRows">The maximum number of rows to return.</param>
62    /// <returns>A <see cref="DataTable"/> containing only the next
63    /// <paramref name="nRows"/> rows.</returns>
64    [OperationContract(IsInitiating = false, IsTerminating = false)]
65    DataTable GetNextRows(int nRows);
66
67    /// <summary>
68    /// Terminates the session and closes the connection.
69    /// </summary>
70    [OperationContract(IsInitiating = false, IsTerminating = true)]
71    void Terminate();
72  }
73}
Note: See TracBrowser for help on using the repository browser.