Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/09 17:46:11 (15 years ago)
Author:
svonolfe
Message:

Added PluginInfoAdapter (#372)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/ClientAdapter.cs

    r1530 r1580  
    3232using System.Data.Common;
    3333using System.Data.SqlClient;
     34using HeuristicLab.Hive.Server.ADODataAccess.TableAdapterWrapper;
    3435
    3536namespace HeuristicLab.Hive.Server.ADODataAccess {
    36   class ClientAdapterWrapper :
    37     DataAdapterWrapperBase<
    38         dsHiveServerTableAdapters.ClientTableAdapter,
    39     ClientInfo,
    40     dsHiveServer.ClientRow> {
    41     public override void UpdateRow(dsHiveServer.ClientRow row) {
    42       TransactionalAdapter.Update(row);
    43     }
    44 
    45     public override dsHiveServer.ClientRow
    46       InsertNewRow(ClientInfo client) {
    47       dsHiveServer.ClientDataTable data =
    48         new dsHiveServer.ClientDataTable();
    49 
    50       dsHiveServer.ClientRow row = data.NewClientRow();
    51       row.ResourceId = client.Id;
    52       data.AddClientRow(row);
    53 
    54       return row;
    55     }
    56 
    57     public override IEnumerable<dsHiveServer.ClientRow>
    58       FindById(Guid id) {
    59       return TransactionalAdapter.GetDataById(id);
    60     }
    61 
    62     public override IEnumerable<dsHiveServer.ClientRow>
    63       FindAll() {
    64       return TransactionalAdapter.GetData();
    65     }
    66 
    67     protected override void SetConnection(DbConnection connection) {
    68       adapter.Connection = connection as SqlConnection;
    69     }
    70 
    71     protected override void SetTransaction(DbTransaction transaction) {
    72       adapter.Transaction = transaction as SqlTransaction;
    73     }
    74   }
    75 
    7637  class ClientAdapter:
    7738    DataAdapterBase<
Note: See TracChangeset for help on using the changeset viewer.