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/UserAdapter.cs

    r948 r971  
    5757
    5858        return userGroupAdapter;
     59      }
     60    }
     61
     62    private IJobAdapter jobAdapter = null;
     63
     64    private IJobAdapter JobAdapter {
     65      get {
     66        if (jobAdapter == null) {
     67          jobAdapter = ServiceLocator.GetJobAdapter();
     68        }
     69
     70        return jobAdapter;
    5971      }
    6072    }
     
    170182
    171183        if (row != null) {
     184          //Referential integrity with user groups
    172185          ICollection<UserGroup> userGroups =
    173186            UserGroupAdapter.MemberOf(user);
    174 
    175187          foreach (UserGroup group in userGroups) {
    176188            group.Members.Remove(user);
     
    178190          }
    179191
     192          //Referential integrity with jobs
     193          ICollection<Job> jobs =
     194            JobAdapter.GetJobsOf(user);
     195          foreach (Job job in jobs) {
     196            JobAdapter.DeleteJob(job);
     197          }
     198
    180199          data.RemoveHiveUserRow(row);
    181200
Note: See TracChangeset for help on using the changeset viewer.