Free cookie consent management tool by TermsFeed Policy Generator

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

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

Worked on OKB data model and services (#1174).

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  /// <summary>
28  /// Service interface for downloading selected information about <see cref="Experiment"/> <see cref="Run"/>s.
29  /// </summary>
30  [ServiceContract(SessionMode = SessionMode.Required, ProtectionLevel = ProtectionLevel.EncryptAndSign)]
31  public interface IQueryService {
32    /// <summary>
33    /// Gets a list of all possible attribute selectors.
34    /// </summary>
35    /// <returns>An array of <see cref="Server.AttributeSelector"/>s</returns>
36    [OperationContract(IsInitiating = true, IsTerminating = true)]
37    AttributeSelector[] GetAllAttributeSelectors();
38
39    /// <summary>
40    /// Prepares the a query using the specified selection criteria.
41    /// </summary>
42    /// <param name="selectors">The list of <see cref="Server.AttributeSelector"/>s.</param>
43    /// <returns>An empty <see cref="DataTable"/> containing only the column headers.</returns>
44    [OperationContract(IsInitiating = true, IsTerminating = false)]
45    DataTable PrepareQuery(AttributeSelector[] selectors);
46
47    /// <summary>
48    /// Gets the number of matching rows for the prepared query
49    /// (see <see cref="IQueryService.PrepareQuery"/>).
50    /// </summary>
51    /// <returns>The number of matching rows.</returns>
52    [OperationContract(IsInitiating = false, IsTerminating = false)]
53    int GetCount();
54
55    /// <summary>
56    /// Fetches the next <paramref name="nRows"/> rows for the
57    /// prepared query (see <see cref="IQueryService.PrepareQuery"/>).
58    /// </summary>
59    /// <param name="nRows">The maximum number of rows to return.</param>
60    /// <returns>A <see cref="DataTable"/> containing only the next
61    /// <paramref name="nRows"/> rows.</returns>
62    [OperationContract(IsInitiating = false, IsTerminating = false)]
63    DataTable GetNextRows(int nRows);
64
65    /// <summary>
66    /// Terminates the session and closes the connection.
67    /// </summary>
68    [OperationContract(IsInitiating = false, IsTerminating = true)]
69    void Terminate();
70  }
71}
Note: See TracBrowser for help on using the repository browser.