Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/TableAdapterWrapper/JobResultsAdapterWrapper.cs @ 1580

Last change on this file since 1580 was 1580, checked in by svonolfe, 15 years ago

Added PluginInfoAdapter (#372)

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.DataAccess.ADOHelper;
6using System.Data.SqlClient;
7using HeuristicLab.Hive.Contracts.BusinessObjects;
8using System.Data.Common;
9
10namespace HeuristicLab.Hive.Server.ADODataAccess.TableAdapterWrapper {
11  class JobResultsAdapterWrapper :
12    TableAdapterWrapperBase<dsHiveServerTableAdapters.JobResultTableAdapter,
13                    JobResult,
14                    dsHiveServer.JobResultRow> {
15    public override void UpdateRow(dsHiveServer.JobResultRow row) {
16      TransactionalAdapter.Update(row);
17    }
18
19    public override dsHiveServer.JobResultRow InsertNewRow(JobResult obj) {
20      dsHiveServer.JobResultDataTable data =
21        new dsHiveServer.JobResultDataTable();
22
23      dsHiveServer.JobResultRow row = data.NewJobResultRow();
24      row.JobResultId = obj.Id;
25      data.AddJobResultRow(row);
26
27      return row;
28    }
29
30    public override IEnumerable<dsHiveServer.JobResultRow> FindById(Guid id) {
31      return TransactionalAdapter.GetDataById(id);
32    }
33
34    public override IEnumerable<dsHiveServer.JobResultRow> FindAll() {
35      return TransactionalAdapter.GetData();
36    }
37
38    protected override void SetConnection(DbConnection connection) {
39      adapter.Connection = connection as SqlConnection;
40    }
41
42    protected override void SetTransaction(DbTransaction transaction) {
43      adapter.Transaction = transaction as SqlTransaction;
44    }
45  }
46}
Note: See TracBrowser for help on using the repository browser.