Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.Services.OKB/3.3/Interfaces/ITableService.cs @ 4695

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