Ignore:
Timestamp:
12/11/08 16:50:12 (12 years ago)
Author:
svonolfe
Message:

Added Job Adapter (#372)

File:
1 edited

Legend:

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

    r965 r971  
    4646    private IResourceAdapter resourceAdapter = null;
    4747
    48     private IResourceAdapter ResourceAdapter {
     48    private IResourceAdapter ResAdapter {
    4949      get {
    5050        if (resourceAdapter == null)
     
    8181        /*Parent - Permission Owner*/
    8282        clientGroup.ResourceId = row.ResourceId;
    83         ResourceAdapter.GetResourceById(clientGroup);
     83        ResAdapter.GetResourceById(clientGroup);
    8484
    8585        //first check for created references
     
    218218    public void UpdateClientGroup(ClientGroup group) {
    219219      if (group != null) {
    220         ResourceAdapter.UpdateResource(group);
     220        ResAdapter.UpdateResource(group);
    221221
    222222        dsHiveServer.ClientGroupRow row =
     
    246246        return null;
    247247      }
     248    }
     249
     250    public ClientGroup GetClientGroupByName(string name) {
     251      ClientGroup group = new ClientGroup();
     252
     253      Resource res =
     254        ResAdapter.GetResourceByName(name);
     255
     256      if (res != null) {
     257        dsHiveServer.ClientGroupRow row =
     258          data.FindByResourceId(res.ResourceId);
     259
     260        if (row != null) {
     261          Convert(row, group);
     262
     263          return group;
     264        }
     265      }
     266
     267      return null;
    248268    }
    249269
     
    309329
    310330          data.RemoveClientGroupRow(row);
    311           return ResourceAdapter.DeleteResource(group);
     331          return ResAdapter.DeleteResource(group);
    312332        }
    313333      }
Note: See TracChangeset for help on using the changeset viewer.