Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs @ 12551

Last change on this file since 12551 was 12551, checked in by dglaser, 9 years ago

#2388:

HeuristicLab.Services.Hive.DataAccess-3.3:

  • updated database schema
  • updated sql scripts
  • updated HiveStatisticsGenerator

HeuristicLab.Services.WebApp-3.3:

  • merged from trunk

HeuristicLab.Services.WebApp.Status-3.3:

  • updated data api controller

HeuristicLab.Services.WebApp.Statistics-3.3:

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