Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs @ 15378

Last change on this file since 15378 was 15378, checked in by jkarder, 6 years ago

#2839: worked on database model

File size: 161.4 KB
Line 
1#pragma warning disable 1591
2//------------------------------------------------------------------------------
3// <auto-generated>
4//     This code was generated by a tool.
5//     Runtime Version:4.0.30319.42000
6//
7//     Changes to this file may cause incorrect behavior and will be lost if
8//     the code is regenerated.
9// </auto-generated>
10//------------------------------------------------------------------------------
11
12namespace HeuristicLab.Services.Hive.DataAccess
13{
14  using System.Data.Linq;
15  using System.Data.Linq.Mapping;
16  using System.Data;
17  using System.Collections.Generic;
18  using System.Reflection;
19  using System.Linq;
20  using System.Linq.Expressions;
21  using System.ComponentModel;
22  using System;
23 
24 
25  [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.Hive")]
26  public partial class HiveDataContext : System.Data.Linq.DataContext
27  {
28   
29    private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
30   
31    #region Extensibility Method Definitions
32    partial void OnCreated();
33    partial void InsertAssignedResource(AssignedResource instance);
34    partial void UpdateAssignedResource(AssignedResource instance);
35    partial void DeleteAssignedResource(AssignedResource instance);
36    partial void InsertPlugin(Plugin instance);
37    partial void UpdatePlugin(Plugin instance);
38    partial void DeletePlugin(Plugin instance);
39    partial void InsertRequiredPlugin(RequiredPlugin instance);
40    partial void UpdateRequiredPlugin(RequiredPlugin instance);
41    partial void DeleteRequiredPlugin(RequiredPlugin instance);
42    partial void InsertResource(Resource instance);
43    partial void UpdateResource(Resource instance);
44    partial void DeleteResource(Resource instance);
45    partial void InsertTask(Task instance);
46    partial void UpdateTask(Task instance);
47    partial void DeleteTask(Task instance);
48    partial void InsertDowntime(Downtime instance);
49    partial void UpdateDowntime(Downtime instance);
50    partial void DeleteDowntime(Downtime instance);
51    partial void InsertJob(Job instance);
52    partial void UpdateJob(Job instance);
53    partial void DeleteJob(Job instance);
54    partial void InsertTaskData(TaskData instance);
55    partial void UpdateTaskData(TaskData instance);
56    partial void DeleteTaskData(TaskData instance);
57    partial void InsertPluginData(PluginData instance);
58    partial void UpdatePluginData(PluginData instance);
59    partial void DeletePluginData(PluginData instance);
60    partial void InsertStateLog(StateLog instance);
61    partial void UpdateStateLog(StateLog instance);
62    partial void DeleteStateLog(StateLog instance);
63    partial void InsertJobPermission(JobPermission instance);
64    partial void UpdateJobPermission(JobPermission instance);
65    partial void DeleteJobPermission(JobPermission instance);
66    partial void InsertLifecycle(Lifecycle instance);
67    partial void UpdateLifecycle(Lifecycle instance);
68    partial void DeleteLifecycle(Lifecycle instance);
69    partial void InsertResourcePermission(ResourcePermission instance);
70    partial void UpdateResourcePermission(ResourcePermission instance);
71    partial void DeleteResourcePermission(ResourcePermission instance);
72    partial void InsertUserPriority(UserPriority instance);
73    partial void UpdateUserPriority(UserPriority instance);
74    partial void DeleteUserPriority(UserPriority instance);
75    partial void InsertDimClient(DimClient instance);
76    partial void UpdateDimClient(DimClient instance);
77    partial void DeleteDimClient(DimClient instance);
78    partial void InsertFactTask(FactTask instance);
79    partial void UpdateFactTask(FactTask instance);
80    partial void DeleteFactTask(FactTask instance);
81    partial void InsertDimJob(DimJob instance);
82    partial void UpdateDimJob(DimJob instance);
83    partial void DeleteDimJob(DimJob instance);
84    partial void InsertDimTime(DimTime instance);
85    partial void UpdateDimTime(DimTime instance);
86    partial void DeleteDimTime(DimTime instance);
87    partial void InsertDimUser(DimUser instance);
88    partial void UpdateDimUser(DimUser instance);
89    partial void DeleteDimUser(DimUser instance);
90    partial void InsertFactClientInfo(FactClientInfo instance);
91    partial void UpdateFactClientInfo(FactClientInfo instance);
92    partial void DeleteFactClientInfo(FactClientInfo instance);
93    partial void InsertProject(Project instance);
94    partial void UpdateProject(Project instance);
95    partial void DeleteProject(Project instance);
96    partial void InsertProjectPermission(ProjectPermission instance);
97    partial void UpdateProjectPermission(ProjectPermission instance);
98    partial void DeleteProjectPermission(ProjectPermission instance);
99    #endregion
100   
101    public HiveDataContext(string connection) :
102        base(connection, mappingSource)
103    {
104      OnCreated();
105    }
106   
107    public HiveDataContext(System.Data.IDbConnection connection) :
108        base(connection, mappingSource)
109    {
110      OnCreated();
111    }
112   
113    public HiveDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
114        base(connection, mappingSource)
115    {
116      OnCreated();
117    }
118   
119    public HiveDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
120        base(connection, mappingSource)
121    {
122      OnCreated();
123    }
124   
125    public System.Data.Linq.Table<AssignedResource> AssignedResources
126    {
127      get
128      {
129        return this.GetTable<AssignedResource>();
130      }
131    }
132   
133    public System.Data.Linq.Table<Plugin> Plugins
134    {
135      get
136      {
137        return this.GetTable<Plugin>();
138      }
139    }
140   
141    public System.Data.Linq.Table<RequiredPlugin> RequiredPlugins
142    {
143      get
144      {
145        return this.GetTable<RequiredPlugin>();
146      }
147    }
148   
149    public System.Data.Linq.Table<Resource> Resources
150    {
151      get
152      {
153        return this.GetTable<Resource>();
154      }
155    }
156   
157    public System.Data.Linq.Table<Task> Tasks
158    {
159      get
160      {
161        return this.GetTable<Task>();
162      }
163    }
164   
165    public System.Data.Linq.Table<Downtime> Downtimes
166    {
167      get
168      {
169        return this.GetTable<Downtime>();
170      }
171    }
172   
173    public System.Data.Linq.Table<Job> Jobs
174    {
175      get
176      {
177        return this.GetTable<Job>();
178      }
179    }
180   
181    public System.Data.Linq.Table<TaskData> TaskDatas
182    {
183      get
184      {
185        return this.GetTable<TaskData>();
186      }
187    }
188   
189    public System.Data.Linq.Table<PluginData> PluginDatas
190    {
191      get
192      {
193        return this.GetTable<PluginData>();
194      }
195    }
196   
197    public System.Data.Linq.Table<StateLog> StateLogs
198    {
199      get
200      {
201        return this.GetTable<StateLog>();
202      }
203    }
204   
205    public System.Data.Linq.Table<JobPermission> JobPermissions
206    {
207      get
208      {
209        return this.GetTable<JobPermission>();
210      }
211    }
212   
213    public System.Data.Linq.Table<Lifecycle> Lifecycles
214    {
215      get
216      {
217        return this.GetTable<Lifecycle>();
218      }
219    }
220   
221    public System.Data.Linq.Table<ResourcePermission> ResourcePermissions
222    {
223      get
224      {
225        return this.GetTable<ResourcePermission>();
226      }
227    }
228   
229    public System.Data.Linq.Table<UserPriority> UserPriorities
230    {
231      get
232      {
233        return this.GetTable<UserPriority>();
234      }
235    }
236   
237    public System.Data.Linq.Table<DimClient> DimClients
238    {
239      get
240      {
241        return this.GetTable<DimClient>();
242      }
243    }
244   
245    public System.Data.Linq.Table<FactTask> FactTasks
246    {
247      get
248      {
249        return this.GetTable<FactTask>();
250      }
251    }
252   
253    public System.Data.Linq.Table<DimJob> DimJobs
254    {
255      get
256      {
257        return this.GetTable<DimJob>();
258      }
259    }
260   
261    public System.Data.Linq.Table<DimTime> DimTimes
262    {
263      get
264      {
265        return this.GetTable<DimTime>();
266      }
267    }
268   
269    public System.Data.Linq.Table<DimUser> DimUsers
270    {
271      get
272      {
273        return this.GetTable<DimUser>();
274      }
275    }
276   
277    public System.Data.Linq.Table<FactClientInfo> FactClientInfos
278    {
279      get
280      {
281        return this.GetTable<FactClientInfo>();
282      }
283    }
284   
285    public System.Data.Linq.Table<Project> Projects
286    {
287      get
288      {
289        return this.GetTable<Project>();
290      }
291    }
292   
293    public System.Data.Linq.Table<ProjectPermission> ProjectPermissions
294    {
295      get
296      {
297        return this.GetTable<ProjectPermission>();
298      }
299    }
300  }
301 
302  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedResource")]
303  public partial class AssignedResource : INotifyPropertyChanging, INotifyPropertyChanged
304  {
305   
306    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
307   
308    private System.Guid _ResourceId;
309   
310    private System.Guid _JobId;
311   
312    private EntityRef<Resource> _Resource;
313   
314    private EntityRef<Project> _Project;
315   
316    #region Extensibility Method Definitions
317    partial void OnLoaded();
318    partial void OnValidate(System.Data.Linq.ChangeAction action);
319    partial void OnCreated();
320    partial void OnResourceIdChanging(System.Guid value);
321    partial void OnResourceIdChanged();
322    partial void OnProjectIdChanging(System.Guid value);
323    partial void OnProjectIdChanged();
324    #endregion
325   
326    public AssignedResource()
327    {
328      this._Resource = default(EntityRef<Resource>);
329      this._Project = default(EntityRef<Project>);
330      OnCreated();
331    }
332   
333    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
334    public System.Guid ResourceId
335    {
336      get
337      {
338        return this._ResourceId;
339      }
340      set
341      {
342        if ((this._ResourceId != value))
343        {
344          if (this._Resource.HasLoadedOrAssignedValue)
345          {
346            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
347          }
348          this.OnResourceIdChanging(value);
349          this.SendPropertyChanging();
350          this._ResourceId = value;
351          this.SendPropertyChanged("ResourceId");
352          this.OnResourceIdChanged();
353        }
354      }
355    }
356   
357    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
358    public System.Guid ProjectId
359    {
360      get
361      {
362        return this._JobId;
363      }
364      set
365      {
366        if ((this._JobId != value))
367        {
368          if (this._Project.HasLoadedOrAssignedValue)
369          {
370            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
371          }
372          this.OnProjectIdChanging(value);
373          this.SendPropertyChanging();
374          this._JobId = value;
375          this.SendPropertyChanged("ProjectId");
376          this.OnProjectIdChanged();
377        }
378      }
379    }
380   
381    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
382    public Resource Resource
383    {
384      get
385      {
386        return this._Resource.Entity;
387      }
388      set
389      {
390        Resource previousValue = this._Resource.Entity;
391        if (((previousValue != value)
392              || (this._Resource.HasLoadedOrAssignedValue == false)))
393        {
394          this.SendPropertyChanging();
395          if ((previousValue != null))
396          {
397            this._Resource.Entity = null;
398            previousValue.AssignedResources.Remove(this);
399          }
400          this._Resource.Entity = value;
401          if ((value != null))
402          {
403            value.AssignedResources.Add(this);
404            this._ResourceId = value.ResourceId;
405          }
406          else
407          {
408            this._ResourceId = default(System.Guid);
409          }
410          this.SendPropertyChanged("Resource");
411        }
412      }
413    }
414   
415    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedResource", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="CASCADE")]
416    public Project Project
417    {
418      get
419      {
420        return this._Project.Entity;
421      }
422      set
423      {
424        Project previousValue = this._Project.Entity;
425        if (((previousValue != value)
426              || (this._Project.HasLoadedOrAssignedValue == false)))
427        {
428          this.SendPropertyChanging();
429          if ((previousValue != null))
430          {
431            this._Project.Entity = null;
432            previousValue.AssignedResources.Remove(this);
433          }
434          this._Project.Entity = value;
435          if ((value != null))
436          {
437            value.AssignedResources.Add(this);
438            this._JobId = value.ProjectId;
439          }
440          else
441          {
442            this._JobId = default(System.Guid);
443          }
444          this.SendPropertyChanged("Project");
445        }
446      }
447    }
448   
449    public event PropertyChangingEventHandler PropertyChanging;
450   
451    public event PropertyChangedEventHandler PropertyChanged;
452   
453    protected virtual void SendPropertyChanging()
454    {
455      if ((this.PropertyChanging != null))
456      {
457        this.PropertyChanging(this, emptyChangingEventArgs);
458      }
459    }
460   
461    protected virtual void SendPropertyChanged(String propertyName)
462    {
463      if ((this.PropertyChanged != null))
464      {
465        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
466      }
467    }
468  }
469 
470  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Plugin")]
471  public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged
472  {
473   
474    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
475   
476    private System.Guid _PluginId;
477   
478    private string _Name;
479   
480    private string _Version;
481   
482    private System.Guid _UserId;
483   
484    private System.DateTime _DateCreated;
485   
486    private byte[] _Hash;
487   
488    private EntitySet<RequiredPlugin> _RequiredPlugins;
489   
490    private EntitySet<PluginData> _PluginData;
491   
492    #region Extensibility Method Definitions
493    partial void OnLoaded();
494    partial void OnValidate(System.Data.Linq.ChangeAction action);
495    partial void OnCreated();
496    partial void OnPluginIdChanging(System.Guid value);
497    partial void OnPluginIdChanged();
498    partial void OnNameChanging(string value);
499    partial void OnNameChanged();
500    partial void OnVersionChanging(string value);
501    partial void OnVersionChanged();
502    partial void OnUserIdChanging(System.Guid value);
503    partial void OnUserIdChanged();
504    partial void OnDateCreatedChanging(System.DateTime value);
505    partial void OnDateCreatedChanged();
506    partial void OnHashChanging(byte[] value);
507    partial void OnHashChanged();
508    #endregion
509   
510    public Plugin()
511    {
512      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
513      this._PluginData = new EntitySet<PluginData>(new Action<PluginData>(this.attach_PluginData), new Action<PluginData>(this.detach_PluginData));
514      OnCreated();
515    }
516   
517    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
518    public System.Guid PluginId
519    {
520      get
521      {
522        return this._PluginId;
523      }
524      set
525      {
526        if ((this._PluginId != value))
527        {
528          this.OnPluginIdChanging(value);
529          this.SendPropertyChanging();
530          this._PluginId = value;
531          this.SendPropertyChanged("PluginId");
532          this.OnPluginIdChanged();
533        }
534      }
535    }
536   
537    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
538    public string Name
539    {
540      get
541      {
542        return this._Name;
543      }
544      set
545      {
546        if ((this._Name != value))
547        {
548          this.OnNameChanging(value);
549          this.SendPropertyChanging();
550          this._Name = value;
551          this.SendPropertyChanged("Name");
552          this.OnNameChanged();
553        }
554      }
555    }
556   
557    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Version", DbType="VarChar(MAX)", CanBeNull=false)]
558    public string Version
559    {
560      get
561      {
562        return this._Version;
563      }
564      set
565      {
566        if ((this._Version != value))
567        {
568          this.OnVersionChanging(value);
569          this.SendPropertyChanging();
570          this._Version = value;
571          this.SendPropertyChanged("Version");
572          this.OnVersionChanged();
573        }
574      }
575    }
576   
577    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
578    public System.Guid UserId
579    {
580      get
581      {
582        return this._UserId;
583      }
584      set
585      {
586        if ((this._UserId != value))
587        {
588          this.OnUserIdChanging(value);
589          this.SendPropertyChanging();
590          this._UserId = value;
591          this.SendPropertyChanged("UserId");
592          this.OnUserIdChanged();
593        }
594      }
595    }
596   
597    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
598    public System.DateTime DateCreated
599    {
600      get
601      {
602        return this._DateCreated;
603      }
604      set
605      {
606        if ((this._DateCreated != value))
607        {
608          this.OnDateCreatedChanging(value);
609          this.SendPropertyChanging();
610          this._DateCreated = value;
611          this.SendPropertyChanged("DateCreated");
612          this.OnDateCreatedChanged();
613        }
614      }
615    }
616   
617    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hash", DbType="VarBinary(20) NOT NULL", CanBeNull=false)]
618    public byte[] Hash
619    {
620      get
621      {
622        return this._Hash;
623      }
624      set
625      {
626        if ((this._Hash != value))
627        {
628          this.OnHashChanging(value);
629          this.SendPropertyChanging();
630          this._Hash = value;
631          this.SendPropertyChanged("Hash");
632          this.OnHashChanged();
633        }
634      }
635    }
636   
637    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
638    public EntitySet<RequiredPlugin> RequiredPlugins
639    {
640      get
641      {
642        return this._RequiredPlugins;
643      }
644      set
645      {
646        this._RequiredPlugins.Assign(value);
647      }
648    }
649   
650    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_PluginData", ThisKey="PluginId", OtherKey="PluginId")]
651    public EntitySet<PluginData> PluginData
652    {
653      get
654      {
655        return this._PluginData;
656      }
657      set
658      {
659        this._PluginData.Assign(value);
660      }
661    }
662   
663    public event PropertyChangingEventHandler PropertyChanging;
664   
665    public event PropertyChangedEventHandler PropertyChanged;
666   
667    protected virtual void SendPropertyChanging()
668    {
669      if ((this.PropertyChanging != null))
670      {
671        this.PropertyChanging(this, emptyChangingEventArgs);
672      }
673    }
674   
675    protected virtual void SendPropertyChanged(String propertyName)
676    {
677      if ((this.PropertyChanged != null))
678      {
679        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
680      }
681    }
682   
683    private void attach_RequiredPlugins(RequiredPlugin entity)
684    {
685      this.SendPropertyChanging();
686      entity.Plugin = this;
687    }
688   
689    private void detach_RequiredPlugins(RequiredPlugin entity)
690    {
691      this.SendPropertyChanging();
692      entity.Plugin = null;
693    }
694   
695    private void attach_PluginData(PluginData entity)
696    {
697      this.SendPropertyChanging();
698      entity.Plugin = this;
699    }
700   
701    private void detach_PluginData(PluginData entity)
702    {
703      this.SendPropertyChanging();
704      entity.Plugin = null;
705    }
706  }
707 
708  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RequiredPlugins")]
709  public partial class RequiredPlugin : INotifyPropertyChanging, INotifyPropertyChanged
710  {
711   
712    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
713   
714    private System.Guid _RequiredPluginId;
715   
716    private System.Guid _JobId;
717   
718    private System.Guid _PluginId;
719   
720    private EntityRef<Plugin> _PluginInfo;
721   
722    private EntityRef<Task> _Job;
723   
724    #region Extensibility Method Definitions
725    partial void OnLoaded();
726    partial void OnValidate(System.Data.Linq.ChangeAction action);
727    partial void OnCreated();
728    partial void OnRequiredPluginIdChanging(System.Guid value);
729    partial void OnRequiredPluginIdChanged();
730    partial void OnTaskIdChanging(System.Guid value);
731    partial void OnTaskIdChanged();
732    partial void OnPluginIdChanging(System.Guid value);
733    partial void OnPluginIdChanged();
734    #endregion
735   
736    public RequiredPlugin()
737    {
738      this._PluginInfo = default(EntityRef<Plugin>);
739      this._Job = default(EntityRef<Task>);
740      OnCreated();
741    }
742   
743    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequiredPluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
744    public System.Guid RequiredPluginId
745    {
746      get
747      {
748        return this._RequiredPluginId;
749      }
750      set
751      {
752        if ((this._RequiredPluginId != value))
753        {
754          this.OnRequiredPluginIdChanging(value);
755          this.SendPropertyChanging();
756          this._RequiredPluginId = value;
757          this.SendPropertyChanged("RequiredPluginId");
758          this.OnRequiredPluginIdChanged();
759        }
760      }
761    }
762   
763    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
764    public System.Guid TaskId
765    {
766      get
767      {
768        return this._JobId;
769      }
770      set
771      {
772        if ((this._JobId != value))
773        {
774          if (this._Job.HasLoadedOrAssignedValue)
775          {
776            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
777          }
778          this.OnTaskIdChanging(value);
779          this.SendPropertyChanging();
780          this._JobId = value;
781          this.SendPropertyChanged("TaskId");
782          this.OnTaskIdChanged();
783        }
784      }
785    }
786   
787    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
788    public System.Guid PluginId
789    {
790      get
791      {
792        return this._PluginId;
793      }
794      set
795      {
796        if ((this._PluginId != value))
797        {
798          if (this._PluginInfo.HasLoadedOrAssignedValue)
799          {
800            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
801          }
802          this.OnPluginIdChanging(value);
803          this.SendPropertyChanging();
804          this._PluginId = value;
805          this.SendPropertyChanged("PluginId");
806          this.OnPluginIdChanged();
807        }
808      }
809    }
810   
811    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
812    public Plugin Plugin
813    {
814      get
815      {
816        return this._PluginInfo.Entity;
817      }
818      set
819      {
820        Plugin previousValue = this._PluginInfo.Entity;
821        if (((previousValue != value)
822              || (this._PluginInfo.HasLoadedOrAssignedValue == false)))
823        {
824          this.SendPropertyChanging();
825          if ((previousValue != null))
826          {
827            this._PluginInfo.Entity = null;
828            previousValue.RequiredPlugins.Remove(this);
829          }
830          this._PluginInfo.Entity = value;
831          if ((value != null))
832          {
833            value.RequiredPlugins.Add(this);
834            this._PluginId = value.PluginId;
835          }
836          else
837          {
838            this._PluginId = default(System.Guid);
839          }
840          this.SendPropertyChanged("Plugin");
841        }
842      }
843    }
844   
845    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
846    public Task Task
847    {
848      get
849      {
850        return this._Job.Entity;
851      }
852      set
853      {
854        Task previousValue = this._Job.Entity;
855        if (((previousValue != value)
856              || (this._Job.HasLoadedOrAssignedValue == false)))
857        {
858          this.SendPropertyChanging();
859          if ((previousValue != null))
860          {
861            this._Job.Entity = null;
862            previousValue.RequiredPlugins.Remove(this);
863          }
864          this._Job.Entity = value;
865          if ((value != null))
866          {
867            value.RequiredPlugins.Add(this);
868            this._JobId = value.TaskId;
869          }
870          else
871          {
872            this._JobId = default(System.Guid);
873          }
874          this.SendPropertyChanged("Task");
875        }
876      }
877    }
878   
879    public event PropertyChangingEventHandler PropertyChanging;
880   
881    public event PropertyChangedEventHandler PropertyChanged;
882   
883    protected virtual void SendPropertyChanging()
884    {
885      if ((this.PropertyChanging != null))
886      {
887        this.PropertyChanging(this, emptyChangingEventArgs);
888      }
889    }
890   
891    protected virtual void SendPropertyChanged(String propertyName)
892    {
893      if ((this.PropertyChanged != null))
894      {
895        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
896      }
897    }
898  }
899 
900  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Resource")]
901  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="RESOURCE", Type=typeof(Resource))]
902  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Slave", Type=typeof(Slave), IsDefault=true)]
903  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="GROUP", Type=typeof(SlaveGroup))]
904  public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
905  {
906   
907    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
908   
909    private System.Guid _ResourceId;
910   
911    private string _Name;
912   
913    private string _ResourceType;
914   
915    private System.Nullable<System.Guid> _ParentResourceId;
916   
917    private int _HbInterval;
918   
919    private System.Nullable<System.Guid> _OwnerUserId;
920   
921    private EntitySet<AssignedResource> _AssignedResources;
922   
923    private EntitySet<Resource> _ChildResources;
924   
925    private EntitySet<Downtime> _UptimeCalendars;
926   
927    private EntitySet<StateLog> _StateLogs;
928   
929    private EntitySet<ResourcePermission> _ResourcePermissions;
930   
931    private EntityRef<Resource> _ParentResource;
932   
933    #region Extensibility Method Definitions
934    partial void OnLoaded();
935    partial void OnValidate(System.Data.Linq.ChangeAction action);
936    partial void OnCreated();
937    partial void OnResourceIdChanging(System.Guid value);
938    partial void OnResourceIdChanged();
939    partial void OnNameChanging(string value);
940    partial void OnNameChanged();
941    partial void OnResourceTypeChanging(string value);
942    partial void OnResourceTypeChanged();
943    partial void OnParentResourceIdChanging(System.Nullable<System.Guid> value);
944    partial void OnParentResourceIdChanged();
945    partial void OnHbIntervalChanging(int value);
946    partial void OnHbIntervalChanged();
947    partial void OnOwnerUserIdChanging(System.Nullable<System.Guid> value);
948    partial void OnOwnerUserIdChanged();
949    #endregion
950   
951    public Resource()
952    {
953      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
954      this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources));
955      this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars));
956      this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
957      this._ResourcePermissions = new EntitySet<ResourcePermission>(new Action<ResourcePermission>(this.attach_ResourcePermissions), new Action<ResourcePermission>(this.detach_ResourcePermissions));
958      this._ParentResource = default(EntityRef<Resource>);
959      OnCreated();
960    }
961   
962    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
963    public System.Guid ResourceId
964    {
965      get
966      {
967        return this._ResourceId;
968      }
969      set
970      {
971        if ((this._ResourceId != value))
972        {
973          this.OnResourceIdChanging(value);
974          this.SendPropertyChanging();
975          this._ResourceId = value;
976          this.SendPropertyChanged("ResourceId");
977          this.OnResourceIdChanged();
978        }
979      }
980    }
981   
982    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
983    public string Name
984    {
985      get
986      {
987        return this._Name;
988      }
989      set
990      {
991        if ((this._Name != value))
992        {
993          this.OnNameChanging(value);
994          this.SendPropertyChanging();
995          this._Name = value;
996          this.SendPropertyChanged("Name");
997          this.OnNameChanged();
998        }
999      }
1000    }
1001   
1002    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", CanBeNull=false, IsDiscriminator=true)]
1003    public string ResourceType
1004    {
1005      get
1006      {
1007        return this._ResourceType;
1008      }
1009      set
1010      {
1011        if ((this._ResourceType != value))
1012        {
1013          this.OnResourceTypeChanging(value);
1014          this.SendPropertyChanging();
1015          this._ResourceType = value;
1016          this.SendPropertyChanged("ResourceType");
1017          this.OnResourceTypeChanged();
1018        }
1019      }
1020    }
1021   
1022    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentResourceId", DbType="UniqueIdentifier")]
1023    public System.Nullable<System.Guid> ParentResourceId
1024    {
1025      get
1026      {
1027        return this._ParentResourceId;
1028      }
1029      set
1030      {
1031        if ((this._ParentResourceId != value))
1032        {
1033          if (this._ParentResource.HasLoadedOrAssignedValue)
1034          {
1035            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1036          }
1037          this.OnParentResourceIdChanging(value);
1038          this.SendPropertyChanging();
1039          this._ParentResourceId = value;
1040          this.SendPropertyChanged("ParentResourceId");
1041          this.OnParentResourceIdChanged();
1042        }
1043      }
1044    }
1045   
1046    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HbInterval", DbType="Int")]
1047    public int HbInterval
1048    {
1049      get
1050      {
1051        return this._HbInterval;
1052      }
1053      set
1054      {
1055        if ((this._HbInterval != value))
1056        {
1057          this.OnHbIntervalChanging(value);
1058          this.SendPropertyChanging();
1059          this._HbInterval = value;
1060          this.SendPropertyChanged("HbInterval");
1061          this.OnHbIntervalChanged();
1062        }
1063      }
1064    }
1065   
1066    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerUserId", DbType="UniqueIdentifier")]
1067    public System.Nullable<System.Guid> OwnerUserId
1068    {
1069      get
1070      {
1071        return this._OwnerUserId;
1072      }
1073      set
1074      {
1075        if ((this._OwnerUserId != value))
1076        {
1077          this.OnOwnerUserIdChanging(value);
1078          this.SendPropertyChanging();
1079          this._OwnerUserId = value;
1080          this.SendPropertyChanged("OwnerUserId");
1081          this.OnOwnerUserIdChanged();
1082        }
1083      }
1084    }
1085   
1086    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
1087    public EntitySet<AssignedResource> AssignedResources
1088    {
1089      get
1090      {
1091        return this._AssignedResources;
1092      }
1093      set
1094      {
1095        this._AssignedResources.Assign(value);
1096      }
1097    }
1098   
1099    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ChildResources", ThisKey="ResourceId", OtherKey="ParentResourceId")]
1100    public EntitySet<Resource> ChildResources
1101    {
1102      get
1103      {
1104        return this._ChildResources;
1105      }
1106      set
1107      {
1108        this._ChildResources.Assign(value);
1109      }
1110    }
1111   
1112    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
1113    public EntitySet<Downtime> Downtimes
1114    {
1115      get
1116      {
1117        return this._UptimeCalendars;
1118      }
1119      set
1120      {
1121        this._UptimeCalendars.Assign(value);
1122      }
1123    }
1124   
1125    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_StateLogs", ThisKey="ResourceId", OtherKey="SlaveId")]
1126    public EntitySet<StateLog> StateLogs
1127    {
1128      get
1129      {
1130        return this._StateLogs;
1131      }
1132      set
1133      {
1134        this._StateLogs.Assign(value);
1135      }
1136    }
1137   
1138    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_ResourcePermissions", ThisKey="ResourceId", OtherKey="ResourceId")]
1139    public EntitySet<ResourcePermission> ResourcePermissions
1140    {
1141      get
1142      {
1143        return this._ResourcePermissions;
1144      }
1145      set
1146      {
1147        this._ResourcePermissions.Assign(value);
1148      }
1149    }
1150   
1151    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ParentResource", ThisKey="ParentResourceId", OtherKey="ResourceId", IsForeignKey=true)]
1152    public Resource ParentResource
1153    {
1154      get
1155      {
1156        return this._ParentResource.Entity;
1157      }
1158      set
1159      {
1160        Resource previousValue = this._ParentResource.Entity;
1161        if (((previousValue != value)
1162              || (this._ParentResource.HasLoadedOrAssignedValue == false)))
1163        {
1164          this.SendPropertyChanging();
1165          if ((previousValue != null))
1166          {
1167            this._ParentResource.Entity = null;
1168            previousValue.ChildResources.Remove(this);
1169          }
1170          this._ParentResource.Entity = value;
1171          if ((value != null))
1172          {
1173            value.ChildResources.Add(this);
1174            this._ParentResourceId = value.ResourceId;
1175          }
1176          else
1177          {
1178            this._ParentResourceId = default(Nullable<System.Guid>);
1179          }
1180          this.SendPropertyChanged("ParentResource");
1181        }
1182      }
1183    }
1184   
1185    public event PropertyChangingEventHandler PropertyChanging;
1186   
1187    public event PropertyChangedEventHandler PropertyChanged;
1188   
1189    protected virtual void SendPropertyChanging()
1190    {
1191      if ((this.PropertyChanging != null))
1192      {
1193        this.PropertyChanging(this, emptyChangingEventArgs);
1194      }
1195    }
1196   
1197    protected virtual void SendPropertyChanged(String propertyName)
1198    {
1199      if ((this.PropertyChanged != null))
1200      {
1201        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1202      }
1203    }
1204   
1205    private void attach_AssignedResources(AssignedResource entity)
1206    {
1207      this.SendPropertyChanging();
1208      entity.Resource = this;
1209    }
1210   
1211    private void detach_AssignedResources(AssignedResource entity)
1212    {
1213      this.SendPropertyChanging();
1214      entity.Resource = null;
1215    }
1216   
1217    private void attach_ChildResources(Resource entity)
1218    {
1219      this.SendPropertyChanging();
1220      entity.ParentResource = this;
1221    }
1222   
1223    private void detach_ChildResources(Resource entity)
1224    {
1225      this.SendPropertyChanging();
1226      entity.ParentResource = null;
1227    }
1228   
1229    private void attach_UptimeCalendars(Downtime entity)
1230    {
1231      this.SendPropertyChanging();
1232      entity.Resource = this;
1233    }
1234   
1235    private void detach_UptimeCalendars(Downtime entity)
1236    {
1237      this.SendPropertyChanging();
1238      entity.Resource = null;
1239    }
1240   
1241    private void attach_StateLogs(StateLog entity)
1242    {
1243      this.SendPropertyChanging();
1244      entity.Resource = this;
1245    }
1246   
1247    private void detach_StateLogs(StateLog entity)
1248    {
1249      this.SendPropertyChanging();
1250      entity.Resource = null;
1251    }
1252   
1253    private void attach_ResourcePermissions(ResourcePermission entity)
1254    {
1255      this.SendPropertyChanging();
1256      entity.Resource = this;
1257    }
1258   
1259    private void detach_ResourcePermissions(ResourcePermission entity)
1260    {
1261      this.SendPropertyChanging();
1262      entity.Resource = null;
1263    }
1264  }
1265 
1266  public partial class Slave : Resource
1267  {
1268   
1269    private System.Nullable<int> _CPUSpeed;
1270   
1271    private System.Nullable<int> _Memory;
1272   
1273    private System.Nullable<System.DateTime> _Login;
1274   
1275    private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _Status;
1276   
1277    private System.Nullable<int> _NumberOfCores;
1278   
1279    private System.Nullable<int> _NumberOfFreeCores;
1280   
1281    private System.Nullable<int> _FreeMemory;
1282   
1283    private bool _IsAllowedToCalculate;
1284   
1285    private global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture _CpuArchitecture;
1286   
1287    private string _OperatingSystem;
1288   
1289    private System.Nullable<System.DateTime> _LastHeartbeat;
1290   
1291    private double _CpuUtilization;
1292   
1293    private System.Nullable<bool> _IsDisposable;
1294   
1295    #region Extensibility Method Definitions
1296    partial void OnLoaded();
1297    partial void OnValidate(System.Data.Linq.ChangeAction action);
1298    partial void OnCreated();
1299    partial void OnCpuSpeedChanging(System.Nullable<int> value);
1300    partial void OnCpuSpeedChanged();
1301    partial void OnMemoryChanging(System.Nullable<int> value);
1302    partial void OnMemoryChanged();
1303    partial void OnLoginChanging(System.Nullable<System.DateTime> value);
1304    partial void OnLoginChanged();
1305    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
1306    partial void OnSlaveStateChanged();
1307    partial void OnCoresChanging(System.Nullable<int> value);
1308    partial void OnCoresChanged();
1309    partial void OnFreeCoresChanging(System.Nullable<int> value);
1310    partial void OnFreeCoresChanged();
1311    partial void OnFreeMemoryChanging(System.Nullable<int> value);
1312    partial void OnFreeMemoryChanged();
1313    partial void OnIsAllowedToCalculateChanging(bool value);
1314    partial void OnIsAllowedToCalculateChanged();
1315    partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture value);
1316    partial void OnCpuArchitectureChanged();
1317    partial void OnOperatingSystemChanging(string value);
1318    partial void OnOperatingSystemChanged();
1319    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
1320    partial void OnLastHeartbeatChanged();
1321    partial void OnCpuUtilizationChanging(double value);
1322    partial void OnCpuUtilizationChanged();
1323    partial void OnIsDisposableChanging(System.Nullable<bool> value);
1324    partial void OnIsDisposableChanged();
1325    #endregion
1326   
1327    public Slave()
1328    {
1329      OnCreated();
1330    }
1331   
1332    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPUSpeed", DbType="Int")]
1333    public System.Nullable<int> CpuSpeed
1334    {
1335      get
1336      {
1337        return this._CPUSpeed;
1338      }
1339      set
1340      {
1341        if ((this._CPUSpeed != value))
1342        {
1343          this.OnCpuSpeedChanging(value);
1344          this.SendPropertyChanging();
1345          this._CPUSpeed = value;
1346          this.SendPropertyChanged("CpuSpeed");
1347          this.OnCpuSpeedChanged();
1348        }
1349      }
1350    }
1351   
1352    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int")]
1353    public System.Nullable<int> Memory
1354    {
1355      get
1356      {
1357        return this._Memory;
1358      }
1359      set
1360      {
1361        if ((this._Memory != value))
1362        {
1363          this.OnMemoryChanging(value);
1364          this.SendPropertyChanging();
1365          this._Memory = value;
1366          this.SendPropertyChanged("Memory");
1367          this.OnMemoryChanged();
1368        }
1369      }
1370    }
1371   
1372    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]
1373    public System.Nullable<System.DateTime> Login
1374    {
1375      get
1376      {
1377        return this._Login;
1378      }
1379      set
1380      {
1381        if ((this._Login != value))
1382        {
1383          this.OnLoginChanging(value);
1384          this.SendPropertyChanging();
1385          this._Login = value;
1386          this.SendPropertyChanged("Login");
1387          this.OnLoginChanged();
1388        }
1389      }
1390    }
1391   
1392    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(15)", CanBeNull=true)]
1393    public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
1394    {
1395      get
1396      {
1397        return this._Status;
1398      }
1399      set
1400      {
1401        if ((this._Status != value))
1402        {
1403          this.OnSlaveStateChanging(value);
1404          this.SendPropertyChanging();
1405          this._Status = value;
1406          this.SendPropertyChanged("SlaveState");
1407          this.OnSlaveStateChanged();
1408        }
1409      }
1410    }
1411   
1412    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfCores", DbType="Int")]
1413    public System.Nullable<int> Cores
1414    {
1415      get
1416      {
1417        return this._NumberOfCores;
1418      }
1419      set
1420      {
1421        if ((this._NumberOfCores != value))
1422        {
1423          this.OnCoresChanging(value);
1424          this.SendPropertyChanging();
1425          this._NumberOfCores = value;
1426          this.SendPropertyChanged("Cores");
1427          this.OnCoresChanged();
1428        }
1429      }
1430    }
1431   
1432    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfFreeCores", DbType="Int")]
1433    public System.Nullable<int> FreeCores
1434    {
1435      get
1436      {
1437        return this._NumberOfFreeCores;
1438      }
1439      set
1440      {
1441        if ((this._NumberOfFreeCores != value))
1442        {
1443          this.OnFreeCoresChanging(value);
1444          this.SendPropertyChanging();
1445          this._NumberOfFreeCores = value;
1446          this.SendPropertyChanged("FreeCores");
1447          this.OnFreeCoresChanged();
1448        }
1449      }
1450    }
1451   
1452    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int")]
1453    public System.Nullable<int> FreeMemory
1454    {
1455      get
1456      {
1457        return this._FreeMemory;
1458      }
1459      set
1460      {
1461        if ((this._FreeMemory != value))
1462        {
1463          this.OnFreeMemoryChanging(value);
1464          this.SendPropertyChanging();
1465          this._FreeMemory = value;
1466          this.SendPropertyChanged("FreeMemory");
1467          this.OnFreeMemoryChanged();
1468        }
1469      }
1470    }
1471   
1472    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAllowedToCalculate", DbType="Bit")]
1473    public bool IsAllowedToCalculate
1474    {
1475      get
1476      {
1477        return this._IsAllowedToCalculate;
1478      }
1479      set
1480      {
1481        if ((this._IsAllowedToCalculate != value))
1482        {
1483          this.OnIsAllowedToCalculateChanging(value);
1484          this.SendPropertyChanging();
1485          this._IsAllowedToCalculate = value;
1486          this.SendPropertyChanged("IsAllowedToCalculate");
1487          this.OnIsAllowedToCalculateChanged();
1488        }
1489      }
1490    }
1491   
1492    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuArchitecture", DbType="VarChar(3)", CanBeNull=false)]
1493    public global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture CpuArchitecture
1494    {
1495      get
1496      {
1497        return this._CpuArchitecture;
1498      }
1499      set
1500      {
1501        if ((this._CpuArchitecture != value))
1502        {
1503          this.OnCpuArchitectureChanging(value);
1504          this.SendPropertyChanging();
1505          this._CpuArchitecture = value;
1506          this.SendPropertyChanged("CpuArchitecture");
1507          this.OnCpuArchitectureChanged();
1508        }
1509      }
1510    }
1511   
1512    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingSystem", DbType="VarChar(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
1513    public string OperatingSystem
1514    {
1515      get
1516      {
1517        return this._OperatingSystem;
1518      }
1519      set
1520      {
1521        if ((this._OperatingSystem != value))
1522        {
1523          this.OnOperatingSystemChanging(value);
1524          this.SendPropertyChanging();
1525          this._OperatingSystem = value;
1526          this.SendPropertyChanged("OperatingSystem");
1527          this.OnOperatingSystemChanged();
1528        }
1529      }
1530    }
1531   
1532    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
1533    public System.Nullable<System.DateTime> LastHeartbeat
1534    {
1535      get
1536      {
1537        return this._LastHeartbeat;
1538      }
1539      set
1540      {
1541        if ((this._LastHeartbeat != value))
1542        {
1543          this.OnLastHeartbeatChanging(value);
1544          this.SendPropertyChanging();
1545          this._LastHeartbeat = value;
1546          this.SendPropertyChanged("LastHeartbeat");
1547          this.OnLastHeartbeatChanged();
1548        }
1549      }
1550    }
1551   
1552    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="float")]
1553    public double CpuUtilization
1554    {
1555      get
1556      {
1557        return this._CpuUtilization;
1558      }
1559      set
1560      {
1561        if ((this._CpuUtilization != value))
1562        {
1563          this.OnCpuUtilizationChanging(value);
1564          this.SendPropertyChanging();
1565          this._CpuUtilization = value;
1566          this.SendPropertyChanged("CpuUtilization");
1567          this.OnCpuUtilizationChanged();
1568        }
1569      }
1570    }
1571   
1572    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsDisposable", DbType="Bit")]
1573    public System.Nullable<bool> IsDisposable
1574    {
1575      get
1576      {
1577        return this._IsDisposable;
1578      }
1579      set
1580      {
1581        if ((this._IsDisposable != value))
1582        {
1583          this.OnIsDisposableChanging(value);
1584          this.SendPropertyChanging();
1585          this._IsDisposable = value;
1586          this.SendPropertyChanged("IsDisposable");
1587          this.OnIsDisposableChanged();
1588        }
1589      }
1590    }
1591  }
1592 
1593  public partial class SlaveGroup : Resource
1594  {
1595   
1596    #region Extensibility Method Definitions
1597    partial void OnLoaded();
1598    partial void OnValidate(System.Data.Linq.ChangeAction action);
1599    partial void OnCreated();
1600    #endregion
1601   
1602    public SlaveGroup()
1603    {
1604      OnCreated();
1605    }
1606  }
1607 
1608  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Task")]
1609  public partial class Task : INotifyPropertyChanging, INotifyPropertyChanged
1610  {
1611   
1612    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1613   
1614    private System.Guid _JobId;
1615   
1616    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
1617   
1618    private double _ExecutionTime;
1619   
1620    private System.Nullable<System.DateTime> _LastHeartbeat;
1621   
1622    private System.Nullable<System.Guid> _ParentJobId;
1623   
1624    private int _Priority;
1625   
1626    private int _CoresNeeded;
1627   
1628    private int _MemoryNeeded;
1629   
1630    private bool _IsParentJob;
1631   
1632    private bool _FinishWhenChildJobsFinished;
1633   
1634    private global::HeuristicLab.Services.Hive.DataAccess.Command? _Command;
1635   
1636    private System.Guid _HiveExperimentId;
1637   
1638    private EntitySet<RequiredPlugin> _RequiredPlugins;
1639   
1640    private EntitySet<Task> _Jobs;
1641   
1642    private EntityRef<TaskData> _JobData;
1643   
1644    private EntitySet<StateLog> _StateLogs;
1645   
1646    private EntityRef<Task> _Job1;
1647   
1648    private EntityRef<Job> _HiveExperiment;
1649   
1650    #region Extensibility Method Definitions
1651    partial void OnLoaded();
1652    partial void OnValidate(System.Data.Linq.ChangeAction action);
1653    partial void OnCreated();
1654    partial void OnTaskIdChanging(System.Guid value);
1655    partial void OnTaskIdChanged();
1656    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
1657    partial void OnStateChanged();
1658    partial void OnExecutionTimeMsChanging(double value);
1659    partial void OnExecutionTimeMsChanged();
1660    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
1661    partial void OnLastHeartbeatChanged();
1662    partial void OnParentTaskIdChanging(System.Nullable<System.Guid> value);
1663    partial void OnParentTaskIdChanged();
1664    partial void OnPriorityChanging(int value);
1665    partial void OnPriorityChanged();
1666    partial void OnCoresNeededChanging(int value);
1667    partial void OnCoresNeededChanged();
1668    partial void OnMemoryNeededChanging(int value);
1669    partial void OnMemoryNeededChanged();
1670    partial void OnIsParentTaskChanging(bool value);
1671    partial void OnIsParentTaskChanged();
1672    partial void OnFinishWhenChildJobsFinishedChanging(bool value);
1673    partial void OnFinishWhenChildJobsFinishedChanged();
1674    partial void OnCommandChanging(global::HeuristicLab.Services.Hive.DataAccess.Command? value);
1675    partial void OnCommandChanged();
1676    partial void OnJobIdChanging(System.Guid value);
1677    partial void OnJobIdChanged();
1678    #endregion
1679   
1680    public Task()
1681    {
1682      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
1683      this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs));
1684      this._JobData = default(EntityRef<TaskData>);
1685      this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
1686      this._Job1 = default(EntityRef<Task>);
1687      this._HiveExperiment = default(EntityRef<Job>);
1688      OnCreated();
1689    }
1690   
1691    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
1692    public System.Guid TaskId
1693    {
1694      get
1695      {
1696        return this._JobId;
1697      }
1698      set
1699      {
1700        if ((this._JobId != value))
1701        {
1702          this.OnTaskIdChanging(value);
1703          this.SendPropertyChanging();
1704          this._JobId = value;
1705          this.SendPropertyChanged("TaskId");
1706          this.OnTaskIdChanged();
1707        }
1708      }
1709    }
1710   
1711    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="TaskState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)]
1712    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
1713    {
1714      get
1715      {
1716        return this._State;
1717      }
1718      set
1719      {
1720        if ((this._State != value))
1721        {
1722          this.OnStateChanging(value);
1723          this.SendPropertyChanging();
1724          this._State = value;
1725          this.SendPropertyChanged("State");
1726          this.OnStateChanged();
1727        }
1728      }
1729    }
1730   
1731    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float")]
1732    public double ExecutionTimeMs
1733    {
1734      get
1735      {
1736        return this._ExecutionTime;
1737      }
1738      set
1739      {
1740        if ((this._ExecutionTime != value))
1741        {
1742          this.OnExecutionTimeMsChanging(value);
1743          this.SendPropertyChanging();
1744          this._ExecutionTime = value;
1745          this.SendPropertyChanged("ExecutionTimeMs");
1746          this.OnExecutionTimeMsChanged();
1747        }
1748      }
1749    }
1750   
1751    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
1752    public System.Nullable<System.DateTime> LastHeartbeat
1753    {
1754      get
1755      {
1756        return this._LastHeartbeat;
1757      }
1758      set
1759      {
1760        if ((this._LastHeartbeat != value))
1761        {
1762          this.OnLastHeartbeatChanging(value);
1763          this.SendPropertyChanging();
1764          this._LastHeartbeat = value;
1765          this.SendPropertyChanged("LastHeartbeat");
1766          this.OnLastHeartbeatChanged();
1767        }
1768      }
1769    }
1770   
1771    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")]
1772    public System.Nullable<System.Guid> ParentTaskId
1773    {
1774      get
1775      {
1776        return this._ParentJobId;
1777      }
1778      set
1779      {
1780        if ((this._ParentJobId != value))
1781        {
1782          if (this._Job1.HasLoadedOrAssignedValue)
1783          {
1784            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1785          }
1786          this.OnParentTaskIdChanging(value);
1787          this.SendPropertyChanging();
1788          this._ParentJobId = value;
1789          this.SendPropertyChanged("ParentTaskId");
1790          this.OnParentTaskIdChanged();
1791        }
1792      }
1793    }
1794   
1795    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
1796    public int Priority
1797    {
1798      get
1799      {
1800        return this._Priority;
1801      }
1802      set
1803      {
1804        if ((this._Priority != value))
1805        {
1806          this.OnPriorityChanging(value);
1807          this.SendPropertyChanging();
1808          this._Priority = value;
1809          this.SendPropertyChanged("Priority");
1810          this.OnPriorityChanged();
1811        }
1812      }
1813    }
1814   
1815    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresNeeded", DbType="Int NOT NULL")]
1816    public int CoresNeeded
1817    {
1818      get
1819      {
1820        return this._CoresNeeded;
1821      }
1822      set
1823      {
1824        if ((this._CoresNeeded != value))
1825        {
1826          this.OnCoresNeededChanging(value);
1827          this.SendPropertyChanging();
1828          this._CoresNeeded = value;
1829          this.SendPropertyChanged("CoresNeeded");
1830          this.OnCoresNeededChanged();
1831        }
1832      }
1833    }
1834   
1835    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
1836    public int MemoryNeeded
1837    {
1838      get
1839      {
1840        return this._MemoryNeeded;
1841      }
1842      set
1843      {
1844        if ((this._MemoryNeeded != value))
1845        {
1846          this.OnMemoryNeededChanging(value);
1847          this.SendPropertyChanging();
1848          this._MemoryNeeded = value;
1849          this.SendPropertyChanged("MemoryNeeded");
1850          this.OnMemoryNeededChanged();
1851        }
1852      }
1853    }
1854   
1855    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsParentJob", DbType="Bit")]
1856    public bool IsParentTask
1857    {
1858      get
1859      {
1860        return this._IsParentJob;
1861      }
1862      set
1863      {
1864        if ((this._IsParentJob != value))
1865        {
1866          this.OnIsParentTaskChanging(value);
1867          this.SendPropertyChanging();
1868          this._IsParentJob = value;
1869          this.SendPropertyChanged("IsParentTask");
1870          this.OnIsParentTaskChanged();
1871        }
1872      }
1873    }
1874   
1875    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FinishWhenChildJobsFinished", DbType="Bit")]
1876    public bool FinishWhenChildJobsFinished
1877    {
1878      get
1879      {
1880        return this._FinishWhenChildJobsFinished;
1881      }
1882      set
1883      {
1884        if ((this._FinishWhenChildJobsFinished != value))
1885        {
1886          this.OnFinishWhenChildJobsFinishedChanging(value);
1887          this.SendPropertyChanging();
1888          this._FinishWhenChildJobsFinished = value;
1889          this.SendPropertyChanged("FinishWhenChildJobsFinished");
1890          this.OnFinishWhenChildJobsFinishedChanged();
1891        }
1892      }
1893    }
1894   
1895    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Command", DbType="VarChar(30)", CanBeNull=true)]
1896    public global::HeuristicLab.Services.Hive.DataAccess.Command? Command
1897    {
1898      get
1899      {
1900        return this._Command;
1901      }
1902      set
1903      {
1904        if ((this._Command != value))
1905        {
1906          this.OnCommandChanging(value);
1907          this.SendPropertyChanging();
1908          this._Command = value;
1909          this.SendPropertyChanged("Command");
1910          this.OnCommandChanged();
1911        }
1912      }
1913    }
1914   
1915    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL")]
1916    public System.Guid JobId
1917    {
1918      get
1919      {
1920        return this._HiveExperimentId;
1921      }
1922      set
1923      {
1924        if ((this._HiveExperimentId != value))
1925        {
1926          if (this._HiveExperiment.HasLoadedOrAssignedValue)
1927          {
1928            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1929          }
1930          this.OnJobIdChanging(value);
1931          this.SendPropertyChanging();
1932          this._HiveExperimentId = value;
1933          this.SendPropertyChanged("JobId");
1934          this.OnJobIdChanged();
1935        }
1936      }
1937    }
1938   
1939    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="TaskId", OtherKey="TaskId")]
1940    public EntitySet<RequiredPlugin> RequiredPlugins
1941    {
1942      get
1943      {
1944        return this._RequiredPlugins;
1945      }
1946      set
1947      {
1948        this._RequiredPlugins.Assign(value);
1949      }
1950    }
1951   
1952    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Jobs", ThisKey="TaskId", OtherKey="ParentTaskId")]
1953    public EntitySet<Task> ChildJobs
1954    {
1955      get
1956      {
1957        return this._Jobs;
1958      }
1959      set
1960      {
1961        this._Jobs.Assign(value);
1962      }
1963    }
1964   
1965    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_JobData", ThisKey="TaskId", OtherKey="TaskId", IsUnique=true, IsForeignKey=false)]
1966    public TaskData JobData
1967    {
1968      get
1969      {
1970        return this._JobData.Entity;
1971      }
1972      set
1973      {
1974        TaskData previousValue = this._JobData.Entity;
1975        if (((previousValue != value)
1976              || (this._JobData.HasLoadedOrAssignedValue == false)))
1977        {
1978          this.SendPropertyChanging();
1979          if ((previousValue != null))
1980          {
1981            this._JobData.Entity = null;
1982            previousValue.Task = null;
1983          }
1984          this._JobData.Entity = value;
1985          if ((value != null))
1986          {
1987            value.Task = this;
1988          }
1989          this.SendPropertyChanged("JobData");
1990        }
1991      }
1992    }
1993   
1994    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_StateLogs", ThisKey="TaskId", OtherKey="TaskId")]
1995    public EntitySet<StateLog> StateLogs
1996    {
1997      get
1998      {
1999        return this._StateLogs;
2000      }
2001      set
2002      {
2003        this._StateLogs.Assign(value);
2004      }
2005    }
2006   
2007    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Job1", ThisKey="ParentTaskId", OtherKey="TaskId", IsForeignKey=true)]
2008    public Task ParentJob
2009    {
2010      get
2011      {
2012        return this._Job1.Entity;
2013      }
2014      set
2015      {
2016        Task previousValue = this._Job1.Entity;
2017        if (((previousValue != value)
2018              || (this._Job1.HasLoadedOrAssignedValue == false)))
2019        {
2020          this.SendPropertyChanging();
2021          if ((previousValue != null))
2022          {
2023            this._Job1.Entity = null;
2024            previousValue.ChildJobs.Remove(this);
2025          }
2026          this._Job1.Entity = value;
2027          if ((value != null))
2028          {
2029            value.ChildJobs.Add(this);
2030            this._ParentJobId = value.TaskId;
2031          }
2032          else
2033          {
2034            this._ParentJobId = default(Nullable<System.Guid>);
2035          }
2036          this.SendPropertyChanged("ParentJob");
2037        }
2038      }
2039    }
2040   
2041    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
2042    public Job Job
2043    {
2044      get
2045      {
2046        return this._HiveExperiment.Entity;
2047      }
2048      set
2049      {
2050        Job previousValue = this._HiveExperiment.Entity;
2051        if (((previousValue != value)
2052              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
2053        {
2054          this.SendPropertyChanging();
2055          if ((previousValue != null))
2056          {
2057            this._HiveExperiment.Entity = null;
2058            previousValue.Tasks.Remove(this);
2059          }
2060          this._HiveExperiment.Entity = value;
2061          if ((value != null))
2062          {
2063            value.Tasks.Add(this);
2064            this._HiveExperimentId = value.JobId;
2065          }
2066          else
2067          {
2068            this._HiveExperimentId = default(System.Guid);
2069          }
2070          this.SendPropertyChanged("Job");
2071        }
2072      }
2073    }
2074   
2075    public event PropertyChangingEventHandler PropertyChanging;
2076   
2077    public event PropertyChangedEventHandler PropertyChanged;
2078   
2079    protected virtual void SendPropertyChanging()
2080    {
2081      if ((this.PropertyChanging != null))
2082      {
2083        this.PropertyChanging(this, emptyChangingEventArgs);
2084      }
2085    }
2086   
2087    protected virtual void SendPropertyChanged(String propertyName)
2088    {
2089      if ((this.PropertyChanged != null))
2090      {
2091        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2092      }
2093    }
2094   
2095    private void attach_RequiredPlugins(RequiredPlugin entity)
2096    {
2097      this.SendPropertyChanging();
2098      entity.Task = this;
2099    }
2100   
2101    private void detach_RequiredPlugins(RequiredPlugin entity)
2102    {
2103      this.SendPropertyChanging();
2104      entity.Task = null;
2105    }
2106   
2107    private void attach_Jobs(Task entity)
2108    {
2109      this.SendPropertyChanging();
2110      entity.ParentJob = this;
2111    }
2112   
2113    private void detach_Jobs(Task entity)
2114    {
2115      this.SendPropertyChanging();
2116      entity.ParentJob = null;
2117    }
2118   
2119    private void attach_StateLogs(StateLog entity)
2120    {
2121      this.SendPropertyChanging();
2122      entity.Task = this;
2123    }
2124   
2125    private void detach_StateLogs(StateLog entity)
2126    {
2127      this.SendPropertyChanging();
2128      entity.Task = null;
2129    }
2130  }
2131 
2132  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Downtime")]
2133  public partial class Downtime : INotifyPropertyChanging, INotifyPropertyChanged
2134  {
2135   
2136    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2137   
2138    private System.Guid _UptimeCalendarId;
2139   
2140    private System.Guid _ResourceId;
2141   
2142    private System.DateTime _StartDate;
2143   
2144    private System.DateTime _EndDate;
2145   
2146    private bool _AllDayEvent;
2147   
2148    private bool _Recurring;
2149   
2150    private System.Guid _RecurringId;
2151   
2152    private global::HeuristicLab.Services.Hive.DataAccess.DowntimeType _Type;
2153   
2154    private EntityRef<Resource> _Resource;
2155   
2156    #region Extensibility Method Definitions
2157    partial void OnLoaded();
2158    partial void OnValidate(System.Data.Linq.ChangeAction action);
2159    partial void OnCreated();
2160    partial void OnDowntimeIdChanging(System.Guid value);
2161    partial void OnDowntimeIdChanged();
2162    partial void OnResourceIdChanging(System.Guid value);
2163    partial void OnResourceIdChanged();
2164    partial void OnStartDateChanging(System.DateTime value);
2165    partial void OnStartDateChanged();
2166    partial void OnEndDateChanging(System.DateTime value);
2167    partial void OnEndDateChanged();
2168    partial void OnAllDayEventChanging(bool value);
2169    partial void OnAllDayEventChanged();
2170    partial void OnRecurringChanging(bool value);
2171    partial void OnRecurringChanged();
2172    partial void OnRecurringIdChanging(System.Guid value);
2173    partial void OnRecurringIdChanged();
2174    partial void OnDowntimeTypeChanging(global::HeuristicLab.Services.Hive.DataAccess.DowntimeType value);
2175    partial void OnDowntimeTypeChanged();
2176    #endregion
2177   
2178    public Downtime()
2179    {
2180      this._Resource = default(EntityRef<Resource>);
2181      OnCreated();
2182    }
2183   
2184    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier", IsPrimaryKey=true, IsDbGenerated=true)]
2185    public System.Guid DowntimeId
2186    {
2187      get
2188      {
2189        return this._UptimeCalendarId;
2190      }
2191      set
2192      {
2193        if ((this._UptimeCalendarId != value))
2194        {
2195          this.OnDowntimeIdChanging(value);
2196          this.SendPropertyChanging();
2197          this._UptimeCalendarId = value;
2198          this.SendPropertyChanged("DowntimeId");
2199          this.OnDowntimeIdChanged();
2200        }
2201      }
2202    }
2203   
2204    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
2205    public System.Guid ResourceId
2206    {
2207      get
2208      {
2209        return this._ResourceId;
2210      }
2211      set
2212      {
2213        if ((this._ResourceId != value))
2214        {
2215          if (this._Resource.HasLoadedOrAssignedValue)
2216          {
2217            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2218          }
2219          this.OnResourceIdChanging(value);
2220          this.SendPropertyChanging();
2221          this._ResourceId = value;
2222          this.SendPropertyChanged("ResourceId");
2223          this.OnResourceIdChanged();
2224        }
2225      }
2226    }
2227   
2228    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")]
2229    public System.DateTime StartDate
2230    {
2231      get
2232      {
2233        return this._StartDate;
2234      }
2235      set
2236      {
2237        if ((this._StartDate != value))
2238        {
2239          this.OnStartDateChanging(value);
2240          this.SendPropertyChanging();
2241          this._StartDate = value;
2242          this.SendPropertyChanged("StartDate");
2243          this.OnStartDateChanged();
2244        }
2245      }
2246    }
2247   
2248    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")]
2249    public System.DateTime EndDate
2250    {
2251      get
2252      {
2253        return this._EndDate;
2254      }
2255      set
2256      {
2257        if ((this._EndDate != value))
2258        {
2259          this.OnEndDateChanging(value);
2260          this.SendPropertyChanging();
2261          this._EndDate = value;
2262          this.SendPropertyChanged("EndDate");
2263          this.OnEndDateChanged();
2264        }
2265      }
2266    }
2267   
2268    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AllDayEvent", DbType="Bit")]
2269    public bool AllDayEvent
2270    {
2271      get
2272      {
2273        return this._AllDayEvent;
2274      }
2275      set
2276      {
2277        if ((this._AllDayEvent != value))
2278        {
2279          this.OnAllDayEventChanging(value);
2280          this.SendPropertyChanging();
2281          this._AllDayEvent = value;
2282          this.SendPropertyChanged("AllDayEvent");
2283          this.OnAllDayEventChanged();
2284        }
2285      }
2286    }
2287   
2288    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Recurring", DbType="Bit")]
2289    public bool Recurring
2290    {
2291      get
2292      {
2293        return this._Recurring;
2294      }
2295      set
2296      {
2297        if ((this._Recurring != value))
2298        {
2299          this.OnRecurringChanging(value);
2300          this.SendPropertyChanging();
2301          this._Recurring = value;
2302          this.SendPropertyChanged("Recurring");
2303          this.OnRecurringChanged();
2304        }
2305      }
2306    }
2307   
2308    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecurringId", DbType="UniqueIdentifier")]
2309    public System.Guid RecurringId
2310    {
2311      get
2312      {
2313        return this._RecurringId;
2314      }
2315      set
2316      {
2317        if ((this._RecurringId != value))
2318        {
2319          this.OnRecurringIdChanging(value);
2320          this.SendPropertyChanging();
2321          this._RecurringId = value;
2322          this.SendPropertyChanged("RecurringId");
2323          this.OnRecurringIdChanged();
2324        }
2325      }
2326    }
2327   
2328    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="VarChar(MAX)", CanBeNull=false)]
2329    public global::HeuristicLab.Services.Hive.DataAccess.DowntimeType DowntimeType
2330    {
2331      get
2332      {
2333        return this._Type;
2334      }
2335      set
2336      {
2337        if ((this._Type != value))
2338        {
2339          this.OnDowntimeTypeChanging(value);
2340          this.SendPropertyChanging();
2341          this._Type = value;
2342          this.SendPropertyChanged("DowntimeType");
2343          this.OnDowntimeTypeChanged();
2344        }
2345      }
2346    }
2347   
2348    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
2349    public Resource Resource
2350    {
2351      get
2352      {
2353        return this._Resource.Entity;
2354      }
2355      set
2356      {
2357        Resource previousValue = this._Resource.Entity;
2358        if (((previousValue != value)
2359              || (this._Resource.HasLoadedOrAssignedValue == false)))
2360        {
2361          this.SendPropertyChanging();
2362          if ((previousValue != null))
2363          {
2364            this._Resource.Entity = null;
2365            previousValue.Downtimes.Remove(this);
2366          }
2367          this._Resource.Entity = value;
2368          if ((value != null))
2369          {
2370            value.Downtimes.Add(this);
2371            this._ResourceId = value.ResourceId;
2372          }
2373          else
2374          {
2375            this._ResourceId = default(System.Guid);
2376          }
2377          this.SendPropertyChanged("Resource");
2378        }
2379      }
2380    }
2381   
2382    public event PropertyChangingEventHandler PropertyChanging;
2383   
2384    public event PropertyChangedEventHandler PropertyChanged;
2385   
2386    protected virtual void SendPropertyChanging()
2387    {
2388      if ((this.PropertyChanging != null))
2389      {
2390        this.PropertyChanging(this, emptyChangingEventArgs);
2391      }
2392    }
2393   
2394    protected virtual void SendPropertyChanged(String propertyName)
2395    {
2396      if ((this.PropertyChanged != null))
2397      {
2398        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2399      }
2400    }
2401  }
2402 
2403  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Job")]
2404  public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
2405  {
2406   
2407    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2408   
2409    private System.Guid _HiveExperimentId;
2410   
2411    private string _Name;
2412   
2413    private string _Description;
2414   
2415    private string _ResourceIds;
2416   
2417    private System.Guid _UserId;
2418   
2419    private System.DateTime _DateCreated;
2420   
2421    private System.Guid _ProjectId;
2422   
2423    private EntitySet<Task> _Jobs;
2424   
2425    private EntitySet<JobPermission> _HiveExperimentPermissions;
2426   
2427    private EntityRef<Project> _Project;
2428   
2429    #region Extensibility Method Definitions
2430    partial void OnLoaded();
2431    partial void OnValidate(System.Data.Linq.ChangeAction action);
2432    partial void OnCreated();
2433    partial void OnJobIdChanging(System.Guid value);
2434    partial void OnJobIdChanged();
2435    partial void OnNameChanging(string value);
2436    partial void OnNameChanged();
2437    partial void OnDescriptionChanging(string value);
2438    partial void OnDescriptionChanged();
2439    partial void OnResourceIdsChanging(string value);
2440    partial void OnResourceIdsChanged();
2441    partial void OnOwnerUserIdChanging(System.Guid value);
2442    partial void OnOwnerUserIdChanged();
2443    partial void OnDateCreatedChanging(System.DateTime value);
2444    partial void OnDateCreatedChanged();
2445    partial void OnProjectIdChanging(System.Guid value);
2446    partial void OnProjectIdChanged();
2447    #endregion
2448   
2449    public Job()
2450    {
2451      this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs));
2452      this._HiveExperimentPermissions = new EntitySet<JobPermission>(new Action<JobPermission>(this.attach_HiveExperimentPermissions), new Action<JobPermission>(this.detach_HiveExperimentPermissions));
2453      this._Project = default(EntityRef<Project>);
2454      OnCreated();
2455    }
2456   
2457    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2458    public System.Guid JobId
2459    {
2460      get
2461      {
2462        return this._HiveExperimentId;
2463      }
2464      set
2465      {
2466        if ((this._HiveExperimentId != value))
2467        {
2468          this.OnJobIdChanging(value);
2469          this.SendPropertyChanging();
2470          this._HiveExperimentId = value;
2471          this.SendPropertyChanged("JobId");
2472          this.OnJobIdChanged();
2473        }
2474      }
2475    }
2476   
2477    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
2478    public string Name
2479    {
2480      get
2481      {
2482        return this._Name;
2483      }
2484      set
2485      {
2486        if ((this._Name != value))
2487        {
2488          this.OnNameChanging(value);
2489          this.SendPropertyChanging();
2490          this._Name = value;
2491          this.SendPropertyChanged("Name");
2492          this.OnNameChanged();
2493        }
2494      }
2495    }
2496   
2497    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="VarChar(MAX)")]
2498    public string Description
2499    {
2500      get
2501      {
2502        return this._Description;
2503      }
2504      set
2505      {
2506        if ((this._Description != value))
2507        {
2508          this.OnDescriptionChanging(value);
2509          this.SendPropertyChanging();
2510          this._Description = value;
2511          this.SendPropertyChanged("Description");
2512          this.OnDescriptionChanged();
2513        }
2514      }
2515    }
2516   
2517    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceIds", DbType="VarChar(MAX)")]
2518    public string ResourceIds
2519    {
2520      get
2521      {
2522        return this._ResourceIds;
2523      }
2524      set
2525      {
2526        if ((this._ResourceIds != value))
2527        {
2528          this.OnResourceIdsChanging(value);
2529          this.SendPropertyChanging();
2530          this._ResourceIds = value;
2531          this.SendPropertyChanged("ResourceIds");
2532          this.OnResourceIdsChanged();
2533        }
2534      }
2535    }
2536   
2537    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
2538    public System.Guid OwnerUserId
2539    {
2540      get
2541      {
2542        return this._UserId;
2543      }
2544      set
2545      {
2546        if ((this._UserId != value))
2547        {
2548          this.OnOwnerUserIdChanging(value);
2549          this.SendPropertyChanging();
2550          this._UserId = value;
2551          this.SendPropertyChanged("OwnerUserId");
2552          this.OnOwnerUserIdChanged();
2553        }
2554      }
2555    }
2556   
2557    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
2558    public System.DateTime DateCreated
2559    {
2560      get
2561      {
2562        return this._DateCreated;
2563      }
2564      set
2565      {
2566        if ((this._DateCreated != value))
2567        {
2568          this.OnDateCreatedChanging(value);
2569          this.SendPropertyChanging();
2570          this._DateCreated = value;
2571          this.SendPropertyChanged("DateCreated");
2572          this.OnDateCreatedChanged();
2573        }
2574      }
2575    }
2576   
2577    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="UniqueIdentifier NOT NULL")]
2578    public System.Guid ProjectId
2579    {
2580      get
2581      {
2582        return this._ProjectId;
2583      }
2584      set
2585      {
2586        if ((this._ProjectId != value))
2587        {
2588          if (this._Project.HasLoadedOrAssignedValue)
2589          {
2590            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2591          }
2592          this.OnProjectIdChanging(value);
2593          this.SendPropertyChanging();
2594          this._ProjectId = value;
2595          this.SendPropertyChanged("ProjectId");
2596          this.OnProjectIdChanged();
2597        }
2598      }
2599    }
2600   
2601    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_Jobs", ThisKey="JobId", OtherKey="JobId")]
2602    public EntitySet<Task> Tasks
2603    {
2604      get
2605      {
2606        return this._Jobs;
2607      }
2608      set
2609      {
2610        this._Jobs.Assign(value);
2611      }
2612    }
2613   
2614    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperimentPermissions", ThisKey="JobId", OtherKey="JobId")]
2615    public EntitySet<JobPermission> JobPermissions
2616    {
2617      get
2618      {
2619        return this._HiveExperimentPermissions;
2620      }
2621      set
2622      {
2623        this._HiveExperimentPermissions.Assign(value);
2624      }
2625    }
2626   
2627    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Job", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
2628    public Project Project
2629    {
2630      get
2631      {
2632        return this._Project.Entity;
2633      }
2634      set
2635      {
2636        Project previousValue = this._Project.Entity;
2637        if (((previousValue != value)
2638              || (this._Project.HasLoadedOrAssignedValue == false)))
2639        {
2640          this.SendPropertyChanging();
2641          if ((previousValue != null))
2642          {
2643            this._Project.Entity = null;
2644            previousValue.Jobs.Remove(this);
2645          }
2646          this._Project.Entity = value;
2647          if ((value != null))
2648          {
2649            value.Jobs.Add(this);
2650            this._ProjectId = value.ProjectId;
2651          }
2652          else
2653          {
2654            this._ProjectId = default(System.Guid);
2655          }
2656          this.SendPropertyChanged("Project");
2657        }
2658      }
2659    }
2660   
2661    public event PropertyChangingEventHandler PropertyChanging;
2662   
2663    public event PropertyChangedEventHandler PropertyChanged;
2664   
2665    protected virtual void SendPropertyChanging()
2666    {
2667      if ((this.PropertyChanging != null))
2668      {
2669        this.PropertyChanging(this, emptyChangingEventArgs);
2670      }
2671    }
2672   
2673    protected virtual void SendPropertyChanged(String propertyName)
2674    {
2675      if ((this.PropertyChanged != null))
2676      {
2677        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2678      }
2679    }
2680   
2681    private void attach_Jobs(Task entity)
2682    {
2683      this.SendPropertyChanging();
2684      entity.Job = this;
2685    }
2686   
2687    private void detach_Jobs(Task entity)
2688    {
2689      this.SendPropertyChanging();
2690      entity.Job = null;
2691    }
2692   
2693    private void attach_HiveExperimentPermissions(JobPermission entity)
2694    {
2695      this.SendPropertyChanging();
2696      entity.Job = this;
2697    }
2698   
2699    private void detach_HiveExperimentPermissions(JobPermission entity)
2700    {
2701      this.SendPropertyChanging();
2702      entity.Job = null;
2703    }
2704  }
2705 
2706  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.TaskData")]
2707  public partial class TaskData : INotifyPropertyChanging, INotifyPropertyChanged
2708  {
2709   
2710    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2711   
2712    private System.Guid _JobId;
2713   
2714    private System.Data.Linq.Link<byte[]> _Data;
2715   
2716    private System.DateTime _LastUpdate;
2717   
2718    private EntityRef<Task> _Job;
2719   
2720    #region Extensibility Method Definitions
2721    partial void OnLoaded();
2722    partial void OnValidate(System.Data.Linq.ChangeAction action);
2723    partial void OnCreated();
2724    partial void OnTaskIdChanging(System.Guid value);
2725    partial void OnTaskIdChanged();
2726    partial void OnDataChanging(byte[] value);
2727    partial void OnDataChanged();
2728    partial void OnLastUpdateChanging(System.DateTime value);
2729    partial void OnLastUpdateChanged();
2730    #endregion
2731   
2732    public TaskData()
2733    {
2734      this._Job = default(EntityRef<Task>);
2735      OnCreated();
2736    }
2737   
2738    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
2739    public System.Guid TaskId
2740    {
2741      get
2742      {
2743        return this._JobId;
2744      }
2745      set
2746      {
2747        if ((this._JobId != value))
2748        {
2749          if (this._Job.HasLoadedOrAssignedValue)
2750          {
2751            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2752          }
2753          this.OnTaskIdChanging(value);
2754          this.SendPropertyChanging();
2755          this._JobId = value;
2756          this.SendPropertyChanged("TaskId");
2757          this.OnTaskIdChanged();
2758        }
2759      }
2760    }
2761   
2762    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2763    public byte[] Data
2764    {
2765      get
2766      {
2767        return this._Data.Value;
2768      }
2769      set
2770      {
2771        if ((this._Data.Value != value))
2772        {
2773          this.OnDataChanging(value);
2774          this.SendPropertyChanging();
2775          this._Data.Value = value;
2776          this.SendPropertyChanged("Data");
2777          this.OnDataChanged();
2778        }
2779      }
2780    }
2781   
2782    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastUpdate", DbType="DateTime")]
2783    public System.DateTime LastUpdate
2784    {
2785      get
2786      {
2787        return this._LastUpdate;
2788      }
2789      set
2790      {
2791        if ((this._LastUpdate != value))
2792        {
2793          this.OnLastUpdateChanging(value);
2794          this.SendPropertyChanging();
2795          this._LastUpdate = value;
2796          this.SendPropertyChanged("LastUpdate");
2797          this.OnLastUpdateChanged();
2798        }
2799      }
2800    }
2801   
2802    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
2803    public Task Task
2804    {
2805      get
2806      {
2807        return this._Job.Entity;
2808      }
2809      set
2810      {
2811        Task previousValue = this._Job.Entity;
2812        if (((previousValue != value)
2813              || (this._Job.HasLoadedOrAssignedValue == false)))
2814        {
2815          this.SendPropertyChanging();
2816          if ((previousValue != null))
2817          {
2818            this._Job.Entity = null;
2819            previousValue.JobData = null;
2820          }
2821          this._Job.Entity = value;
2822          if ((value != null))
2823          {
2824            value.JobData = this;
2825            this._JobId = value.TaskId;
2826          }
2827          else
2828          {
2829            this._JobId = default(System.Guid);
2830          }
2831          this.SendPropertyChanged("Task");
2832        }
2833      }
2834    }
2835   
2836    public event PropertyChangingEventHandler PropertyChanging;
2837   
2838    public event PropertyChangedEventHandler PropertyChanged;
2839   
2840    protected virtual void SendPropertyChanging()
2841    {
2842      if ((this.PropertyChanging != null))
2843      {
2844        this.PropertyChanging(this, emptyChangingEventArgs);
2845      }
2846    }
2847   
2848    protected virtual void SendPropertyChanged(String propertyName)
2849    {
2850      if ((this.PropertyChanged != null))
2851      {
2852        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2853      }
2854    }
2855  }
2856 
2857  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginData")]
2858  public partial class PluginData : INotifyPropertyChanging, INotifyPropertyChanged
2859  {
2860   
2861    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2862   
2863    private System.Guid _PluginDataId;
2864   
2865    private System.Guid _PluginId;
2866   
2867    private System.Data.Linq.Link<byte[]> _Data;
2868   
2869    private string _FileName;
2870   
2871    private EntityRef<Plugin> _Plugin;
2872   
2873    #region Extensibility Method Definitions
2874    partial void OnLoaded();
2875    partial void OnValidate(System.Data.Linq.ChangeAction action);
2876    partial void OnCreated();
2877    partial void OnPluginDataIdChanging(System.Guid value);
2878    partial void OnPluginDataIdChanged();
2879    partial void OnPluginIdChanging(System.Guid value);
2880    partial void OnPluginIdChanged();
2881    partial void OnDataChanging(byte[] value);
2882    partial void OnDataChanged();
2883    partial void OnFileNameChanging(string value);
2884    partial void OnFileNameChanged();
2885    #endregion
2886   
2887    public PluginData()
2888    {
2889      this._Plugin = default(EntityRef<Plugin>);
2890      OnCreated();
2891    }
2892   
2893    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginDataId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2894    public System.Guid PluginDataId
2895    {
2896      get
2897      {
2898        return this._PluginDataId;
2899      }
2900      set
2901      {
2902        if ((this._PluginDataId != value))
2903        {
2904          this.OnPluginDataIdChanging(value);
2905          this.SendPropertyChanging();
2906          this._PluginDataId = value;
2907          this.SendPropertyChanged("PluginDataId");
2908          this.OnPluginDataIdChanged();
2909        }
2910      }
2911    }
2912   
2913    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
2914    public System.Guid PluginId
2915    {
2916      get
2917      {
2918        return this._PluginId;
2919      }
2920      set
2921      {
2922        if ((this._PluginId != value))
2923        {
2924          if (this._Plugin.HasLoadedOrAssignedValue)
2925          {
2926            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2927          }
2928          this.OnPluginIdChanging(value);
2929          this.SendPropertyChanging();
2930          this._PluginId = value;
2931          this.SendPropertyChanged("PluginId");
2932          this.OnPluginIdChanged();
2933        }
2934      }
2935    }
2936   
2937    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2938    public byte[] Data
2939    {
2940      get
2941      {
2942        return this._Data.Value;
2943      }
2944      set
2945      {
2946        if ((this._Data.Value != value))
2947        {
2948          this.OnDataChanging(value);
2949          this.SendPropertyChanging();
2950          this._Data.Value = value;
2951          this.SendPropertyChanged("Data");
2952          this.OnDataChanged();
2953        }
2954      }
2955    }
2956   
2957    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="VarChar(MAX)", CanBeNull=false)]
2958    public string FileName
2959    {
2960      get
2961      {
2962        return this._FileName;
2963      }
2964      set
2965      {
2966        if ((this._FileName != value))
2967        {
2968          this.OnFileNameChanging(value);
2969          this.SendPropertyChanging();
2970          this._FileName = value;
2971          this.SendPropertyChanged("FileName");
2972          this.OnFileNameChanged();
2973        }
2974      }
2975    }
2976   
2977    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_Plugin", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true)]
2978    public Plugin Plugin
2979    {
2980      get
2981      {
2982        return this._Plugin.Entity;
2983      }
2984      set
2985      {
2986        Plugin previousValue = this._Plugin.Entity;
2987        if (((previousValue != value)
2988              || (this._Plugin.HasLoadedOrAssignedValue == false)))
2989        {
2990          this.SendPropertyChanging();
2991          if ((previousValue != null))
2992          {
2993            this._Plugin.Entity = null;
2994            previousValue.PluginData.Remove(this);
2995          }
2996          this._Plugin.Entity = value;
2997          if ((value != null))
2998          {
2999            value.PluginData.Add(this);
3000            this._PluginId = value.PluginId;
3001          }
3002          else
3003          {
3004            this._PluginId = default(System.Guid);
3005          }
3006          this.SendPropertyChanged("Plugin");
3007        }
3008      }
3009    }
3010   
3011    public event PropertyChangingEventHandler PropertyChanging;
3012   
3013    public event PropertyChangedEventHandler PropertyChanged;
3014   
3015    protected virtual void SendPropertyChanging()
3016    {
3017      if ((this.PropertyChanging != null))
3018      {
3019        this.PropertyChanging(this, emptyChangingEventArgs);
3020      }
3021    }
3022   
3023    protected virtual void SendPropertyChanged(String propertyName)
3024    {
3025      if ((this.PropertyChanged != null))
3026      {
3027        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3028      }
3029    }
3030  }
3031 
3032  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.StateLog")]
3033  public partial class StateLog : INotifyPropertyChanging, INotifyPropertyChanged
3034  {
3035   
3036    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3037   
3038    private System.Guid _StateLogId;
3039   
3040    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
3041   
3042    private System.DateTime _DateTime;
3043   
3044    private System.Guid _JobId;
3045   
3046    private System.Nullable<System.Guid> _UserId;
3047   
3048    private System.Nullable<System.Guid> _SlaveId;
3049   
3050    private string _Exception;
3051   
3052    private EntityRef<Task> _Job;
3053   
3054    private EntityRef<Resource> _Resource;
3055   
3056    #region Extensibility Method Definitions
3057    partial void OnLoaded();
3058    partial void OnValidate(System.Data.Linq.ChangeAction action);
3059    partial void OnCreated();
3060    partial void OnStateLogIdChanging(System.Guid value);
3061    partial void OnStateLogIdChanged();
3062    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
3063    partial void OnStateChanged();
3064    partial void OnDateTimeChanging(System.DateTime value);
3065    partial void OnDateTimeChanged();
3066    partial void OnTaskIdChanging(System.Guid value);
3067    partial void OnTaskIdChanged();
3068    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
3069    partial void OnUserIdChanged();
3070    partial void OnSlaveIdChanging(System.Nullable<System.Guid> value);
3071    partial void OnSlaveIdChanged();
3072    partial void OnExceptionChanging(string value);
3073    partial void OnExceptionChanged();
3074    #endregion
3075   
3076    public StateLog()
3077    {
3078      this._Job = default(EntityRef<Task>);
3079      this._Resource = default(EntityRef<Resource>);
3080      OnCreated();
3081    }
3082   
3083    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StateLogId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
3084    public System.Guid StateLogId
3085    {
3086      get
3087      {
3088        return this._StateLogId;
3089      }
3090      set
3091      {
3092        if ((this._StateLogId != value))
3093        {
3094          this.OnStateLogIdChanging(value);
3095          this.SendPropertyChanging();
3096          this._StateLogId = value;
3097          this.SendPropertyChanged("StateLogId");
3098          this.OnStateLogIdChanged();
3099        }
3100      }
3101    }
3102   
3103    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
3104    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
3105    {
3106      get
3107      {
3108        return this._State;
3109      }
3110      set
3111      {
3112        if ((this._State != value))
3113        {
3114          this.OnStateChanging(value);
3115          this.SendPropertyChanging();
3116          this._State = value;
3117          this.SendPropertyChanged("State");
3118          this.OnStateChanged();
3119        }
3120      }
3121    }
3122   
3123    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateTime", DbType="DateTime NOT NULL")]
3124    public System.DateTime DateTime
3125    {
3126      get
3127      {
3128        return this._DateTime;
3129      }
3130      set
3131      {
3132        if ((this._DateTime != value))
3133        {
3134          this.OnDateTimeChanging(value);
3135          this.SendPropertyChanging();
3136          this._DateTime = value;
3137          this.SendPropertyChanged("DateTime");
3138          this.OnDateTimeChanged();
3139        }
3140      }
3141    }
3142   
3143    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
3144    public System.Guid TaskId
3145    {
3146      get
3147      {
3148        return this._JobId;
3149      }
3150      set
3151      {
3152        if ((this._JobId != value))
3153        {
3154          if (this._Job.HasLoadedOrAssignedValue)
3155          {
3156            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3157          }
3158          this.OnTaskIdChanging(value);
3159          this.SendPropertyChanging();
3160          this._JobId = value;
3161          this.SendPropertyChanged("TaskId");
3162          this.OnTaskIdChanged();
3163        }
3164      }
3165    }
3166   
3167    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
3168    public System.Nullable<System.Guid> UserId
3169    {
3170      get
3171      {
3172        return this._UserId;
3173      }
3174      set
3175      {
3176        if ((this._UserId != value))
3177        {
3178          this.OnUserIdChanging(value);
3179          this.SendPropertyChanging();
3180          this._UserId = value;
3181          this.SendPropertyChanged("UserId");
3182          this.OnUserIdChanged();
3183        }
3184      }
3185    }
3186   
3187    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier")]
3188    public System.Nullable<System.Guid> SlaveId
3189    {
3190      get
3191      {
3192        return this._SlaveId;
3193      }
3194      set
3195      {
3196        if ((this._SlaveId != value))
3197        {
3198          if (this._Resource.HasLoadedOrAssignedValue)
3199          {
3200            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3201          }
3202          this.OnSlaveIdChanging(value);
3203          this.SendPropertyChanging();
3204          this._SlaveId = value;
3205          this.SendPropertyChanged("SlaveId");
3206          this.OnSlaveIdChanged();
3207        }
3208      }
3209    }
3210   
3211    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)", CanBeNull=false)]
3212    public string Exception
3213    {
3214      get
3215      {
3216        return this._Exception;
3217      }
3218      set
3219      {
3220        if ((this._Exception != value))
3221        {
3222          this.OnExceptionChanging(value);
3223          this.SendPropertyChanging();
3224          this._Exception = value;
3225          this.SendPropertyChanged("Exception");
3226          this.OnExceptionChanged();
3227        }
3228      }
3229    }
3230   
3231    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
3232    public Task Task
3233    {
3234      get
3235      {
3236        return this._Job.Entity;
3237      }
3238      set
3239      {
3240        Task previousValue = this._Job.Entity;
3241        if (((previousValue != value)
3242              || (this._Job.HasLoadedOrAssignedValue == false)))
3243        {
3244          this.SendPropertyChanging();
3245          if ((previousValue != null))
3246          {
3247            this._Job.Entity = null;
3248            previousValue.StateLogs.Remove(this);
3249          }
3250          this._Job.Entity = value;
3251          if ((value != null))
3252          {
3253            value.StateLogs.Add(this);
3254            this._JobId = value.TaskId;
3255          }
3256          else
3257          {
3258            this._JobId = default(System.Guid);
3259          }
3260          this.SendPropertyChanged("Task");
3261        }
3262      }
3263    }
3264   
3265    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_Resource", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true)]
3266    public Resource Resource
3267    {
3268      get
3269      {
3270        return this._Resource.Entity;
3271      }
3272      set
3273      {
3274        Resource previousValue = this._Resource.Entity;
3275        if (((previousValue != value)
3276              || (this._Resource.HasLoadedOrAssignedValue == false)))
3277        {
3278          this.SendPropertyChanging();
3279          if ((previousValue != null))
3280          {
3281            this._Resource.Entity = null;
3282            previousValue.StateLogs.Remove(this);
3283          }
3284          this._Resource.Entity = value;
3285          if ((value != null))
3286          {
3287            value.StateLogs.Add(this);
3288            this._SlaveId = value.ResourceId;
3289          }
3290          else
3291          {
3292            this._SlaveId = default(Nullable<System.Guid>);
3293          }
3294          this.SendPropertyChanged("Resource");
3295        }
3296      }
3297    }
3298   
3299    public event PropertyChangingEventHandler PropertyChanging;
3300   
3301    public event PropertyChangedEventHandler PropertyChanged;
3302   
3303    protected virtual void SendPropertyChanging()
3304    {
3305      if ((this.PropertyChanging != null))
3306      {
3307        this.PropertyChanging(this, emptyChangingEventArgs);
3308      }
3309    }
3310   
3311    protected virtual void SendPropertyChanged(String propertyName)
3312    {
3313      if ((this.PropertyChanged != null))
3314      {
3315        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3316      }
3317    }
3318  }
3319 
3320  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JobPermission")]
3321  public partial class JobPermission : INotifyPropertyChanging, INotifyPropertyChanged
3322  {
3323   
3324    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3325   
3326    private System.Guid _HiveExperimentId;
3327   
3328    private System.Guid _GrantedUserId;
3329   
3330    private System.Guid _GrantedByUserId;
3331   
3332    private global::HeuristicLab.Services.Hive.DataAccess.Permission _Permission;
3333   
3334    private EntityRef<Job> _HiveExperiment;
3335   
3336    #region Extensibility Method Definitions
3337    partial void OnLoaded();
3338    partial void OnValidate(System.Data.Linq.ChangeAction action);
3339    partial void OnCreated();
3340    partial void OnJobIdChanging(System.Guid value);
3341    partial void OnJobIdChanged();
3342    partial void OnGrantedUserIdChanging(System.Guid value);
3343    partial void OnGrantedUserIdChanged();
3344    partial void OnGrantedByUserIdChanging(System.Guid value);
3345    partial void OnGrantedByUserIdChanged();
3346    partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.DataAccess.Permission value);
3347    partial void OnPermissionChanged();
3348    #endregion
3349   
3350    public JobPermission()
3351    {
3352      this._HiveExperiment = default(EntityRef<Job>);
3353      OnCreated();
3354    }
3355   
3356    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3357    public System.Guid JobId
3358    {
3359      get
3360      {
3361        return this._HiveExperimentId;
3362      }
3363      set
3364      {
3365        if ((this._HiveExperimentId != value))
3366        {
3367          if (this._HiveExperiment.HasLoadedOrAssignedValue)
3368          {
3369            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3370          }
3371          this.OnJobIdChanging(value);
3372          this.SendPropertyChanging();
3373          this._HiveExperimentId = value;
3374          this.SendPropertyChanged("JobId");
3375          this.OnJobIdChanged();
3376        }
3377      }
3378    }
3379   
3380    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3381    public System.Guid GrantedUserId
3382    {
3383      get
3384      {
3385        return this._GrantedUserId;
3386      }
3387      set
3388      {
3389        if ((this._GrantedUserId != value))
3390        {
3391          this.OnGrantedUserIdChanging(value);
3392          this.SendPropertyChanging();
3393          this._GrantedUserId = value;
3394          this.SendPropertyChanged("GrantedUserId");
3395          this.OnGrantedUserIdChanged();
3396        }
3397      }
3398    }
3399   
3400    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
3401    public System.Guid GrantedByUserId
3402    {
3403      get
3404      {
3405        return this._GrantedByUserId;
3406      }
3407      set
3408      {
3409        if ((this._GrantedByUserId != value))
3410        {
3411          this.OnGrantedByUserIdChanging(value);
3412          this.SendPropertyChanging();
3413          this._GrantedByUserId = value;
3414          this.SendPropertyChanged("GrantedByUserId");
3415          this.OnGrantedByUserIdChanged();
3416        }
3417      }
3418    }
3419   
3420    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)]
3421    public global::HeuristicLab.Services.Hive.DataAccess.Permission Permission
3422    {
3423      get
3424      {
3425        return this._Permission;
3426      }
3427      set
3428      {
3429        if ((this._Permission != value))
3430        {
3431          this.OnPermissionChanging(value);
3432          this.SendPropertyChanging();
3433          this._Permission = value;
3434          this.SendPropertyChanged("Permission");
3435          this.OnPermissionChanged();
3436        }
3437      }
3438    }
3439   
3440    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
3441    public Job Job
3442    {
3443      get
3444      {
3445        return this._HiveExperiment.Entity;
3446      }
3447      set
3448      {
3449        Job previousValue = this._HiveExperiment.Entity;
3450        if (((previousValue != value)
3451              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
3452        {
3453          this.SendPropertyChanging();
3454          if ((previousValue != null))
3455          {
3456            this._HiveExperiment.Entity = null;
3457            previousValue.JobPermissions.Remove(this);
3458          }
3459          this._HiveExperiment.Entity = value;
3460          if ((value != null))
3461          {
3462            value.JobPermissions.Add(this);
3463            this._HiveExperimentId = value.JobId;
3464          }
3465          else
3466          {
3467            this._HiveExperimentId = default(System.Guid);
3468          }
3469          this.SendPropertyChanged("Job");
3470        }
3471      }
3472    }
3473   
3474    public event PropertyChangingEventHandler PropertyChanging;
3475   
3476    public event PropertyChangedEventHandler PropertyChanged;
3477   
3478    protected virtual void SendPropertyChanging()
3479    {
3480      if ((this.PropertyChanging != null))
3481      {
3482        this.PropertyChanging(this, emptyChangingEventArgs);
3483      }
3484    }
3485   
3486    protected virtual void SendPropertyChanged(String propertyName)
3487    {
3488      if ((this.PropertyChanged != null))
3489      {
3490        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3491      }
3492    }
3493  }
3494 
3495  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3496  public partial class Lifecycle : INotifyPropertyChanging, INotifyPropertyChanged
3497  {
3498   
3499    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3500   
3501    private int _LifecycleId;
3502   
3503    private System.DateTime _LastCleanup;
3504   
3505    #region Extensibility Method Definitions
3506    partial void OnLoaded();
3507    partial void OnValidate(System.Data.Linq.ChangeAction action);
3508    partial void OnCreated();
3509    partial void OnLifecycleIdChanging(int value);
3510    partial void OnLifecycleIdChanged();
3511    partial void OnLastCleanupChanging(System.DateTime value);
3512    partial void OnLastCleanupChanged();
3513    #endregion
3514   
3515    public Lifecycle()
3516    {
3517      OnCreated();
3518    }
3519   
3520    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LifecycleId", DbType="Int", IsPrimaryKey=true)]
3521    public int LifecycleId
3522    {
3523      get
3524      {
3525        return this._LifecycleId;
3526      }
3527      set
3528      {
3529        if ((this._LifecycleId != value))
3530        {
3531          this.OnLifecycleIdChanging(value);
3532          this.SendPropertyChanging();
3533          this._LifecycleId = value;
3534          this.SendPropertyChanged("LifecycleId");
3535          this.OnLifecycleIdChanged();
3536        }
3537      }
3538    }
3539   
3540    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastCleanup", DbType="DateTime")]
3541    public System.DateTime LastCleanup
3542    {
3543      get
3544      {
3545        return this._LastCleanup;
3546      }
3547      set
3548      {
3549        if ((this._LastCleanup != value))
3550        {
3551          this.OnLastCleanupChanging(value);
3552          this.SendPropertyChanging();
3553          this._LastCleanup = value;
3554          this.SendPropertyChanged("LastCleanup");
3555          this.OnLastCleanupChanged();
3556        }
3557      }
3558    }
3559   
3560    public event PropertyChangingEventHandler PropertyChanging;
3561   
3562    public event PropertyChangedEventHandler PropertyChanged;
3563   
3564    protected virtual void SendPropertyChanging()
3565    {
3566      if ((this.PropertyChanging != null))
3567      {
3568        this.PropertyChanging(this, emptyChangingEventArgs);
3569      }
3570    }
3571   
3572    protected virtual void SendPropertyChanged(String propertyName)
3573    {
3574      if ((this.PropertyChanged != null))
3575      {
3576        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3577      }
3578    }
3579  }
3580 
3581  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ResourcePermission")]
3582  public partial class ResourcePermission : INotifyPropertyChanging, INotifyPropertyChanged
3583  {
3584   
3585    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3586   
3587    private System.Guid _ResourceId;
3588   
3589    private System.Guid _GrantedUserId;
3590   
3591    private System.Guid _GrantedByUserId;
3592   
3593    private EntityRef<Resource> _Resource;
3594   
3595    #region Extensibility Method Definitions
3596    partial void OnLoaded();
3597    partial void OnValidate(System.Data.Linq.ChangeAction action);
3598    partial void OnCreated();
3599    partial void OnResourceIdChanging(System.Guid value);
3600    partial void OnResourceIdChanged();
3601    partial void OnGrantedUserIdChanging(System.Guid value);
3602    partial void OnGrantedUserIdChanged();
3603    partial void OnGrantedByUserIdChanging(System.Guid value);
3604    partial void OnGrantedByUserIdChanged();
3605    #endregion
3606   
3607    public ResourcePermission()
3608    {
3609      this._Resource = default(EntityRef<Resource>);
3610      OnCreated();
3611    }
3612   
3613    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3614    public System.Guid ResourceId
3615    {
3616      get
3617      {
3618        return this._ResourceId;
3619      }
3620      set
3621      {
3622        if ((this._ResourceId != value))
3623        {
3624          if (this._Resource.HasLoadedOrAssignedValue)
3625          {
3626            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3627          }
3628          this.OnResourceIdChanging(value);
3629          this.SendPropertyChanging();
3630          this._ResourceId = value;
3631          this.SendPropertyChanged("ResourceId");
3632          this.OnResourceIdChanged();
3633        }
3634      }
3635    }
3636   
3637    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3638    public System.Guid GrantedUserId
3639    {
3640      get
3641      {
3642        return this._GrantedUserId;
3643      }
3644      set
3645      {
3646        if ((this._GrantedUserId != value))
3647        {
3648          this.OnGrantedUserIdChanging(value);
3649          this.SendPropertyChanging();
3650          this._GrantedUserId = value;
3651          this.SendPropertyChanged("GrantedUserId");
3652          this.OnGrantedUserIdChanged();
3653        }
3654      }
3655    }
3656   
3657    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
3658    public System.Guid GrantedByUserId
3659    {
3660      get
3661      {
3662        return this._GrantedByUserId;
3663      }
3664      set
3665      {
3666        if ((this._GrantedByUserId != value))
3667        {
3668          this.OnGrantedByUserIdChanging(value);
3669          this.SendPropertyChanging();
3670          this._GrantedByUserId = value;
3671          this.SendPropertyChanged("GrantedByUserId");
3672          this.OnGrantedByUserIdChanged();
3673        }
3674      }
3675    }
3676   
3677    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]
3678    public Resource Resource
3679    {
3680      get
3681      {
3682        return this._Resource.Entity;
3683      }
3684      set
3685      {
3686        Resource previousValue = this._Resource.Entity;
3687        if (((previousValue != value)
3688              || (this._Resource.HasLoadedOrAssignedValue == false)))
3689        {
3690          this.SendPropertyChanging();
3691          if ((previousValue != null))
3692          {
3693            this._Resource.Entity = null;
3694            previousValue.ResourcePermissions.Remove(this);
3695          }
3696          this._Resource.Entity = value;
3697          if ((value != null))
3698          {
3699            value.ResourcePermissions.Add(this);
3700            this._ResourceId = value.ResourceId;
3701          }
3702          else
3703          {
3704            this._ResourceId = default(System.Guid);
3705          }
3706          this.SendPropertyChanged("Resource");
3707        }
3708      }
3709    }
3710   
3711    public event PropertyChangingEventHandler PropertyChanging;
3712   
3713    public event PropertyChangedEventHandler PropertyChanged;
3714   
3715    protected virtual void SendPropertyChanging()
3716    {
3717      if ((this.PropertyChanging != null))
3718      {
3719        this.PropertyChanging(this, emptyChangingEventArgs);
3720      }
3721    }
3722   
3723    protected virtual void SendPropertyChanged(String propertyName)
3724    {
3725      if ((this.PropertyChanged != null))
3726      {
3727        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3728      }
3729    }
3730  }
3731 
3732  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3733  public partial class UserPriority : INotifyPropertyChanging, INotifyPropertyChanged
3734  {
3735   
3736    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3737   
3738    private System.Guid _UserId;
3739   
3740    private System.DateTime _DateEnqueued;
3741   
3742    #region Extensibility Method Definitions
3743    partial void OnLoaded();
3744    partial void OnValidate(System.Data.Linq.ChangeAction action);
3745    partial void OnCreated();
3746    partial void OnUserIdChanging(System.Guid value);
3747    partial void OnUserIdChanged();
3748    partial void OnDateEnqueuedChanging(System.DateTime value);
3749    partial void OnDateEnqueuedChanged();
3750    #endregion
3751   
3752    public UserPriority()
3753    {
3754      OnCreated();
3755    }
3756   
3757    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3758    public System.Guid UserId
3759    {
3760      get
3761      {
3762        return this._UserId;
3763      }
3764      set
3765      {
3766        if ((this._UserId != value))
3767        {
3768          this.OnUserIdChanging(value);
3769          this.SendPropertyChanging();
3770          this._UserId = value;
3771          this.SendPropertyChanged("UserId");
3772          this.OnUserIdChanged();
3773        }
3774      }
3775    }
3776   
3777    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateEnqueued", DbType="DateTime NOT NULL")]
3778    public System.DateTime DateEnqueued
3779    {
3780      get
3781      {
3782        return this._DateEnqueued;
3783      }
3784      set
3785      {
3786        if ((this._DateEnqueued != value))
3787        {
3788          this.OnDateEnqueuedChanging(value);
3789          this.SendPropertyChanging();
3790          this._DateEnqueued = value;
3791          this.SendPropertyChanged("DateEnqueued");
3792          this.OnDateEnqueuedChanged();
3793        }
3794      }
3795    }
3796   
3797    public event PropertyChangingEventHandler PropertyChanging;
3798   
3799    public event PropertyChangedEventHandler PropertyChanged;
3800   
3801    protected virtual void SendPropertyChanging()
3802    {
3803      if ((this.PropertyChanging != null))
3804      {
3805        this.PropertyChanging(this, emptyChangingEventArgs);
3806      }
3807    }
3808   
3809    protected virtual void SendPropertyChanged(String propertyName)
3810    {
3811      if ((this.PropertyChanged != null))
3812      {
3813        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3814      }
3815    }
3816  }
3817 
3818  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimClient")]
3819  public partial class DimClient : INotifyPropertyChanging, INotifyPropertyChanged
3820  {
3821   
3822    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3823   
3824    private System.Guid _Id;
3825   
3826    private string _Name;
3827   
3828    private System.Guid _ResourceId;
3829   
3830    private System.Nullable<System.DateTime> _ExpirationTime;
3831   
3832    private System.Nullable<System.Guid> _ResourceGroupId;
3833   
3834    private System.Nullable<System.Guid> _ResourceGroup2Id;
3835   
3836    private string _GroupName;
3837   
3838    private string _GroupName2;
3839   
3840    private EntitySet<FactTask> _FactTasks;
3841   
3842    private EntitySet<FactClientInfo> _FactClientInfos;
3843   
3844    #region Extensibility Method Definitions
3845    partial void OnLoaded();
3846    partial void OnValidate(System.Data.Linq.ChangeAction action);
3847    partial void OnCreated();
3848    partial void OnIdChanging(System.Guid value);
3849    partial void OnIdChanged();
3850    partial void OnNameChanging(string value);
3851    partial void OnNameChanged();
3852    partial void OnResourceIdChanging(System.Guid value);
3853    partial void OnResourceIdChanged();
3854    partial void OnExpirationTimeChanging(System.Nullable<System.DateTime> value);
3855    partial void OnExpirationTimeChanged();
3856    partial void OnResourceGroupIdChanging(System.Nullable<System.Guid> value);
3857    partial void OnResourceGroupIdChanged();
3858    partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
3859    partial void OnResourceGroup2IdChanged();
3860    partial void OnGroupNameChanging(string value);
3861    partial void OnGroupNameChanged();
3862    partial void OnGroupName2Changing(string value);
3863    partial void OnGroupName2Changed();
3864    #endregion
3865   
3866    public DimClient()
3867    {
3868      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
3869      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
3870      OnCreated();
3871    }
3872   
3873    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
3874    public System.Guid Id
3875    {
3876      get
3877      {
3878        return this._Id;
3879      }
3880      set
3881      {
3882        if ((this._Id != value))
3883        {
3884          this.OnIdChanging(value);
3885          this.SendPropertyChanging();
3886          this._Id = value;
3887          this.SendPropertyChanged("Id");
3888          this.OnIdChanged();
3889        }
3890      }
3891    }
3892   
3893    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
3894    public string Name
3895    {
3896      get
3897      {
3898        return this._Name;
3899      }
3900      set
3901      {
3902        if ((this._Name != value))
3903        {
3904          this.OnNameChanging(value);
3905          this.SendPropertyChanging();
3906          this._Name = value;
3907          this.SendPropertyChanged("Name");
3908          this.OnNameChanged();
3909        }
3910      }
3911    }
3912   
3913    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
3914    public System.Guid ResourceId
3915    {
3916      get
3917      {
3918        return this._ResourceId;
3919      }
3920      set
3921      {
3922        if ((this._ResourceId != value))
3923        {
3924          this.OnResourceIdChanging(value);
3925          this.SendPropertyChanging();
3926          this._ResourceId = value;
3927          this.SendPropertyChanged("ResourceId");
3928          this.OnResourceIdChanged();
3929        }
3930      }
3931    }
3932   
3933    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExpirationTime", DbType="DateTime")]
3934    public System.Nullable<System.DateTime> ExpirationTime
3935    {
3936      get
3937      {
3938        return this._ExpirationTime;
3939      }
3940      set
3941      {
3942        if ((this._ExpirationTime != value))
3943        {
3944          this.OnExpirationTimeChanging(value);
3945          this.SendPropertyChanging();
3946          this._ExpirationTime = value;
3947          this.SendPropertyChanged("ExpirationTime");
3948          this.OnExpirationTimeChanged();
3949        }
3950      }
3951    }
3952   
3953    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroupId", DbType="UniqueIdentifier")]
3954    public System.Nullable<System.Guid> ResourceGroupId
3955    {
3956      get
3957      {
3958        return this._ResourceGroupId;
3959      }
3960      set
3961      {
3962        if ((this._ResourceGroupId != value))
3963        {
3964          this.OnResourceGroupIdChanging(value);
3965          this.SendPropertyChanging();
3966          this._ResourceGroupId = value;
3967          this.SendPropertyChanged("ResourceGroupId");
3968          this.OnResourceGroupIdChanged();
3969        }
3970      }
3971    }
3972   
3973    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroup2Id", DbType="UniqueIdentifier")]
3974    public System.Nullable<System.Guid> ResourceGroup2Id
3975    {
3976      get
3977      {
3978        return this._ResourceGroup2Id;
3979      }
3980      set
3981      {
3982        if ((this._ResourceGroup2Id != value))
3983        {
3984          this.OnResourceGroup2IdChanging(value);
3985          this.SendPropertyChanging();
3986          this._ResourceGroup2Id = value;
3987          this.SendPropertyChanged("ResourceGroup2Id");
3988          this.OnResourceGroup2IdChanged();
3989        }
3990      }
3991    }
3992   
3993    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName")]
3994    public string GroupName
3995    {
3996      get
3997      {
3998        return this._GroupName;
3999      }
4000      set
4001      {
4002        if ((this._GroupName != value))
4003        {
4004          this.OnGroupNameChanging(value);
4005          this.SendPropertyChanging();
4006          this._GroupName = value;
4007          this.SendPropertyChanged("GroupName");
4008          this.OnGroupNameChanged();
4009        }
4010      }
4011    }
4012   
4013    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName2")]
4014    public string GroupName2
4015    {
4016      get
4017      {
4018        return this._GroupName2;
4019      }
4020      set
4021      {
4022        if ((this._GroupName2 != value))
4023        {
4024          this.OnGroupName2Changing(value);
4025          this.SendPropertyChanging();
4026          this._GroupName2 = value;
4027          this.SendPropertyChanged("GroupName2");
4028          this.OnGroupName2Changed();
4029        }
4030      }
4031    }
4032   
4033    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_FactTasks", ThisKey="Id", OtherKey="LastClientId")]
4034    public EntitySet<FactTask> FactTasks
4035    {
4036      get
4037      {
4038        return this._FactTasks;
4039      }
4040      set
4041      {
4042        this._FactTasks.Assign(value);
4043      }
4044    }
4045   
4046    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_FactClientInfos", ThisKey="Id", OtherKey="ClientId")]
4047    public EntitySet<FactClientInfo> FactClientInfos
4048    {
4049      get
4050      {
4051        return this._FactClientInfos;
4052      }
4053      set
4054      {
4055        this._FactClientInfos.Assign(value);
4056      }
4057    }
4058   
4059    public event PropertyChangingEventHandler PropertyChanging;
4060   
4061    public event PropertyChangedEventHandler PropertyChanged;
4062   
4063    protected virtual void SendPropertyChanging()
4064    {
4065      if ((this.PropertyChanging != null))
4066      {
4067        this.PropertyChanging(this, emptyChangingEventArgs);
4068      }
4069    }
4070   
4071    protected virtual void SendPropertyChanged(String propertyName)
4072    {
4073      if ((this.PropertyChanged != null))
4074      {
4075        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4076      }
4077    }
4078   
4079    private void attach_FactTasks(FactTask entity)
4080    {
4081      this.SendPropertyChanging();
4082      entity.DimClient = this;
4083    }
4084   
4085    private void detach_FactTasks(FactTask entity)
4086    {
4087      this.SendPropertyChanging();
4088      entity.DimClient = null;
4089    }
4090   
4091    private void attach_FactClientInfos(FactClientInfo entity)
4092    {
4093      this.SendPropertyChanging();
4094      entity.DimClient = this;
4095    }
4096   
4097    private void detach_FactClientInfos(FactClientInfo entity)
4098    {
4099      this.SendPropertyChanging();
4100      entity.DimClient = null;
4101    }
4102  }
4103 
4104  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactTask")]
4105  public partial class FactTask : INotifyPropertyChanging, INotifyPropertyChanged
4106  {
4107   
4108    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4109   
4110    private System.Guid _TaskId;
4111   
4112    private long _TotalRuntime;
4113   
4114    private long _TotalWaitingTime;
4115   
4116    private long _TotalTransferTime;
4117   
4118    private int _NumCalculationRuns;
4119   
4120    private int _NumFails;
4121   
4122    private int _CoresRequired;
4123   
4124    private int _MemoryRequired;
4125   
4126    private int _Priority;
4127   
4128    private System.Nullable<System.Guid> _LastClientId;
4129   
4130    private System.Guid _JobId;
4131   
4132    private System.Nullable<System.DateTime> _EndTime;
4133   
4134    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _TaskState;
4135   
4136    private string _Exception;
4137   
4138    private long _InitialWaitingTimeMs;
4139   
4140    private System.Nullable<System.DateTime> _StartTime;
4141   
4142    private EntityRef<DimClient> _DimClient;
4143   
4144    private EntityRef<DimJob> _DimJob;
4145   
4146    #region Extensibility Method Definitions
4147    partial void OnLoaded();
4148    partial void OnValidate(System.Data.Linq.ChangeAction action);
4149    partial void OnCreated();
4150    partial void OnTaskIdChanging(System.Guid value);
4151    partial void OnTaskIdChanged();
4152    partial void OnCalculatingTimeChanging(long value);
4153    partial void OnCalculatingTimeChanged();
4154    partial void OnWaitingTimeChanging(long value);
4155    partial void OnWaitingTimeChanged();
4156    partial void OnTransferTimeChanging(long value);
4157    partial void OnTransferTimeChanged();
4158    partial void OnNumCalculationRunsChanging(int value);
4159    partial void OnNumCalculationRunsChanged();
4160    partial void OnNumRetriesChanging(int value);
4161    partial void OnNumRetriesChanged();
4162    partial void OnCoresRequiredChanging(int value);
4163    partial void OnCoresRequiredChanged();
4164    partial void OnMemoryRequiredChanging(int value);
4165    partial void OnMemoryRequiredChanged();
4166    partial void OnPriorityChanging(int value);
4167    partial void OnPriorityChanged();
4168    partial void OnLastClientIdChanging(System.Nullable<System.Guid> value);
4169    partial void OnLastClientIdChanged();
4170    partial void OnJobIdChanging(System.Guid value);
4171    partial void OnJobIdChanged();
4172    partial void OnEndTimeChanging(System.Nullable<System.DateTime> value);
4173    partial void OnEndTimeChanged();
4174    partial void OnTaskStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
4175    partial void OnTaskStateChanged();
4176    partial void OnExceptionChanging(string value);
4177    partial void OnExceptionChanged();
4178    partial void OnInitialWaitingTimeChanging(long value);
4179    partial void OnInitialWaitingTimeChanged();
4180    partial void OnStartTimeChanging(System.Nullable<System.DateTime> value);
4181    partial void OnStartTimeChanged();
4182    #endregion
4183   
4184    public FactTask()
4185    {
4186      this._DimClient = default(EntityRef<DimClient>);
4187      this._DimJob = default(EntityRef<DimJob>);
4188      OnCreated();
4189    }
4190   
4191    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4192    public System.Guid TaskId
4193    {
4194      get
4195      {
4196        return this._TaskId;
4197      }
4198      set
4199      {
4200        if ((this._TaskId != value))
4201        {
4202          this.OnTaskIdChanging(value);
4203          this.SendPropertyChanging();
4204          this._TaskId = value;
4205          this.SendPropertyChanged("TaskId");
4206          this.OnTaskIdChanged();
4207        }
4208      }
4209    }
4210   
4211    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRuntime", DbType="INT NOT NULL")]
4212    public long CalculatingTime
4213    {
4214      get
4215      {
4216        return this._TotalRuntime;
4217      }
4218      set
4219      {
4220        if ((this._TotalRuntime != value))
4221        {
4222          this.OnCalculatingTimeChanging(value);
4223          this.SendPropertyChanging();
4224          this._TotalRuntime = value;
4225          this.SendPropertyChanged("CalculatingTime");
4226          this.OnCalculatingTimeChanged();
4227        }
4228      }
4229    }
4230   
4231    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalWaitingTime", DbType="INT NOT NULL")]
4232    public long WaitingTime
4233    {
4234      get
4235      {
4236        return this._TotalWaitingTime;
4237      }
4238      set
4239      {
4240        if ((this._TotalWaitingTime != value))
4241        {
4242          this.OnWaitingTimeChanging(value);
4243          this.SendPropertyChanging();
4244          this._TotalWaitingTime = value;
4245          this.SendPropertyChanged("WaitingTime");
4246          this.OnWaitingTimeChanged();
4247        }
4248      }
4249    }
4250   
4251    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTransferTime", DbType="INT NOT NULL")]
4252    public long TransferTime
4253    {
4254      get
4255      {
4256        return this._TotalTransferTime;
4257      }
4258      set
4259      {
4260        if ((this._TotalTransferTime != value))
4261        {
4262          this.OnTransferTimeChanging(value);
4263          this.SendPropertyChanging();
4264          this._TotalTransferTime = value;
4265          this.SendPropertyChanged("TransferTime");
4266          this.OnTransferTimeChanged();
4267        }
4268      }
4269    }
4270   
4271    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumCalculationRuns", DbType="Int NOT NULL")]
4272    public int NumCalculationRuns
4273    {
4274      get
4275      {
4276        return this._NumCalculationRuns;
4277      }
4278      set
4279      {
4280        if ((this._NumCalculationRuns != value))
4281        {
4282          this.OnNumCalculationRunsChanging(value);
4283          this.SendPropertyChanging();
4284          this._NumCalculationRuns = value;
4285          this.SendPropertyChanged("NumCalculationRuns");
4286          this.OnNumCalculationRunsChanged();
4287        }
4288      }
4289    }
4290   
4291    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumFails", DbType="Int NOT NULL")]
4292    public int NumRetries
4293    {
4294      get
4295      {
4296        return this._NumFails;
4297      }
4298      set
4299      {
4300        if ((this._NumFails != value))
4301        {
4302          this.OnNumRetriesChanging(value);
4303          this.SendPropertyChanging();
4304          this._NumFails = value;
4305          this.SendPropertyChanged("NumRetries");
4306          this.OnNumRetriesChanged();
4307        }
4308      }
4309    }
4310   
4311    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresRequired", DbType="Int NOT NULL")]
4312    public int CoresRequired
4313    {
4314      get
4315      {
4316        return this._CoresRequired;
4317      }
4318      set
4319      {
4320        if ((this._CoresRequired != value))
4321        {
4322          this.OnCoresRequiredChanging(value);
4323          this.SendPropertyChanging();
4324          this._CoresRequired = value;
4325          this.SendPropertyChanged("CoresRequired");
4326          this.OnCoresRequiredChanged();
4327        }
4328      }
4329    }
4330   
4331    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryRequired", DbType="Int NOT NULL")]
4332    public int MemoryRequired
4333    {
4334      get
4335      {
4336        return this._MemoryRequired;
4337      }
4338      set
4339      {
4340        if ((this._MemoryRequired != value))
4341        {
4342          this.OnMemoryRequiredChanging(value);
4343          this.SendPropertyChanging();
4344          this._MemoryRequired = value;
4345          this.SendPropertyChanged("MemoryRequired");
4346          this.OnMemoryRequiredChanged();
4347        }
4348      }
4349    }
4350   
4351    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
4352    public int Priority
4353    {
4354      get
4355      {
4356        return this._Priority;
4357      }
4358      set
4359      {
4360        if ((this._Priority != value))
4361        {
4362          this.OnPriorityChanging(value);
4363          this.SendPropertyChanging();
4364          this._Priority = value;
4365          this.SendPropertyChanged("Priority");
4366          this.OnPriorityChanged();
4367        }
4368      }
4369    }
4370   
4371    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastClientId", DbType="UniqueIdentifier NOT NULL")]
4372    public System.Nullable<System.Guid> LastClientId
4373    {
4374      get
4375      {
4376        return this._LastClientId;
4377      }
4378      set
4379      {
4380        if ((this._LastClientId != value))
4381        {
4382          if (this._DimClient.HasLoadedOrAssignedValue)
4383          {
4384            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
4385          }
4386          this.OnLastClientIdChanging(value);
4387          this.SendPropertyChanging();
4388          this._LastClientId = value;
4389          this.SendPropertyChanged("LastClientId");
4390          this.OnLastClientIdChanged();
4391        }
4392      }
4393    }
4394   
4395    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
4396    public System.Guid JobId
4397    {
4398      get
4399      {
4400        return this._JobId;
4401      }
4402      set
4403      {
4404        if ((this._JobId != value))
4405        {
4406          if (this._DimJob.HasLoadedOrAssignedValue)
4407          {
4408            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
4409          }
4410          this.OnJobIdChanging(value);
4411          this.SendPropertyChanging();
4412          this._JobId = value;
4413          this.SendPropertyChanged("JobId");
4414          this.OnJobIdChanged();
4415        }
4416      }
4417    }
4418   
4419    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndTime", DbType="DateTime NOT NULL")]
4420    public System.Nullable<System.DateTime> EndTime
4421    {
4422      get
4423      {
4424        return this._EndTime;
4425      }
4426      set
4427      {
4428        if ((this._EndTime != value))
4429        {
4430          this.OnEndTimeChanging(value);
4431          this.SendPropertyChanging();
4432          this._EndTime = value;
4433          this.SendPropertyChanged("EndTime");
4434          this.OnEndTimeChanged();
4435        }
4436      }
4437    }
4438   
4439    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskState", DbType="varchar(30)", CanBeNull=false)]
4440    public global::HeuristicLab.Services.Hive.DataAccess.TaskState TaskState
4441    {
4442      get
4443      {
4444        return this._TaskState;
4445      }
4446      set
4447      {
4448        if ((this._TaskState != value))
4449        {
4450          this.OnTaskStateChanging(value);
4451          this.SendPropertyChanging();
4452          this._TaskState = value;
4453          this.SendPropertyChanged("TaskState");
4454          this.OnTaskStateChanged();
4455        }
4456      }
4457    }
4458   
4459    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="varchar(MAX)")]
4460    public string Exception
4461    {
4462      get
4463      {
4464        return this._Exception;
4465      }
4466      set
4467      {
4468        if ((this._Exception != value))
4469        {
4470          this.OnExceptionChanging(value);
4471          this.SendPropertyChanging();
4472          this._Exception = value;
4473          this.SendPropertyChanged("Exception");
4474          this.OnExceptionChanged();
4475        }
4476      }
4477    }
4478   
4479    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InitialWaitingTimeMs", DbType="INT")]
4480    public long InitialWaitingTime
4481    {
4482      get
4483      {
4484        return this._InitialWaitingTimeMs;
4485      }
4486      set
4487      {
4488        if ((this._InitialWaitingTimeMs != value))
4489        {
4490          this.OnInitialWaitingTimeChanging(value);
4491          this.SendPropertyChanging();
4492          this._InitialWaitingTimeMs = value;
4493          this.SendPropertyChanged("InitialWaitingTime");
4494          this.OnInitialWaitingTimeChanged();
4495        }
4496      }
4497    }
4498   
4499    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartTime")]
4500    public System.Nullable<System.DateTime> StartTime
4501    {
4502      get
4503      {
4504        return this._StartTime;
4505      }
4506      set
4507      {
4508        if ((this._StartTime != value))
4509        {
4510          this.OnStartTimeChanging(value);
4511          this.SendPropertyChanging();
4512          this._StartTime = value;
4513          this.SendPropertyChanged("StartTime");
4514          this.OnStartTimeChanged();
4515        }
4516      }
4517    }
4518   
4519    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_DimClient", ThisKey="LastClientId", OtherKey="Id", IsForeignKey=true)]
4520    public DimClient DimClient
4521    {
4522      get
4523      {
4524        return this._DimClient.Entity;
4525      }
4526      set
4527      {
4528        DimClient previousValue = this._DimClient.Entity;
4529        if (((previousValue != value)
4530              || (this._DimClient.HasLoadedOrAssignedValue == false)))
4531        {
4532          this.SendPropertyChanging();
4533          if ((previousValue != null))
4534          {
4535            this._DimClient.Entity = null;
4536            previousValue.FactTasks.Remove(this);
4537          }
4538          this._DimClient.Entity = value;
4539          if ((value != null))
4540          {
4541            value.FactTasks.Add(this);
4542            this._LastClientId = value.Id;
4543          }
4544          else
4545          {
4546            this._LastClientId = default(Nullable<System.Guid>);
4547          }
4548          this.SendPropertyChanged("DimClient");
4549        }
4550      }
4551    }
4552   
4553    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimJob_FactTask", Storage="_DimJob", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
4554    public DimJob DimJob
4555    {
4556      get
4557      {
4558        return this._DimJob.Entity;
4559      }
4560      set
4561      {
4562        DimJob previousValue = this._DimJob.Entity;
4563        if (((previousValue != value)
4564              || (this._DimJob.HasLoadedOrAssignedValue == false)))
4565        {
4566          this.SendPropertyChanging();
4567          if ((previousValue != null))
4568          {
4569            this._DimJob.Entity = null;
4570            previousValue.FactTasks.Remove(this);
4571          }
4572          this._DimJob.Entity = value;
4573          if ((value != null))
4574          {
4575            value.FactTasks.Add(this);
4576            this._JobId = value.JobId;
4577          }
4578          else
4579          {
4580            this._JobId = default(System.Guid);
4581          }
4582          this.SendPropertyChanged("DimJob");
4583        }
4584      }
4585    }
4586   
4587    public event PropertyChangingEventHandler PropertyChanging;
4588   
4589    public event PropertyChangedEventHandler PropertyChanged;
4590   
4591    protected virtual void SendPropertyChanging()
4592    {
4593      if ((this.PropertyChanging != null))
4594      {
4595        this.PropertyChanging(this, emptyChangingEventArgs);
4596      }
4597    }
4598   
4599    protected virtual void SendPropertyChanged(String propertyName)
4600    {
4601      if ((this.PropertyChanged != null))
4602      {
4603        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4604      }
4605    }
4606  }
4607 
4608  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimJob")]
4609  public partial class DimJob : INotifyPropertyChanging, INotifyPropertyChanged
4610  {
4611   
4612    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4613   
4614    private System.Guid _JobId;
4615   
4616    private System.Guid _UserId;
4617   
4618    private string _JobName;
4619   
4620    private string _UserName;
4621   
4622    private System.DateTime _DateCreated;
4623   
4624    private int _TotalTasks;
4625   
4626    private int _CompletedTasks;
4627   
4628    private System.Nullable<System.DateTime> _DateCompleted;
4629   
4630    private EntitySet<FactTask> _FactTasks;
4631   
4632    #region Extensibility Method Definitions
4633    partial void OnLoaded();
4634    partial void OnValidate(System.Data.Linq.ChangeAction action);
4635    partial void OnCreated();
4636    partial void OnJobIdChanging(System.Guid value);
4637    partial void OnJobIdChanged();
4638    partial void OnUserIdChanging(System.Guid value);
4639    partial void OnUserIdChanged();
4640    partial void OnJobNameChanging(string value);
4641    partial void OnJobNameChanged();
4642    partial void OnUserNameChanging(string value);
4643    partial void OnUserNameChanged();
4644    partial void OnDateCreatedChanging(System.DateTime value);
4645    partial void OnDateCreatedChanged();
4646    partial void OnTotalTasksChanging(int value);
4647    partial void OnTotalTasksChanged();
4648    partial void OnCompletedTasksChanging(int value);
4649    partial void OnCompletedTasksChanged();
4650    partial void OnDateCompletedChanging(System.Nullable<System.DateTime> value);
4651    partial void OnDateCompletedChanged();
4652    #endregion
4653   
4654    public DimJob()
4655    {
4656      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
4657      OnCreated();
4658    }
4659   
4660    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4661    public System.Guid JobId
4662    {
4663      get
4664      {
4665        return this._JobId;
4666      }
4667      set
4668      {
4669        if ((this._JobId != value))
4670        {
4671          this.OnJobIdChanging(value);
4672          this.SendPropertyChanging();
4673          this._JobId = value;
4674          this.SendPropertyChanged("JobId");
4675          this.OnJobIdChanged();
4676        }
4677      }
4678    }
4679   
4680    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
4681    public System.Guid UserId
4682    {
4683      get
4684      {
4685        return this._UserId;
4686      }
4687      set
4688      {
4689        if ((this._UserId != value))
4690        {
4691          this.OnUserIdChanging(value);
4692          this.SendPropertyChanging();
4693          this._UserId = value;
4694          this.SendPropertyChanged("UserId");
4695          this.OnUserIdChanged();
4696        }
4697      }
4698    }
4699   
4700    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobName", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
4701    public string JobName
4702    {
4703      get
4704      {
4705        return this._JobName;
4706      }
4707      set
4708      {
4709        if ((this._JobName != value))
4710        {
4711          this.OnJobNameChanging(value);
4712          this.SendPropertyChanging();
4713          this._JobName = value;
4714          this.SendPropertyChanged("JobName");
4715          this.OnJobNameChanged();
4716        }
4717      }
4718    }
4719   
4720    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
4721    public string UserName
4722    {
4723      get
4724      {
4725        return this._UserName;
4726      }
4727      set
4728      {
4729        if ((this._UserName != value))
4730        {
4731          this.OnUserNameChanging(value);
4732          this.SendPropertyChanging();
4733          this._UserName = value;
4734          this.SendPropertyChanged("UserName");
4735          this.OnUserNameChanged();
4736        }
4737      }
4738    }
4739   
4740    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")]
4741    public System.DateTime DateCreated
4742    {
4743      get
4744      {
4745        return this._DateCreated;
4746      }
4747      set
4748      {
4749        if ((this._DateCreated != value))
4750        {
4751          this.OnDateCreatedChanging(value);
4752          this.SendPropertyChanging();
4753          this._DateCreated = value;
4754          this.SendPropertyChanged("DateCreated");
4755          this.OnDateCreatedChanged();
4756        }
4757      }
4758    }
4759   
4760    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTasks", DbType="INT NOT NULL")]
4761    public int TotalTasks
4762    {
4763      get
4764      {
4765        return this._TotalTasks;
4766      }
4767      set
4768      {
4769        if ((this._TotalTasks != value))
4770        {
4771          this.OnTotalTasksChanging(value);
4772          this.SendPropertyChanging();
4773          this._TotalTasks = value;
4774          this.SendPropertyChanged("TotalTasks");
4775          this.OnTotalTasksChanged();
4776        }
4777      }
4778    }
4779   
4780    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedTasks", DbType="INT NOT NULL")]
4781    public int CompletedTasks
4782    {
4783      get
4784      {
4785        return this._CompletedTasks;
4786      }
4787      set
4788      {
4789        if ((this._CompletedTasks != value))
4790        {
4791          this.OnCompletedTasksChanging(value);
4792          this.SendPropertyChanging();
4793          this._CompletedTasks = value;
4794          this.SendPropertyChanged("CompletedTasks");
4795          this.OnCompletedTasksChanged();
4796        }
4797      }
4798    }
4799   
4800    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCompleted", DbType="DateTime NULL")]
4801    public System.Nullable<System.DateTime> DateCompleted
4802    {
4803      get
4804      {
4805        return this._DateCompleted;
4806      }
4807      set
4808      {
4809        if ((this._DateCompleted != value))
4810        {
4811          this.OnDateCompletedChanging(value);
4812          this.SendPropertyChanging();
4813          this._DateCompleted = value;
4814          this.SendPropertyChanged("DateCompleted");
4815          this.OnDateCompletedChanged();
4816        }
4817      }
4818    }
4819   
4820    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimJob_FactTask", Storage="_FactTasks", ThisKey="JobId", OtherKey="JobId")]
4821    public EntitySet<FactTask> FactTasks
4822    {
4823      get
4824      {
4825        return this._FactTasks;
4826      }
4827      set
4828      {
4829        this._FactTasks.Assign(value);
4830      }
4831    }
4832   
4833    public event PropertyChangingEventHandler PropertyChanging;
4834   
4835    public event PropertyChangedEventHandler PropertyChanged;
4836   
4837    protected virtual void SendPropertyChanging()
4838    {
4839      if ((this.PropertyChanging != null))
4840      {
4841        this.PropertyChanging(this, emptyChangingEventArgs);
4842      }
4843    }
4844   
4845    protected virtual void SendPropertyChanged(String propertyName)
4846    {
4847      if ((this.PropertyChanged != null))
4848      {
4849        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4850      }
4851    }
4852   
4853    private void attach_FactTasks(FactTask entity)
4854    {
4855      this.SendPropertyChanging();
4856      entity.DimJob = this;
4857    }
4858   
4859    private void detach_FactTasks(FactTask entity)
4860    {
4861      this.SendPropertyChanging();
4862      entity.DimJob = null;
4863    }
4864  }
4865 
4866  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimTime")]
4867  public partial class DimTime : INotifyPropertyChanging, INotifyPropertyChanged
4868  {
4869   
4870    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4871   
4872    private System.DateTime _Time;
4873   
4874    private System.DateTime _Hour;
4875   
4876    private System.DateTime _Day;
4877   
4878    private System.DateTime _Month;
4879   
4880    private System.DateTime _Year;
4881   
4882    private System.DateTime _Minute;
4883   
4884    private EntitySet<FactClientInfo> _FactClientInfos;
4885   
4886    #region Extensibility Method Definitions
4887    partial void OnLoaded();
4888    partial void OnValidate(System.Data.Linq.ChangeAction action);
4889    partial void OnCreated();
4890    partial void OnTimeChanging(System.DateTime value);
4891    partial void OnTimeChanged();
4892    partial void OnHourChanging(System.DateTime value);
4893    partial void OnHourChanged();
4894    partial void OnDayChanging(System.DateTime value);
4895    partial void OnDayChanged();
4896    partial void OnMonthChanging(System.DateTime value);
4897    partial void OnMonthChanged();
4898    partial void OnYearChanging(System.DateTime value);
4899    partial void OnYearChanged();
4900    partial void OnMinuteChanging(System.DateTime value);
4901    partial void OnMinuteChanged();
4902    #endregion
4903   
4904    public DimTime()
4905    {
4906      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
4907      OnCreated();
4908    }
4909   
4910    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
4911    public System.DateTime Time
4912    {
4913      get
4914      {
4915        return this._Time;
4916      }
4917      set
4918      {
4919        if ((this._Time != value))
4920        {
4921          this.OnTimeChanging(value);
4922          this.SendPropertyChanging();
4923          this._Time = value;
4924          this.SendPropertyChanged("Time");
4925          this.OnTimeChanged();
4926        }
4927      }
4928    }
4929   
4930    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hour", DbType="DateTime NOT NULL")]
4931    public System.DateTime Hour
4932    {
4933      get
4934      {
4935        return this._Hour;
4936      }
4937      set
4938      {
4939        if ((this._Hour != value))
4940        {
4941          this.OnHourChanging(value);
4942          this.SendPropertyChanging();
4943          this._Hour = value;
4944          this.SendPropertyChanged("Hour");
4945          this.OnHourChanged();
4946        }
4947      }
4948    }
4949   
4950    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Day", DbType="Date NOT NULL")]
4951    public System.DateTime Day
4952    {
4953      get
4954      {
4955        return this._Day;
4956      }
4957      set
4958      {
4959        if ((this._Day != value))
4960        {
4961          this.OnDayChanging(value);
4962          this.SendPropertyChanging();
4963          this._Day = value;
4964          this.SendPropertyChanged("Day");
4965          this.OnDayChanged();
4966        }
4967      }
4968    }
4969   
4970    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Date NOT NULL")]
4971    public System.DateTime Month
4972    {
4973      get
4974      {
4975        return this._Month;
4976      }
4977      set
4978      {
4979        if ((this._Month != value))
4980        {
4981          this.OnMonthChanging(value);
4982          this.SendPropertyChanging();
4983          this._Month = value;
4984          this.SendPropertyChanged("Month");
4985          this.OnMonthChanged();
4986        }
4987      }
4988    }
4989   
4990    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Date NOT NULL")]
4991    public System.DateTime Year
4992    {
4993      get
4994      {
4995        return this._Year;
4996      }
4997      set
4998      {
4999        if ((this._Year != value))
5000        {
5001          this.OnYearChanging(value);
5002          this.SendPropertyChanging();
5003          this._Year = value;
5004          this.SendPropertyChanged("Year");
5005          this.OnYearChanged();
5006        }
5007      }
5008    }
5009   
5010    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Minute")]
5011    public System.DateTime Minute
5012    {
5013      get
5014      {
5015        return this._Minute;
5016      }
5017      set
5018      {
5019        if ((this._Minute != value))
5020        {
5021          this.OnMinuteChanging(value);
5022          this.SendPropertyChanging();
5023          this._Minute = value;
5024          this.SendPropertyChanged("Minute");
5025          this.OnMinuteChanged();
5026        }
5027      }
5028    }
5029   
5030    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactClientInfo", Storage="_FactClientInfos", ThisKey="Time", OtherKey="Time")]
5031    public EntitySet<FactClientInfo> FactClientInfos
5032    {
5033      get
5034      {
5035        return this._FactClientInfos;
5036      }
5037      set
5038      {
5039        this._FactClientInfos.Assign(value);
5040      }
5041    }
5042   
5043    public event PropertyChangingEventHandler PropertyChanging;
5044   
5045    public event PropertyChangedEventHandler PropertyChanged;
5046   
5047    protected virtual void SendPropertyChanging()
5048    {
5049      if ((this.PropertyChanging != null))
5050      {
5051        this.PropertyChanging(this, emptyChangingEventArgs);
5052      }
5053    }
5054   
5055    protected virtual void SendPropertyChanged(String propertyName)
5056    {
5057      if ((this.PropertyChanged != null))
5058      {
5059        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5060      }
5061    }
5062   
5063    private void attach_FactClientInfos(FactClientInfo entity)
5064    {
5065      this.SendPropertyChanging();
5066      entity.DimTime = this;
5067    }
5068   
5069    private void detach_FactClientInfos(FactClientInfo entity)
5070    {
5071      this.SendPropertyChanging();
5072      entity.DimTime = null;
5073    }
5074  }
5075 
5076  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimUser")]
5077  public partial class DimUser : INotifyPropertyChanging, INotifyPropertyChanged
5078  {
5079   
5080    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5081   
5082    private System.Guid _UserId;
5083   
5084    private string _Name;
5085   
5086    private EntitySet<FactClientInfo> _FactClientInfos;
5087   
5088    #region Extensibility Method Definitions
5089    partial void OnLoaded();
5090    partial void OnValidate(System.Data.Linq.ChangeAction action);
5091    partial void OnCreated();
5092    partial void OnUserIdChanging(System.Guid value);
5093    partial void OnUserIdChanged();
5094    partial void OnNameChanging(string value);
5095    partial void OnNameChanged();
5096    #endregion
5097   
5098    public DimUser()
5099    {
5100      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
5101      OnCreated();
5102    }
5103   
5104    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5105    public System.Guid UserId
5106    {
5107      get
5108      {
5109        return this._UserId;
5110      }
5111      set
5112      {
5113        if ((this._UserId != value))
5114        {
5115          this.OnUserIdChanging(value);
5116          this.SendPropertyChanging();
5117          this._UserId = value;
5118          this.SendPropertyChanged("UserId");
5119          this.OnUserIdChanged();
5120        }
5121      }
5122    }
5123   
5124    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5125    public string Name
5126    {
5127      get
5128      {
5129        return this._Name;
5130      }
5131      set
5132      {
5133        if ((this._Name != value))
5134        {
5135          this.OnNameChanging(value);
5136          this.SendPropertyChanging();
5137          this._Name = value;
5138          this.SendPropertyChanged("Name");
5139          this.OnNameChanged();
5140        }
5141      }
5142    }
5143   
5144    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimUser_FactClientInfo", Storage="_FactClientInfos", ThisKey="UserId", OtherKey="UserId")]
5145    public EntitySet<FactClientInfo> FactClientInfos
5146    {
5147      get
5148      {
5149        return this._FactClientInfos;
5150      }
5151      set
5152      {
5153        this._FactClientInfos.Assign(value);
5154      }
5155    }
5156   
5157    public event PropertyChangingEventHandler PropertyChanging;
5158   
5159    public event PropertyChangedEventHandler PropertyChanged;
5160   
5161    protected virtual void SendPropertyChanging()
5162    {
5163      if ((this.PropertyChanging != null))
5164      {
5165        this.PropertyChanging(this, emptyChangingEventArgs);
5166      }
5167    }
5168   
5169    protected virtual void SendPropertyChanged(String propertyName)
5170    {
5171      if ((this.PropertyChanged != null))
5172      {
5173        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5174      }
5175    }
5176   
5177    private void attach_FactClientInfos(FactClientInfo entity)
5178    {
5179      this.SendPropertyChanging();
5180      entity.DimUser = this;
5181    }
5182   
5183    private void detach_FactClientInfos(FactClientInfo entity)
5184    {
5185      this.SendPropertyChanging();
5186      entity.DimUser = null;
5187    }
5188  }
5189 
5190  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactClientInfo")]
5191  public partial class FactClientInfo : INotifyPropertyChanging, INotifyPropertyChanged
5192  {
5193   
5194    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5195   
5196    private System.Guid _ClientId;
5197   
5198    private System.DateTime _Time;
5199   
5200    private System.Guid _UserId;
5201   
5202    private int _NumUsedCores;
5203   
5204    private int _NumTotalCores;
5205   
5206    private int _UsedMemory;
5207   
5208    private int _TotalMemory;
5209   
5210    private double _CpuUtilization;
5211   
5212    private long _TotalTimeIdle;
5213   
5214    private long _TotalTimeOffline;
5215   
5216    private long _TotalTimeUnavailable;
5217   
5218    private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _SlaveState;
5219   
5220    private bool _IsAllowedToCalculate;
5221   
5222    private EntityRef<DimClient> _DimClient;
5223   
5224    private EntityRef<DimTime> _DimTime;
5225   
5226    private EntityRef<DimUser> _DimUser;
5227   
5228    #region Extensibility Method Definitions
5229    partial void OnLoaded();
5230    partial void OnValidate(System.Data.Linq.ChangeAction action);
5231    partial void OnCreated();
5232    partial void OnClientIdChanging(System.Guid value);
5233    partial void OnClientIdChanged();
5234    partial void OnTimeChanging(System.DateTime value);
5235    partial void OnTimeChanged();
5236    partial void OnUserIdChanging(System.Guid value);
5237    partial void OnUserIdChanged();
5238    partial void OnNumUsedCoresChanging(int value);
5239    partial void OnNumUsedCoresChanged();
5240    partial void OnNumTotalCoresChanging(int value);
5241    partial void OnNumTotalCoresChanged();
5242    partial void OnUsedMemoryChanging(int value);
5243    partial void OnUsedMemoryChanged();
5244    partial void OnTotalMemoryChanging(int value);
5245    partial void OnTotalMemoryChanged();
5246    partial void OnCpuUtilizationChanging(double value);
5247    partial void OnCpuUtilizationChanged();
5248    partial void OnIdleTimeChanging(long value);
5249    partial void OnIdleTimeChanged();
5250    partial void OnOfflineTimeChanging(long value);
5251    partial void OnOfflineTimeChanged();
5252    partial void OnUnavailableTimeChanging(long value);
5253    partial void OnUnavailableTimeChanged();
5254    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
5255    partial void OnSlaveStateChanged();
5256    partial void OnIsAllowedToCalculateChanging(bool value);
5257    partial void OnIsAllowedToCalculateChanged();
5258    #endregion
5259   
5260    public FactClientInfo()
5261    {
5262      this._DimClient = default(EntityRef<DimClient>);
5263      this._DimTime = default(EntityRef<DimTime>);
5264      this._DimUser = default(EntityRef<DimUser>);
5265      OnCreated();
5266    }
5267   
5268    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5269    public System.Guid ClientId
5270    {
5271      get
5272      {
5273        return this._ClientId;
5274      }
5275      set
5276      {
5277        if ((this._ClientId != value))
5278        {
5279          if (this._DimClient.HasLoadedOrAssignedValue)
5280          {
5281            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5282          }
5283          this.OnClientIdChanging(value);
5284          this.SendPropertyChanging();
5285          this._ClientId = value;
5286          this.SendPropertyChanged("ClientId");
5287          this.OnClientIdChanged();
5288        }
5289      }
5290    }
5291   
5292    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
5293    public System.DateTime Time
5294    {
5295      get
5296      {
5297        return this._Time;
5298      }
5299      set
5300      {
5301        if ((this._Time != value))
5302        {
5303          if (this._DimTime.HasLoadedOrAssignedValue)
5304          {
5305            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5306          }
5307          this.OnTimeChanging(value);
5308          this.SendPropertyChanging();
5309          this._Time = value;
5310          this.SendPropertyChanged("Time");
5311          this.OnTimeChanged();
5312        }
5313      }
5314    }
5315   
5316    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5317    public System.Guid UserId
5318    {
5319      get
5320      {
5321        return this._UserId;
5322      }
5323      set
5324      {
5325        if ((this._UserId != value))
5326        {
5327          if (this._DimUser.HasLoadedOrAssignedValue)
5328          {
5329            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5330          }
5331          this.OnUserIdChanging(value);
5332          this.SendPropertyChanging();
5333          this._UserId = value;
5334          this.SendPropertyChanged("UserId");
5335          this.OnUserIdChanged();
5336        }
5337      }
5338    }
5339   
5340    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumUsedCores", DbType="Int NOT NULL")]
5341    public int NumUsedCores
5342    {
5343      get
5344      {
5345        return this._NumUsedCores;
5346      }
5347      set
5348      {
5349        if ((this._NumUsedCores != value))
5350        {
5351          this.OnNumUsedCoresChanging(value);
5352          this.SendPropertyChanging();
5353          this._NumUsedCores = value;
5354          this.SendPropertyChanged("NumUsedCores");
5355          this.OnNumUsedCoresChanged();
5356        }
5357      }
5358    }
5359   
5360    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumTotalCores", DbType="Int NOT NULL")]
5361    public int NumTotalCores
5362    {
5363      get
5364      {
5365        return this._NumTotalCores;
5366      }
5367      set
5368      {
5369        if ((this._NumTotalCores != value))
5370        {
5371          this.OnNumTotalCoresChanging(value);
5372          this.SendPropertyChanging();
5373          this._NumTotalCores = value;
5374          this.SendPropertyChanged("NumTotalCores");
5375          this.OnNumTotalCoresChanged();
5376        }
5377      }
5378    }
5379   
5380    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsedMemory", DbType="Int NOT NULL")]
5381    public int UsedMemory
5382    {
5383      get
5384      {
5385        return this._UsedMemory;
5386      }
5387      set
5388      {
5389        if ((this._UsedMemory != value))
5390        {
5391          this.OnUsedMemoryChanging(value);
5392          this.SendPropertyChanging();
5393          this._UsedMemory = value;
5394          this.SendPropertyChanged("UsedMemory");
5395          this.OnUsedMemoryChanged();
5396        }
5397      }
5398    }
5399   
5400    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalMemory", DbType="Int NOT NULL")]
5401    public int TotalMemory
5402    {
5403      get
5404      {
5405        return this._TotalMemory;
5406      }
5407      set
5408      {
5409        if ((this._TotalMemory != value))
5410        {
5411          this.OnTotalMemoryChanging(value);
5412          this.SendPropertyChanging();
5413          this._TotalMemory = value;
5414          this.SendPropertyChanged("TotalMemory");
5415          this.OnTotalMemoryChanged();
5416        }
5417      }
5418    }
5419   
5420    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="Float NOT NULL")]
5421    public double CpuUtilization
5422    {
5423      get
5424      {
5425        return this._CpuUtilization;
5426      }
5427      set
5428      {
5429        if ((this._CpuUtilization != value))
5430        {
5431          this.OnCpuUtilizationChanging(value);
5432          this.SendPropertyChanging();
5433          this._CpuUtilization = value;
5434          this.SendPropertyChanged("CpuUtilization");
5435          this.OnCpuUtilizationChanged();
5436        }
5437      }
5438    }
5439   
5440    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeIdle", DbType="INT NOT NULL")]
5441    public long IdleTime
5442    {
5443      get
5444      {
5445        return this._TotalTimeIdle;
5446      }
5447      set
5448      {
5449        if ((this._TotalTimeIdle != value))
5450        {
5451          this.OnIdleTimeChanging(value);
5452          this.SendPropertyChanging();
5453          this._TotalTimeIdle = value;
5454          this.SendPropertyChanged("IdleTime");
5455          this.OnIdleTimeChanged();
5456        }
5457      }
5458    }
5459   
5460    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeOffline", DbType="INT NOT NULL")]
5461    public long OfflineTime
5462    {
5463      get
5464      {
5465        return this._TotalTimeOffline;
5466      }
5467      set
5468      {
5469        if ((this._TotalTimeOffline != value))
5470        {
5471          this.OnOfflineTimeChanging(value);
5472          this.SendPropertyChanging();
5473          this._TotalTimeOffline = value;
5474          this.SendPropertyChanged("OfflineTime");
5475          this.OnOfflineTimeChanged();
5476        }
5477      }
5478    }
5479   
5480    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeUnavailable", DbType="INT NOT NULL")]
5481    public long UnavailableTime
5482    {
5483      get
5484      {
5485        return this._TotalTimeUnavailable;
5486      }
5487      set
5488      {
5489        if ((this._TotalTimeUnavailable != value))
5490        {
5491          this.OnUnavailableTimeChanging(value);
5492          this.SendPropertyChanging();
5493          this._TotalTimeUnavailable = value;
5494          this.SendPropertyChanged("UnavailableTime");
5495          this.OnUnavailableTimeChanged();
5496        }
5497      }
5498    }
5499   
5500    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveState", DbType="VarChar(15)", CanBeNull=false)]
5501    public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
5502    {
5503      get
5504      {
5505        return this._SlaveState;
5506      }
5507      set
5508      {
5509        if ((this._SlaveState != value))
5510        {
5511          this.OnSlaveStateChanging(value);
5512          this.SendPropertyChanging();
5513          this._SlaveState = value;
5514          this.SendPropertyChanged("SlaveState");
5515          this.OnSlaveStateChanged();
5516        }
5517      }
5518    }
5519   
5520    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAllowedToCalculate", DbType="BIT")]
5521    public bool IsAllowedToCalculate
5522    {
5523      get
5524      {
5525        return this._IsAllowedToCalculate;
5526      }
5527      set
5528      {
5529        if ((this._IsAllowedToCalculate != value))
5530        {
5531          this.OnIsAllowedToCalculateChanging(value);
5532          this.SendPropertyChanging();
5533          this._IsAllowedToCalculate = value;
5534          this.SendPropertyChanged("IsAllowedToCalculate");
5535          this.OnIsAllowedToCalculateChanged();
5536        }
5537      }
5538    }
5539   
5540    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_DimClient", ThisKey="ClientId", OtherKey="Id", IsForeignKey=true)]
5541    public DimClient DimClient
5542    {
5543      get
5544      {
5545        return this._DimClient.Entity;
5546      }
5547      set
5548      {
5549        DimClient previousValue = this._DimClient.Entity;
5550        if (((previousValue != value)
5551              || (this._DimClient.HasLoadedOrAssignedValue == false)))
5552        {
5553          this.SendPropertyChanging();
5554          if ((previousValue != null))
5555          {
5556            this._DimClient.Entity = null;
5557            previousValue.FactClientInfos.Remove(this);
5558          }
5559          this._DimClient.Entity = value;
5560          if ((value != null))
5561          {
5562            value.FactClientInfos.Add(this);
5563            this._ClientId = value.Id;
5564          }
5565          else
5566          {
5567            this._ClientId = default(System.Guid);
5568          }
5569          this.SendPropertyChanged("DimClient");
5570        }
5571      }
5572    }
5573   
5574    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactClientInfo", Storage="_DimTime", ThisKey="Time", OtherKey="Time", IsForeignKey=true)]
5575    public DimTime DimTime
5576    {
5577      get
5578      {
5579        return this._DimTime.Entity;
5580      }
5581      set
5582      {
5583        DimTime previousValue = this._DimTime.Entity;
5584        if (((previousValue != value)
5585              || (this._DimTime.HasLoadedOrAssignedValue == false)))
5586        {
5587          this.SendPropertyChanging();
5588          if ((previousValue != null))
5589          {
5590            this._DimTime.Entity = null;
5591            previousValue.FactClientInfos.Remove(this);
5592          }
5593          this._DimTime.Entity = value;
5594          if ((value != null))
5595          {
5596            value.FactClientInfos.Add(this);
5597            this._Time = value.Time;
5598          }
5599          else
5600          {
5601            this._Time = default(System.DateTime);
5602          }
5603          this.SendPropertyChanged("DimTime");
5604        }
5605      }
5606    }
5607   
5608    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimUser_FactClientInfo", Storage="_DimUser", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true)]
5609    public DimUser DimUser
5610    {
5611      get
5612      {
5613        return this._DimUser.Entity;
5614      }
5615      set
5616      {
5617        DimUser previousValue = this._DimUser.Entity;
5618        if (((previousValue != value)
5619              || (this._DimUser.HasLoadedOrAssignedValue == false)))
5620        {
5621          this.SendPropertyChanging();
5622          if ((previousValue != null))
5623          {
5624            this._DimUser.Entity = null;
5625            previousValue.FactClientInfos.Remove(this);
5626          }
5627          this._DimUser.Entity = value;
5628          if ((value != null))
5629          {
5630            value.FactClientInfos.Add(this);
5631            this._UserId = value.UserId;
5632          }
5633          else
5634          {
5635            this._UserId = default(System.Guid);
5636          }
5637          this.SendPropertyChanged("DimUser");
5638        }
5639      }
5640    }
5641   
5642    public event PropertyChangingEventHandler PropertyChanging;
5643   
5644    public event PropertyChangedEventHandler PropertyChanged;
5645   
5646    protected virtual void SendPropertyChanging()
5647    {
5648      if ((this.PropertyChanging != null))
5649      {
5650        this.PropertyChanging(this, emptyChangingEventArgs);
5651      }
5652    }
5653   
5654    protected virtual void SendPropertyChanged(String propertyName)
5655    {
5656      if ((this.PropertyChanged != null))
5657      {
5658        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5659      }
5660    }
5661  }
5662 
5663  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Project")]
5664  public partial class Project : INotifyPropertyChanging, INotifyPropertyChanged
5665  {
5666   
5667    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5668   
5669    private System.Guid _ProjectId;
5670   
5671    private System.Nullable<System.Guid> _ParentProjectId;
5672   
5673    private System.DateTime _DateCreated;
5674   
5675    private string _Name;
5676   
5677    private string _Description;
5678   
5679    private System.Guid _OwnerUserId;
5680   
5681    private System.DateTime _StartDate;
5682   
5683    private System.DateTime _EndDate;
5684   
5685    private EntitySet<AssignedResource> _AssignedResources;
5686   
5687    private EntitySet<Job> _Jobs;
5688   
5689    private EntitySet<Project> _Projects;
5690   
5691    private EntitySet<ProjectPermission> _ProjectPermissions;
5692   
5693    private EntityRef<Project> _Project1;
5694   
5695    #region Extensibility Method Definitions
5696    partial void OnLoaded();
5697    partial void OnValidate(System.Data.Linq.ChangeAction action);
5698    partial void OnCreated();
5699    partial void OnProjectIdChanging(System.Guid value);
5700    partial void OnProjectIdChanged();
5701    partial void OnParentProjectIdChanging(System.Nullable<System.Guid> value);
5702    partial void OnParentProjectIdChanged();
5703    partial void OnDateCreatedChanging(System.DateTime value);
5704    partial void OnDateCreatedChanged();
5705    partial void OnNameChanging(string value);
5706    partial void OnNameChanged();
5707    partial void OnDescriptionChanging(string value);
5708    partial void OnDescriptionChanged();
5709    partial void OnOwnerUserIdChanging(System.Guid value);
5710    partial void OnOwnerUserIdChanged();
5711    partial void OnStartDateChanging(System.DateTime value);
5712    partial void OnStartDateChanged();
5713    partial void OnEndDateChanging(System.DateTime value);
5714    partial void OnEndDateChanged();
5715    #endregion
5716   
5717    public Project()
5718    {
5719      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
5720      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
5721      this._Projects = new EntitySet<Project>(new Action<Project>(this.attach_Projects), new Action<Project>(this.detach_Projects));
5722      this._ProjectPermissions = new EntitySet<ProjectPermission>(new Action<ProjectPermission>(this.attach_ProjectPermissions), new Action<ProjectPermission>(this.detach_ProjectPermissions));
5723      this._Project1 = default(EntityRef<Project>);
5724      OnCreated();
5725    }
5726   
5727    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
5728    public System.Guid ProjectId
5729    {
5730      get
5731      {
5732        return this._ProjectId;
5733      }
5734      set
5735      {
5736        if ((this._ProjectId != value))
5737        {
5738          this.OnProjectIdChanging(value);
5739          this.SendPropertyChanging();
5740          this._ProjectId = value;
5741          this.SendPropertyChanged("ProjectId");
5742          this.OnProjectIdChanged();
5743        }
5744      }
5745    }
5746   
5747    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentProjectId", DbType="UniqueIdentifier")]
5748    public System.Nullable<System.Guid> ParentProjectId
5749    {
5750      get
5751      {
5752        return this._ParentProjectId;
5753      }
5754      set
5755      {
5756        if ((this._ParentProjectId != value))
5757        {
5758          if (this._Project1.HasLoadedOrAssignedValue)
5759          {
5760            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5761          }
5762          this.OnParentProjectIdChanging(value);
5763          this.SendPropertyChanging();
5764          this._ParentProjectId = value;
5765          this.SendPropertyChanged("ParentProjectId");
5766          this.OnParentProjectIdChanged();
5767        }
5768      }
5769    }
5770   
5771    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")]
5772    public System.DateTime DateCreated
5773    {
5774      get
5775      {
5776        return this._DateCreated;
5777      }
5778      set
5779      {
5780        if ((this._DateCreated != value))
5781        {
5782          this.OnDateCreatedChanging(value);
5783          this.SendPropertyChanging();
5784          this._DateCreated = value;
5785          this.SendPropertyChanged("DateCreated");
5786          this.OnDateCreatedChanged();
5787        }
5788      }
5789    }
5790   
5791    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
5792    public string Name
5793    {
5794      get
5795      {
5796        return this._Name;
5797      }
5798      set
5799      {
5800        if ((this._Name != value))
5801        {
5802          this.OnNameChanging(value);
5803          this.SendPropertyChanging();
5804          this._Name = value;
5805          this.SendPropertyChanged("Name");
5806          this.OnNameChanged();
5807        }
5808      }
5809    }
5810   
5811    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="VarChar(MAX)", CanBeNull=false)]
5812    public string Description
5813    {
5814      get
5815      {
5816        return this._Description;
5817      }
5818      set
5819      {
5820        if ((this._Description != value))
5821        {
5822          this.OnDescriptionChanging(value);
5823          this.SendPropertyChanging();
5824          this._Description = value;
5825          this.SendPropertyChanged("Description");
5826          this.OnDescriptionChanged();
5827        }
5828      }
5829    }
5830   
5831    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerUserId", DbType="UniqueIdentifier NOT NULL")]
5832    public System.Guid OwnerUserId
5833    {
5834      get
5835      {
5836        return this._OwnerUserId;
5837      }
5838      set
5839      {
5840        if ((this._OwnerUserId != value))
5841        {
5842          this.OnOwnerUserIdChanging(value);
5843          this.SendPropertyChanging();
5844          this._OwnerUserId = value;
5845          this.SendPropertyChanged("OwnerUserId");
5846          this.OnOwnerUserIdChanged();
5847        }
5848      }
5849    }
5850   
5851    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime NOT NULL")]
5852    public System.DateTime StartDate
5853    {
5854      get
5855      {
5856        return this._StartDate;
5857      }
5858      set
5859      {
5860        if ((this._StartDate != value))
5861        {
5862          this.OnStartDateChanging(value);
5863          this.SendPropertyChanging();
5864          this._StartDate = value;
5865          this.SendPropertyChanged("StartDate");
5866          this.OnStartDateChanged();
5867        }
5868      }
5869    }
5870   
5871    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")]
5872    public System.DateTime EndDate
5873    {
5874      get
5875      {
5876        return this._EndDate;
5877      }
5878      set
5879      {
5880        if ((this._EndDate != value))
5881        {
5882          this.OnEndDateChanging(value);
5883          this.SendPropertyChanging();
5884          this._EndDate = value;
5885          this.SendPropertyChanged("EndDate");
5886          this.OnEndDateChanged();
5887        }
5888      }
5889    }
5890   
5891    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId")]
5892    public EntitySet<AssignedResource> AssignedResources
5893    {
5894      get
5895      {
5896        return this._AssignedResources;
5897      }
5898      set
5899      {
5900        this._AssignedResources.Assign(value);
5901      }
5902    }
5903   
5904    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Job", Storage="_Jobs", ThisKey="ProjectId", OtherKey="ProjectId")]
5905    public EntitySet<Job> Jobs
5906    {
5907      get
5908      {
5909        return this._Jobs;
5910      }
5911      set
5912      {
5913        this._Jobs.Assign(value);
5914      }
5915    }
5916   
5917    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Project", Storage="_Projects", ThisKey="ProjectId", OtherKey="ParentProjectId")]
5918    public EntitySet<Project> ChildProjects
5919    {
5920      get
5921      {
5922        return this._Projects;
5923      }
5924      set
5925      {
5926        this._Projects.Assign(value);
5927      }
5928    }
5929   
5930    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_ProjectPermissions", ThisKey="ProjectId", OtherKey="ProjectId")]
5931    public EntitySet<ProjectPermission> ProjectPermissions
5932    {
5933      get
5934      {
5935        return this._ProjectPermissions;
5936      }
5937      set
5938      {
5939        this._ProjectPermissions.Assign(value);
5940      }
5941    }
5942   
5943    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Project", Storage="_Project1", ThisKey="ParentProjectId", OtherKey="ProjectId", IsForeignKey=true)]
5944    public Project ParentProject
5945    {
5946      get
5947      {
5948        return this._Project1.Entity;
5949      }
5950      set
5951      {
5952        Project previousValue = this._Project1.Entity;
5953        if (((previousValue != value)
5954              || (this._Project1.HasLoadedOrAssignedValue == false)))
5955        {
5956          this.SendPropertyChanging();
5957          if ((previousValue != null))
5958          {
5959            this._Project1.Entity = null;
5960            previousValue.ChildProjects.Remove(this);
5961          }
5962          this._Project1.Entity = value;
5963          if ((value != null))
5964          {
5965            value.ChildProjects.Add(this);
5966            this._ParentProjectId = value.ProjectId;
5967          }
5968          else
5969          {
5970            this._ParentProjectId = default(Nullable<System.Guid>);
5971          }
5972          this.SendPropertyChanged("ParentProject");
5973        }
5974      }
5975    }
5976   
5977    public event PropertyChangingEventHandler PropertyChanging;
5978   
5979    public event PropertyChangedEventHandler PropertyChanged;
5980   
5981    protected virtual void SendPropertyChanging()
5982    {
5983      if ((this.PropertyChanging != null))
5984      {
5985        this.PropertyChanging(this, emptyChangingEventArgs);
5986      }
5987    }
5988   
5989    protected virtual void SendPropertyChanged(String propertyName)
5990    {
5991      if ((this.PropertyChanged != null))
5992      {
5993        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5994      }
5995    }
5996   
5997    private void attach_AssignedResources(AssignedResource entity)
5998    {
5999      this.SendPropertyChanging();
6000      entity.Project = this;
6001    }
6002   
6003    private void detach_AssignedResources(AssignedResource entity)
6004    {
6005      this.SendPropertyChanging();
6006      entity.Project = null;
6007    }
6008   
6009    private void attach_Jobs(Job entity)
6010    {
6011      this.SendPropertyChanging();
6012      entity.Project = this;
6013    }
6014   
6015    private void detach_Jobs(Job entity)
6016    {
6017      this.SendPropertyChanging();
6018      entity.Project = null;
6019    }
6020   
6021    private void attach_Projects(Project entity)
6022    {
6023      this.SendPropertyChanging();
6024      entity.ParentProject = this;
6025    }
6026   
6027    private void detach_Projects(Project entity)
6028    {
6029      this.SendPropertyChanging();
6030      entity.ParentProject = null;
6031    }
6032   
6033    private void attach_ProjectPermissions(ProjectPermission entity)
6034    {
6035      this.SendPropertyChanging();
6036      entity.Project = this;
6037    }
6038   
6039    private void detach_ProjectPermissions(ProjectPermission entity)
6040    {
6041      this.SendPropertyChanging();
6042      entity.Project = null;
6043    }
6044  }
6045 
6046  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProjectPermission")]
6047  public partial class ProjectPermission : INotifyPropertyChanging, INotifyPropertyChanged
6048  {
6049   
6050    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
6051   
6052    private System.Guid _ProjectId;
6053   
6054    private System.Guid _GrantedUserId;
6055   
6056    private System.Guid _GrantedByUserId;
6057   
6058    private EntityRef<Project> _Project;
6059   
6060    #region Extensibility Method Definitions
6061    partial void OnLoaded();
6062    partial void OnValidate(System.Data.Linq.ChangeAction action);
6063    partial void OnCreated();
6064    partial void OnProjectIdChanging(System.Guid value);
6065    partial void OnProjectIdChanged();
6066    partial void OnGrantedUserIdChanging(System.Guid value);
6067    partial void OnGrantedUserIdChanged();
6068    partial void OnGrantedByUserIdChanging(System.Guid value);
6069    partial void OnGrantedByUserIdChanged();
6070    #endregion
6071   
6072    public ProjectPermission()
6073    {
6074      this._Project = default(EntityRef<Project>);
6075      OnCreated();
6076    }
6077   
6078    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
6079    public System.Guid ProjectId
6080    {
6081      get
6082      {
6083        return this._ProjectId;
6084      }
6085      set
6086      {
6087        if ((this._ProjectId != value))
6088        {
6089          if (this._Project.HasLoadedOrAssignedValue)
6090          {
6091            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6092          }
6093          this.OnProjectIdChanging(value);
6094          this.SendPropertyChanging();
6095          this._ProjectId = value;
6096          this.SendPropertyChanged("ProjectId");
6097          this.OnProjectIdChanged();
6098        }
6099      }
6100    }
6101   
6102    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
6103    public System.Guid GrantedUserId
6104    {
6105      get
6106      {
6107        return this._GrantedUserId;
6108      }
6109      set
6110      {
6111        if ((this._GrantedUserId != value))
6112        {
6113          this.OnGrantedUserIdChanging(value);
6114          this.SendPropertyChanging();
6115          this._GrantedUserId = value;
6116          this.SendPropertyChanged("GrantedUserId");
6117          this.OnGrantedUserIdChanged();
6118        }
6119      }
6120    }
6121   
6122    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
6123    public System.Guid GrantedByUserId
6124    {
6125      get
6126      {
6127        return this._GrantedByUserId;
6128      }
6129      set
6130      {
6131        if ((this._GrantedByUserId != value))
6132        {
6133          this.OnGrantedByUserIdChanging(value);
6134          this.SendPropertyChanging();
6135          this._GrantedByUserId = value;
6136          this.SendPropertyChanged("GrantedByUserId");
6137          this.OnGrantedByUserIdChanged();
6138        }
6139      }
6140    }
6141   
6142    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
6143    public Project Project
6144    {
6145      get
6146      {
6147        return this._Project.Entity;
6148      }
6149      set
6150      {
6151        Project previousValue = this._Project.Entity;
6152        if (((previousValue != value)
6153              || (this._Project.HasLoadedOrAssignedValue == false)))
6154        {
6155          this.SendPropertyChanging();
6156          if ((previousValue != null))
6157          {
6158            this._Project.Entity = null;
6159            previousValue.ProjectPermissions.Remove(this);
6160          }
6161          this._Project.Entity = value;
6162          if ((value != null))
6163          {
6164            value.ProjectPermissions.Add(this);
6165            this._ProjectId = value.ProjectId;
6166          }
6167          else
6168          {
6169            this._ProjectId = default(System.Guid);
6170          }
6171          this.SendPropertyChanged("Project");
6172        }
6173      }
6174    }
6175   
6176    public event PropertyChangingEventHandler PropertyChanging;
6177   
6178    public event PropertyChangedEventHandler PropertyChanged;
6179   
6180    protected virtual void SendPropertyChanging()
6181    {
6182      if ((this.PropertyChanging != null))
6183      {
6184        this.PropertyChanging(this, emptyChangingEventArgs);
6185      }
6186    }
6187   
6188    protected virtual void SendPropertyChanged(String propertyName)
6189    {
6190      if ((this.PropertyChanged != null))
6191      {
6192        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
6193      }
6194    }
6195  }
6196}
6197#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.