Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 15528 was 15528, checked in by jzenisek, 6 years ago

#2839 added AssignedJobResource to dbml and Daos

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