Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/09 15:13:43 (15 years ago)
Author:
svonolfe
Message:

Implementd ClientConfigAdapter (#372)

File:
1 edited

Legend:

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

    r1634 r1999  
    7878      }
    7979    }
     80
     81    private IClientConfigAdapter clientConfigAdapter = null;
     82
     83    private IClientConfigAdapter ClientConfigAdapter {
     84      get {
     85        if (clientConfigAdapter == null) {
     86          clientConfigAdapter =
     87            this.Session.GetDataAdapter<ClientConfig, IClientConfigAdapter>();
     88        }
     89
     90        return clientConfigAdapter;
     91      }
     92    }
    8093    #endregion
    8194
     
    128141          client.FreeMemory = 0;
    129142
    130         //todo: config adapter (client.config)
     143        if (!row.IsClientConfigIdNull())
     144          client.Config = ClientConfigAdapter.GetById(row.ClientConfigId);
     145        else
     146          client.Config = null;
    131147
    132148        return client;
     
    151167        row.FreeMemory = client.FreeMemory;
    152168
    153         //todo: config adapter
    154         /*if (client.Config != null)
    155           row.ClientConfigId = client.Config.ClientConfigId;
    156          else
    157           row.ClientConfigId = null;*/
     169        if (client.Config != null)
     170          row.ClientConfigId = client.Config.Id;
     171        else
     172          row.SetClientConfigIdNull();
    158173      }
    159174
     
    167182      if (client != null) {
    168183        ResAdapter.Update(client);
     184        ClientConfigAdapter.Update(client.Config);
    169185
    170186        base.doUpdate(client);
Note: See TracChangeset for help on using the changeset viewer.