[1580] | 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 RequiredPluginsAdapterWrapper :
|
---|
| 12 | TableAdapterWrapperBase<dsHiveServerTableAdapters.RequiredPluginsTableAdapter,
|
---|
| 13 | ManyToManyRelation,
|
---|
| 14 | dsHiveServer.RequiredPluginsRow> {
|
---|
| 15 | public override dsHiveServer.RequiredPluginsRow
|
---|
| 16 | InsertNewRow(ManyToManyRelation relation) {
|
---|
| 17 | dsHiveServer.RequiredPluginsDataTable data =
|
---|
| 18 | new dsHiveServer.RequiredPluginsDataTable();
|
---|
| 19 |
|
---|
| 20 | dsHiveServer.RequiredPluginsRow row =
|
---|
| 21 | data.NewRequiredPluginsRow();
|
---|
| 22 |
|
---|
| 23 | row.JobId = relation.Id;
|
---|
| 24 | row.PluginId = relation.Id2;
|
---|
| 25 |
|
---|
| 26 | data.AddRequiredPluginsRow(row);
|
---|
| 27 |
|
---|
| 28 | return row;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | public override void
|
---|
| 32 | UpdateRow(dsHiveServer.RequiredPluginsRow row) {
|
---|
| 33 | TransactionalAdapter.Update(row);
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | public override IEnumerable<dsHiveServer.RequiredPluginsRow>
|
---|
| 37 | FindById(Guid id) {
|
---|
| 38 | return TransactionalAdapter.GetDataById(id);
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | public override IEnumerable<dsHiveServer.RequiredPluginsRow>
|
---|
| 42 | FindAll() {
|
---|
| 43 | return TransactionalAdapter.GetData();
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | protected override void SetConnection(DbConnection connection) {
|
---|
| 47 | adapter.Connection = connection as SqlConnection;
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | protected override void SetTransaction(DbTransaction transaction) {
|
---|
| 51 | adapter.Transaction = transaction as SqlTransaction;
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 | }
|
---|