Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.DataAccess.ADOHelper;
|
---|
6 | using System.Data.SqlClient;
|
---|
7 | using HeuristicLab.Hive.Contracts.BusinessObjects;
|
---|
8 | using System.Data.Common;
|
---|
9 |
|
---|
10 | namespace 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.