[2002] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using HeuristicLab.Hive.Contracts.BusinessObjects;
|
---|
| 6 | using HeuristicLab.DataAccess.ADOHelper;
|
---|
| 7 | using System.Data.SqlClient;
|
---|
| 8 | using System.Data.Common;
|
---|
| 9 |
|
---|
| 10 | namespace HeuristicLab.Hive.Server.ADODataAccess.TableAdapterWrapper {
|
---|
| 11 | class ClientConfigAdapterWrapper :
|
---|
| 12 | TableAdapterWrapperBase<
|
---|
| 13 | dsHiveServerTableAdapters.ClientConfigTableAdapter,
|
---|
| 14 | ClientConfig,
|
---|
| 15 | dsHiveServer.ClientConfigRow> {
|
---|
| 16 | public override void UpdateRow(dsHiveServer.ClientConfigRow row) {
|
---|
| 17 | TransactionalAdapter.Update(row);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | public override dsHiveServer.ClientConfigRow
|
---|
| 21 | InsertNewRow(ClientConfig config) {
|
---|
| 22 | dsHiveServer.ClientConfigDataTable data =
|
---|
| 23 | new dsHiveServer.ClientConfigDataTable();
|
---|
| 24 |
|
---|
| 25 | dsHiveServer.ClientConfigRow row = data.NewClientConfigRow();
|
---|
| 26 | row.ClientConfigId = config.Id;
|
---|
| 27 | data.AddClientConfigRow(row);
|
---|
| 28 |
|
---|
| 29 | return row;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | public override IEnumerable<dsHiveServer.ClientConfigRow>
|
---|
| 33 | FindById(Guid id) {
|
---|
| 34 | return TransactionalAdapter.GetDataById(id);
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public override IEnumerable<dsHiveServer.ClientConfigRow>
|
---|
| 38 | FindAll() {
|
---|
| 39 | return TransactionalAdapter.GetData();
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | protected override void SetConnection(DbConnection connection) {
|
---|
| 43 | adapter.Connection = connection as SqlConnection;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | protected override void SetTransaction(DbTransaction transaction) {
|
---|
| 47 | adapter.Transaction = transaction as SqlTransaction;
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
| 50 | }
|
---|