Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.OKB/3.3/Interfaces/ITableService.cs @ 4313

Last change on this file since 4313 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 and uploading data tables.
30  /// </summary>
31  [ServiceContract(SessionMode = SessionMode.Required, ProtectionLevel = ProtectionLevel.EncryptAndSign)]
32  public interface ITableService {
33    /// <summary>
34    /// Prepares the data table to be downloaded.
35    /// </summary>
36    /// <param name="tableName">Name of the table.</param>
37    /// <param name="count">The number of rows.</param>
38    /// <returns>An empyt <see cref="DataType"/> that contains just
39    /// the column headers.</returns>
40    [OperationContract(IsInitiating = true)]
41    DataTable PrepareDataTable(string tableName, out int count);
42
43    /// <summary>
44    /// Gets the next few rows.
45    /// </summary>
46    /// <param name="count">The maximum number of rows to return.</param>
47    /// <returns>A partial <see cref="DataTable"/> with the
48    /// next few rows.</returns>
49    [OperationContract(IsInitiating = false, IsTerminating = false)]
50    DataTable GetNextRows(int count);
51
52    /// <summary>
53    /// Finishes fetching rows and closes the connection.
54    /// </summary>
55    [OperationContract(IsTerminating = true)]
56    void FinishFetchingRows();
57
58    /// <summary>
59    /// Updates the data table using the partial <see cref="DataTable"/>
60    /// with changed rows.
61    /// </summary>
62    /// <param name="changedRows">The <see cref="DataTable"/> with
63    /// changed rows.</param>
64    /// <param name="tableName">Name of the table.</param>
65    [OperationContract(IsInitiating = true, IsTerminating = true)]
66    void UpdateDataTable(DataTable changedRows, string tableName);
67
68    /// <summary>
69    /// Deletes the selected table rows using the value of the
70    /// "Id" column.
71    /// </summary>
72    /// <param name="ids">The ids.</param>
73    /// <param name="tableName">Name of the table.</param>
74    [OperationContract(IsInitiating = true, IsTerminating = true)]
75    void DeleteTableRows(int[] ids, string tableName);
76  }
77
78}
Note: See TracBrowser for help on using the repository browser.