Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 9538 was 9538, checked in by pfleck, 12 years ago

#2063:
StatisticsGenerator fills and updates client dimension table.
Removed week from time dimension table.

File size: 168.1 KB
Line 
1#pragma warning disable 1591
2//------------------------------------------------------------------------------
3// <auto-generated>
4//     This code was generated by a tool.
5//     Runtime Version:4.0.30319.18034
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 EntitySet<FactTask> _FactTasks;
4622   
4623    private EntitySet<FactClientInfo> _FactClientInfos;
4624   
4625    #region Extensibility Method Definitions
4626    partial void OnLoaded();
4627    partial void OnValidate(System.Data.Linq.ChangeAction action);
4628    partial void OnCreated();
4629    partial void OnIdChanging(System.Guid value);
4630    partial void OnIdChanged();
4631    partial void OnNameChanging(string value);
4632    partial void OnNameChanged();
4633    partial void OnResourceIdChanging(System.Guid value);
4634    partial void OnResourceIdChanged();
4635    partial void OnExpirationTimeChanging(System.Nullable<System.DateTime> value);
4636    partial void OnExpirationTimeChanged();
4637    partial void OnResourceGroupIdChanging(System.Nullable<System.Guid> value);
4638    partial void OnResourceGroupIdChanged();
4639    partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
4640    partial void OnResourceGroup2IdChanged();
4641    #endregion
4642   
4643    public DimClient()
4644    {
4645      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
4646      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
4647      OnCreated();
4648    }
4649   
4650    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
4651    public System.Guid Id
4652    {
4653      get
4654      {
4655        return this._Id;
4656      }
4657      set
4658      {
4659        if ((this._Id != value))
4660        {
4661          this.OnIdChanging(value);
4662          this.SendPropertyChanging();
4663          this._Id = value;
4664          this.SendPropertyChanged("Id");
4665          this.OnIdChanged();
4666        }
4667      }
4668    }
4669   
4670    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
4671    public string Name
4672    {
4673      get
4674      {
4675        return this._Name;
4676      }
4677      set
4678      {
4679        if ((this._Name != value))
4680        {
4681          this.OnNameChanging(value);
4682          this.SendPropertyChanging();
4683          this._Name = value;
4684          this.SendPropertyChanged("Name");
4685          this.OnNameChanged();
4686        }
4687      }
4688    }
4689   
4690    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
4691    public System.Guid ResourceId
4692    {
4693      get
4694      {
4695        return this._ResourceId;
4696      }
4697      set
4698      {
4699        if ((this._ResourceId != value))
4700        {
4701          this.OnResourceIdChanging(value);
4702          this.SendPropertyChanging();
4703          this._ResourceId = value;
4704          this.SendPropertyChanged("ResourceId");
4705          this.OnResourceIdChanged();
4706        }
4707      }
4708    }
4709   
4710    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExpirationTime", DbType="DateTime")]
4711    public System.Nullable<System.DateTime> ExpirationTime
4712    {
4713      get
4714      {
4715        return this._ExpirationTime;
4716      }
4717      set
4718      {
4719        if ((this._ExpirationTime != value))
4720        {
4721          this.OnExpirationTimeChanging(value);
4722          this.SendPropertyChanging();
4723          this._ExpirationTime = value;
4724          this.SendPropertyChanged("ExpirationTime");
4725          this.OnExpirationTimeChanged();
4726        }
4727      }
4728    }
4729   
4730    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroupId", DbType="UniqueIdentifier")]
4731    public System.Nullable<System.Guid> ResourceGroupId
4732    {
4733      get
4734      {
4735        return this._ResourceGroupId;
4736      }
4737      set
4738      {
4739        if ((this._ResourceGroupId != value))
4740        {
4741          this.OnResourceGroupIdChanging(value);
4742          this.SendPropertyChanging();
4743          this._ResourceGroupId = value;
4744          this.SendPropertyChanged("ResourceGroupId");
4745          this.OnResourceGroupIdChanged();
4746        }
4747      }
4748    }
4749   
4750    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroup2Id", DbType="UniqueIdentifier")]
4751    public System.Nullable<System.Guid> ResourceGroup2Id
4752    {
4753      get
4754      {
4755        return this._ResourceGroup2Id;
4756      }
4757      set
4758      {
4759        if ((this._ResourceGroup2Id != value))
4760        {
4761          this.OnResourceGroup2IdChanging(value);
4762          this.SendPropertyChanging();
4763          this._ResourceGroup2Id = value;
4764          this.SendPropertyChanged("ResourceGroup2Id");
4765          this.OnResourceGroup2IdChanged();
4766        }
4767      }
4768    }
4769   
4770    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_FactTasks", ThisKey="Id", OtherKey="LastClientId")]
4771    public EntitySet<FactTask> FactTasks
4772    {
4773      get
4774      {
4775        return this._FactTasks;
4776      }
4777      set
4778      {
4779        this._FactTasks.Assign(value);
4780      }
4781    }
4782   
4783    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_FactClientInfos", ThisKey="Id", OtherKey="ClientId")]
4784    public EntitySet<FactClientInfo> FactClientInfos
4785    {
4786      get
4787      {
4788        return this._FactClientInfos;
4789      }
4790      set
4791      {
4792        this._FactClientInfos.Assign(value);
4793      }
4794    }
4795   
4796    public event PropertyChangingEventHandler PropertyChanging;
4797   
4798    public event PropertyChangedEventHandler PropertyChanged;
4799   
4800    protected virtual void SendPropertyChanging()
4801    {
4802      if ((this.PropertyChanging != null))
4803      {
4804        this.PropertyChanging(this, emptyChangingEventArgs);
4805      }
4806    }
4807   
4808    protected virtual void SendPropertyChanged(String propertyName)
4809    {
4810      if ((this.PropertyChanged != null))
4811      {
4812        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4813      }
4814    }
4815   
4816    private void attach_FactTasks(FactTask entity)
4817    {
4818      this.SendPropertyChanging();
4819      entity.DimClient = this;
4820    }
4821   
4822    private void detach_FactTasks(FactTask entity)
4823    {
4824      this.SendPropertyChanging();
4825      entity.DimClient = null;
4826    }
4827   
4828    private void attach_FactClientInfos(FactClientInfo entity)
4829    {
4830      this.SendPropertyChanging();
4831      entity.DimClient = this;
4832    }
4833   
4834    private void detach_FactClientInfos(FactClientInfo entity)
4835    {
4836      this.SendPropertyChanging();
4837      entity.DimClient = null;
4838    }
4839  }
4840 
4841  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactTask")]
4842  public partial class FactTask : INotifyPropertyChanging, INotifyPropertyChanged
4843  {
4844   
4845    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4846   
4847    private System.Guid _TaskId;
4848   
4849    private double _TotalRuntime;
4850   
4851    private double _TotalWaitingTime;
4852   
4853    private double _TotalTransferTime;
4854   
4855    private int _NumCalculationRuns;
4856   
4857    private int _NumFails;
4858   
4859    private int _CoresRequired;
4860   
4861    private int _MemoryRequired;
4862   
4863    private int _TaskSize;
4864   
4865    private System.Nullable<int> _ResultSize;
4866   
4867    private int _Priority;
4868   
4869    private System.Guid _LastClientId;
4870   
4871    private System.Guid _JobId;
4872   
4873    private System.DateTime _StartTime;
4874   
4875    private System.DateTime _EndTime;
4876   
4877    private EntityRef<DimClient> _DimClient;
4878   
4879    private EntityRef<DimJob> _DimJob;
4880   
4881    private EntityRef<DimTime> _DimTime;
4882   
4883    private EntityRef<DimTime> _DimTime1;
4884   
4885    #region Extensibility Method Definitions
4886    partial void OnLoaded();
4887    partial void OnValidate(System.Data.Linq.ChangeAction action);
4888    partial void OnCreated();
4889    partial void OnTaskIdChanging(System.Guid value);
4890    partial void OnTaskIdChanged();
4891    partial void OnTotalRuntimeChanging(double value);
4892    partial void OnTotalRuntimeChanged();
4893    partial void OnTotalWaitingTimeChanging(double value);
4894    partial void OnTotalWaitingTimeChanged();
4895    partial void OnTotalTransferTimeChanging(double value);
4896    partial void OnTotalTransferTimeChanged();
4897    partial void OnNumCalculationRunsChanging(int value);
4898    partial void OnNumCalculationRunsChanged();
4899    partial void OnNumFailsChanging(int value);
4900    partial void OnNumFailsChanged();
4901    partial void OnCoresRequiredChanging(int value);
4902    partial void OnCoresRequiredChanged();
4903    partial void OnMemoryRequiredChanging(int value);
4904    partial void OnMemoryRequiredChanged();
4905    partial void OnTaskSizeChanging(int value);
4906    partial void OnTaskSizeChanged();
4907    partial void OnResultSizeChanging(System.Nullable<int> value);
4908    partial void OnResultSizeChanged();
4909    partial void OnPriorityChanging(int value);
4910    partial void OnPriorityChanged();
4911    partial void OnLastClientIdChanging(System.Guid value);
4912    partial void OnLastClientIdChanged();
4913    partial void OnJobIdChanging(System.Guid value);
4914    partial void OnJobIdChanged();
4915    partial void OnStartTimeChanging(System.DateTime value);
4916    partial void OnStartTimeChanged();
4917    partial void OnEndTimeChanging(System.DateTime value);
4918    partial void OnEndTimeChanged();
4919    #endregion
4920   
4921    public FactTask()
4922    {
4923      this._DimClient = default(EntityRef<DimClient>);
4924      this._DimJob = default(EntityRef<DimJob>);
4925      this._DimTime = default(EntityRef<DimTime>);
4926      this._DimTime1 = default(EntityRef<DimTime>);
4927      OnCreated();
4928    }
4929   
4930    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskId", DbType="UniqueIdentifier NOT NULL")]
4931    public System.Guid TaskId
4932    {
4933      get
4934      {
4935        return this._TaskId;
4936      }
4937      set
4938      {
4939        if ((this._TaskId != value))
4940        {
4941          this.OnTaskIdChanging(value);
4942          this.SendPropertyChanging();
4943          this._TaskId = value;
4944          this.SendPropertyChanged("TaskId");
4945          this.OnTaskIdChanged();
4946        }
4947      }
4948    }
4949   
4950    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRuntime", DbType="Float NOT NULL")]
4951    public double TotalRuntime
4952    {
4953      get
4954      {
4955        return this._TotalRuntime;
4956      }
4957      set
4958      {
4959        if ((this._TotalRuntime != value))
4960        {
4961          this.OnTotalRuntimeChanging(value);
4962          this.SendPropertyChanging();
4963          this._TotalRuntime = value;
4964          this.SendPropertyChanged("TotalRuntime");
4965          this.OnTotalRuntimeChanged();
4966        }
4967      }
4968    }
4969   
4970    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalWaitingTime", DbType="Float NOT NULL")]
4971    public double TotalWaitingTime
4972    {
4973      get
4974      {
4975        return this._TotalWaitingTime;
4976      }
4977      set
4978      {
4979        if ((this._TotalWaitingTime != value))
4980        {
4981          this.OnTotalWaitingTimeChanging(value);
4982          this.SendPropertyChanging();
4983          this._TotalWaitingTime = value;
4984          this.SendPropertyChanged("TotalWaitingTime");
4985          this.OnTotalWaitingTimeChanged();
4986        }
4987      }
4988    }
4989   
4990    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTransferTime", DbType="Float NOT NULL")]
4991    public double TotalTransferTime
4992    {
4993      get
4994      {
4995        return this._TotalTransferTime;
4996      }
4997      set
4998      {
4999        if ((this._TotalTransferTime != value))
5000        {
5001          this.OnTotalTransferTimeChanging(value);
5002          this.SendPropertyChanging();
5003          this._TotalTransferTime = value;
5004          this.SendPropertyChanged("TotalTransferTime");
5005          this.OnTotalTransferTimeChanged();
5006        }
5007      }
5008    }
5009   
5010    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumCalculationRuns", DbType="Int NOT NULL")]
5011    public int NumCalculationRuns
5012    {
5013      get
5014      {
5015        return this._NumCalculationRuns;
5016      }
5017      set
5018      {
5019        if ((this._NumCalculationRuns != value))
5020        {
5021          this.OnNumCalculationRunsChanging(value);
5022          this.SendPropertyChanging();
5023          this._NumCalculationRuns = value;
5024          this.SendPropertyChanged("NumCalculationRuns");
5025          this.OnNumCalculationRunsChanged();
5026        }
5027      }
5028    }
5029   
5030    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumFails", DbType="Int NOT NULL")]
5031    public int NumFails
5032    {
5033      get
5034      {
5035        return this._NumFails;
5036      }
5037      set
5038      {
5039        if ((this._NumFails != value))
5040        {
5041          this.OnNumFailsChanging(value);
5042          this.SendPropertyChanging();
5043          this._NumFails = value;
5044          this.SendPropertyChanged("NumFails");
5045          this.OnNumFailsChanged();
5046        }
5047      }
5048    }
5049   
5050    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresRequired", DbType="Int NOT NULL")]
5051    public int CoresRequired
5052    {
5053      get
5054      {
5055        return this._CoresRequired;
5056      }
5057      set
5058      {
5059        if ((this._CoresRequired != value))
5060        {
5061          this.OnCoresRequiredChanging(value);
5062          this.SendPropertyChanging();
5063          this._CoresRequired = value;
5064          this.SendPropertyChanged("CoresRequired");
5065          this.OnCoresRequiredChanged();
5066        }
5067      }
5068    }
5069   
5070    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryRequired", DbType="Int NOT NULL")]
5071    public int MemoryRequired
5072    {
5073      get
5074      {
5075        return this._MemoryRequired;
5076      }
5077      set
5078      {
5079        if ((this._MemoryRequired != value))
5080        {
5081          this.OnMemoryRequiredChanging(value);
5082          this.SendPropertyChanging();
5083          this._MemoryRequired = value;
5084          this.SendPropertyChanged("MemoryRequired");
5085          this.OnMemoryRequiredChanged();
5086        }
5087      }
5088    }
5089   
5090    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskSize", DbType="Int NOT NULL")]
5091    public int TaskSize
5092    {
5093      get
5094      {
5095        return this._TaskSize;
5096      }
5097      set
5098      {
5099        if ((this._TaskSize != value))
5100        {
5101          this.OnTaskSizeChanging(value);
5102          this.SendPropertyChanging();
5103          this._TaskSize = value;
5104          this.SendPropertyChanged("TaskSize");
5105          this.OnTaskSizeChanged();
5106        }
5107      }
5108    }
5109   
5110    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResultSize", DbType="Int")]
5111    public System.Nullable<int> ResultSize
5112    {
5113      get
5114      {
5115        return this._ResultSize;
5116      }
5117      set
5118      {
5119        if ((this._ResultSize != value))
5120        {
5121          this.OnResultSizeChanging(value);
5122          this.SendPropertyChanging();
5123          this._ResultSize = value;
5124          this.SendPropertyChanged("ResultSize");
5125          this.OnResultSizeChanged();
5126        }
5127      }
5128    }
5129   
5130    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
5131    public int Priority
5132    {
5133      get
5134      {
5135        return this._Priority;
5136      }
5137      set
5138      {
5139        if ((this._Priority != value))
5140        {
5141          this.OnPriorityChanging(value);
5142          this.SendPropertyChanging();
5143          this._Priority = value;
5144          this.SendPropertyChanged("Priority");
5145          this.OnPriorityChanged();
5146        }
5147      }
5148    }
5149   
5150    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastClientId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5151    public System.Guid LastClientId
5152    {
5153      get
5154      {
5155        return this._LastClientId;
5156      }
5157      set
5158      {
5159        if ((this._LastClientId != value))
5160        {
5161          if (this._DimClient.HasLoadedOrAssignedValue)
5162          {
5163            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5164          }
5165          this.OnLastClientIdChanging(value);
5166          this.SendPropertyChanging();
5167          this._LastClientId = value;
5168          this.SendPropertyChanged("LastClientId");
5169          this.OnLastClientIdChanged();
5170        }
5171      }
5172    }
5173   
5174    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5175    public System.Guid JobId
5176    {
5177      get
5178      {
5179        return this._JobId;
5180      }
5181      set
5182      {
5183        if ((this._JobId != value))
5184        {
5185          if (this._DimJob.HasLoadedOrAssignedValue)
5186          {
5187            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5188          }
5189          this.OnJobIdChanging(value);
5190          this.SendPropertyChanging();
5191          this._JobId = value;
5192          this.SendPropertyChanged("JobId");
5193          this.OnJobIdChanged();
5194        }
5195      }
5196    }
5197   
5198    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartTime", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
5199    public System.DateTime StartTime
5200    {
5201      get
5202      {
5203        return this._StartTime;
5204      }
5205      set
5206      {
5207        if ((this._StartTime != value))
5208        {
5209          if (this._DimTime1.HasLoadedOrAssignedValue)
5210          {
5211            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5212          }
5213          this.OnStartTimeChanging(value);
5214          this.SendPropertyChanging();
5215          this._StartTime = value;
5216          this.SendPropertyChanged("StartTime");
5217          this.OnStartTimeChanged();
5218        }
5219      }
5220    }
5221   
5222    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndTime", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
5223    public System.DateTime EndTime
5224    {
5225      get
5226      {
5227        return this._EndTime;
5228      }
5229      set
5230      {
5231        if ((this._EndTime != value))
5232        {
5233          if (this._DimTime.HasLoadedOrAssignedValue)
5234          {
5235            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5236          }
5237          this.OnEndTimeChanging(value);
5238          this.SendPropertyChanging();
5239          this._EndTime = value;
5240          this.SendPropertyChanged("EndTime");
5241          this.OnEndTimeChanged();
5242        }
5243      }
5244    }
5245   
5246    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_DimClient", ThisKey="LastClientId", OtherKey="Id", IsForeignKey=true)]
5247    public DimClient DimClient
5248    {
5249      get
5250      {
5251        return this._DimClient.Entity;
5252      }
5253      set
5254      {
5255        DimClient previousValue = this._DimClient.Entity;
5256        if (((previousValue != value)
5257              || (this._DimClient.HasLoadedOrAssignedValue == false)))
5258        {
5259          this.SendPropertyChanging();
5260          if ((previousValue != null))
5261          {
5262            this._DimClient.Entity = null;
5263            previousValue.FactTasks.Remove(this);
5264          }
5265          this._DimClient.Entity = value;
5266          if ((value != null))
5267          {
5268            value.FactTasks.Add(this);
5269            this._LastClientId = value.Id;
5270          }
5271          else
5272          {
5273            this._LastClientId = default(System.Guid);
5274          }
5275          this.SendPropertyChanged("DimClient");
5276        }
5277      }
5278    }
5279   
5280    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimJob_FactTask", Storage="_DimJob", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
5281    public DimJob DimJob
5282    {
5283      get
5284      {
5285        return this._DimJob.Entity;
5286      }
5287      set
5288      {
5289        DimJob previousValue = this._DimJob.Entity;
5290        if (((previousValue != value)
5291              || (this._DimJob.HasLoadedOrAssignedValue == false)))
5292        {
5293          this.SendPropertyChanging();
5294          if ((previousValue != null))
5295          {
5296            this._DimJob.Entity = null;
5297            previousValue.FactTasks.Remove(this);
5298          }
5299          this._DimJob.Entity = value;
5300          if ((value != null))
5301          {
5302            value.FactTasks.Add(this);
5303            this._JobId = value.JobId;
5304          }
5305          else
5306          {
5307            this._JobId = default(System.Guid);
5308          }
5309          this.SendPropertyChanged("DimJob");
5310        }
5311      }
5312    }
5313   
5314    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask", Storage="_DimTime", ThisKey="EndTime", OtherKey="Time", IsForeignKey=true)]
5315    public DimTime DimTime
5316    {
5317      get
5318      {
5319        return this._DimTime.Entity;
5320      }
5321      set
5322      {
5323        DimTime previousValue = this._DimTime.Entity;
5324        if (((previousValue != value)
5325              || (this._DimTime.HasLoadedOrAssignedValue == false)))
5326        {
5327          this.SendPropertyChanging();
5328          if ((previousValue != null))
5329          {
5330            this._DimTime.Entity = null;
5331            previousValue.FactTasks.Remove(this);
5332          }
5333          this._DimTime.Entity = value;
5334          if ((value != null))
5335          {
5336            value.FactTasks.Add(this);
5337            this._EndTime = value.Time;
5338          }
5339          else
5340          {
5341            this._EndTime = default(System.DateTime);
5342          }
5343          this.SendPropertyChanged("DimTime");
5344        }
5345      }
5346    }
5347   
5348    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask1", Storage="_DimTime1", ThisKey="StartTime", OtherKey="Time", IsForeignKey=true)]
5349    public DimTime DimTime1
5350    {
5351      get
5352      {
5353        return this._DimTime1.Entity;
5354      }
5355      set
5356      {
5357        DimTime previousValue = this._DimTime1.Entity;
5358        if (((previousValue != value)
5359              || (this._DimTime1.HasLoadedOrAssignedValue == false)))
5360        {
5361          this.SendPropertyChanging();
5362          if ((previousValue != null))
5363          {
5364            this._DimTime1.Entity = null;
5365            previousValue.FactTasks1.Remove(this);
5366          }
5367          this._DimTime1.Entity = value;
5368          if ((value != null))
5369          {
5370            value.FactTasks1.Add(this);
5371            this._StartTime = value.Time;
5372          }
5373          else
5374          {
5375            this._StartTime = default(System.DateTime);
5376          }
5377          this.SendPropertyChanged("DimTime1");
5378        }
5379      }
5380    }
5381   
5382    public event PropertyChangingEventHandler PropertyChanging;
5383   
5384    public event PropertyChangedEventHandler PropertyChanged;
5385   
5386    protected virtual void SendPropertyChanging()
5387    {
5388      if ((this.PropertyChanging != null))
5389      {
5390        this.PropertyChanging(this, emptyChangingEventArgs);
5391      }
5392    }
5393   
5394    protected virtual void SendPropertyChanged(String propertyName)
5395    {
5396      if ((this.PropertyChanged != null))
5397      {
5398        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5399      }
5400    }
5401  }
5402 
5403  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimJob")]
5404  public partial class DimJob : INotifyPropertyChanging, INotifyPropertyChanged
5405  {
5406   
5407    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5408   
5409    private System.Guid _JobId;
5410   
5411    private System.Guid _UserId;
5412   
5413    private string _JobName;
5414   
5415    private string _UserName;
5416   
5417    private EntitySet<FactTask> _FactTasks;
5418   
5419    #region Extensibility Method Definitions
5420    partial void OnLoaded();
5421    partial void OnValidate(System.Data.Linq.ChangeAction action);
5422    partial void OnCreated();
5423    partial void OnJobIdChanging(System.Guid value);
5424    partial void OnJobIdChanged();
5425    partial void OnUserIdChanging(System.Guid value);
5426    partial void OnUserIdChanged();
5427    partial void OnJobNameChanging(string value);
5428    partial void OnJobNameChanged();
5429    partial void OnUserNameChanging(string value);
5430    partial void OnUserNameChanged();
5431    #endregion
5432   
5433    public DimJob()
5434    {
5435      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
5436      OnCreated();
5437    }
5438   
5439    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5440    public System.Guid JobId
5441    {
5442      get
5443      {
5444        return this._JobId;
5445      }
5446      set
5447      {
5448        if ((this._JobId != value))
5449        {
5450          this.OnJobIdChanging(value);
5451          this.SendPropertyChanging();
5452          this._JobId = value;
5453          this.SendPropertyChanged("JobId");
5454          this.OnJobIdChanged();
5455        }
5456      }
5457    }
5458   
5459    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
5460    public System.Guid UserId
5461    {
5462      get
5463      {
5464        return this._UserId;
5465      }
5466      set
5467      {
5468        if ((this._UserId != value))
5469        {
5470          this.OnUserIdChanging(value);
5471          this.SendPropertyChanging();
5472          this._UserId = value;
5473          this.SendPropertyChanged("UserId");
5474          this.OnUserIdChanged();
5475        }
5476      }
5477    }
5478   
5479    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobName", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5480    public string JobName
5481    {
5482      get
5483      {
5484        return this._JobName;
5485      }
5486      set
5487      {
5488        if ((this._JobName != value))
5489        {
5490          this.OnJobNameChanging(value);
5491          this.SendPropertyChanging();
5492          this._JobName = value;
5493          this.SendPropertyChanged("JobName");
5494          this.OnJobNameChanged();
5495        }
5496      }
5497    }
5498   
5499    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5500    public string UserName
5501    {
5502      get
5503      {
5504        return this._UserName;
5505      }
5506      set
5507      {
5508        if ((this._UserName != value))
5509        {
5510          this.OnUserNameChanging(value);
5511          this.SendPropertyChanging();
5512          this._UserName = value;
5513          this.SendPropertyChanged("UserName");
5514          this.OnUserNameChanged();
5515        }
5516      }
5517    }
5518   
5519    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimJob_FactTask", Storage="_FactTasks", ThisKey="JobId", OtherKey="JobId")]
5520    public EntitySet<FactTask> FactTasks
5521    {
5522      get
5523      {
5524        return this._FactTasks;
5525      }
5526      set
5527      {
5528        this._FactTasks.Assign(value);
5529      }
5530    }
5531   
5532    public event PropertyChangingEventHandler PropertyChanging;
5533   
5534    public event PropertyChangedEventHandler PropertyChanged;
5535   
5536    protected virtual void SendPropertyChanging()
5537    {
5538      if ((this.PropertyChanging != null))
5539      {
5540        this.PropertyChanging(this, emptyChangingEventArgs);
5541      }
5542    }
5543   
5544    protected virtual void SendPropertyChanged(String propertyName)
5545    {
5546      if ((this.PropertyChanged != null))
5547      {
5548        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5549      }
5550    }
5551   
5552    private void attach_FactTasks(FactTask entity)
5553    {
5554      this.SendPropertyChanging();
5555      entity.DimJob = this;
5556    }
5557   
5558    private void detach_FactTasks(FactTask entity)
5559    {
5560      this.SendPropertyChanging();
5561      entity.DimJob = null;
5562    }
5563  }
5564 
5565  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimTime")]
5566  public partial class DimTime : INotifyPropertyChanging, INotifyPropertyChanged
5567  {
5568   
5569    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5570   
5571    private System.DateTime _Time;
5572   
5573    private System.DateTime _Hour;
5574   
5575    private System.DateTime _Day;
5576   
5577    private System.DateTime _Month;
5578   
5579    private System.DateTime _Year;
5580   
5581    private EntitySet<FactTask> _FactTasks;
5582   
5583    private EntitySet<FactTask> _FactTasks1;
5584   
5585    private EntitySet<FactClientInfo> _FactClientInfos;
5586   
5587    #region Extensibility Method Definitions
5588    partial void OnLoaded();
5589    partial void OnValidate(System.Data.Linq.ChangeAction action);
5590    partial void OnCreated();
5591    partial void OnTimeChanging(System.DateTime value);
5592    partial void OnTimeChanged();
5593    partial void OnHourChanging(System.DateTime value);
5594    partial void OnHourChanged();
5595    partial void OnDayChanging(System.DateTime value);
5596    partial void OnDayChanged();
5597    partial void OnMonthChanging(System.DateTime value);
5598    partial void OnMonthChanged();
5599    partial void OnYearChanging(System.DateTime value);
5600    partial void OnYearChanged();
5601    #endregion
5602   
5603    public DimTime()
5604    {
5605      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
5606      this._FactTasks1 = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks1), new Action<FactTask>(this.detach_FactTasks1));
5607      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
5608      OnCreated();
5609    }
5610   
5611    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
5612    public System.DateTime Time
5613    {
5614      get
5615      {
5616        return this._Time;
5617      }
5618      set
5619      {
5620        if ((this._Time != value))
5621        {
5622          this.OnTimeChanging(value);
5623          this.SendPropertyChanging();
5624          this._Time = value;
5625          this.SendPropertyChanged("Time");
5626          this.OnTimeChanged();
5627        }
5628      }
5629    }
5630   
5631    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hour", DbType="DateTime NOT NULL")]
5632    public System.DateTime Hour
5633    {
5634      get
5635      {
5636        return this._Hour;
5637      }
5638      set
5639      {
5640        if ((this._Hour != value))
5641        {
5642          this.OnHourChanging(value);
5643          this.SendPropertyChanging();
5644          this._Hour = value;
5645          this.SendPropertyChanged("Hour");
5646          this.OnHourChanged();
5647        }
5648      }
5649    }
5650   
5651    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Day", DbType="Date NOT NULL")]
5652    public System.DateTime Day
5653    {
5654      get
5655      {
5656        return this._Day;
5657      }
5658      set
5659      {
5660        if ((this._Day != value))
5661        {
5662          this.OnDayChanging(value);
5663          this.SendPropertyChanging();
5664          this._Day = value;
5665          this.SendPropertyChanged("Day");
5666          this.OnDayChanged();
5667        }
5668      }
5669    }
5670   
5671    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Date NOT NULL")]
5672    public System.DateTime Month
5673    {
5674      get
5675      {
5676        return this._Month;
5677      }
5678      set
5679      {
5680        if ((this._Month != value))
5681        {
5682          this.OnMonthChanging(value);
5683          this.SendPropertyChanging();
5684          this._Month = value;
5685          this.SendPropertyChanged("Month");
5686          this.OnMonthChanged();
5687        }
5688      }
5689    }
5690   
5691    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Date NOT NULL")]
5692    public System.DateTime Year
5693    {
5694      get
5695      {
5696        return this._Year;
5697      }
5698      set
5699      {
5700        if ((this._Year != value))
5701        {
5702          this.OnYearChanging(value);
5703          this.SendPropertyChanging();
5704          this._Year = value;
5705          this.SendPropertyChanged("Year");
5706          this.OnYearChanged();
5707        }
5708      }
5709    }
5710   
5711    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask", Storage="_FactTasks", ThisKey="Time", OtherKey="EndTime")]
5712    public EntitySet<FactTask> FactTasks
5713    {
5714      get
5715      {
5716        return this._FactTasks;
5717      }
5718      set
5719      {
5720        this._FactTasks.Assign(value);
5721      }
5722    }
5723   
5724    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask1", Storage="_FactTasks1", ThisKey="Time", OtherKey="StartTime")]
5725    public EntitySet<FactTask> FactTasks1
5726    {
5727      get
5728      {
5729        return this._FactTasks1;
5730      }
5731      set
5732      {
5733        this._FactTasks1.Assign(value);
5734      }
5735    }
5736   
5737    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactClientInfo", Storage="_FactClientInfos", ThisKey="Time", OtherKey="Time")]
5738    public EntitySet<FactClientInfo> FactClientInfos
5739    {
5740      get
5741      {
5742        return this._FactClientInfos;
5743      }
5744      set
5745      {
5746        this._FactClientInfos.Assign(value);
5747      }
5748    }
5749   
5750    public event PropertyChangingEventHandler PropertyChanging;
5751   
5752    public event PropertyChangedEventHandler PropertyChanged;
5753   
5754    protected virtual void SendPropertyChanging()
5755    {
5756      if ((this.PropertyChanging != null))
5757      {
5758        this.PropertyChanging(this, emptyChangingEventArgs);
5759      }
5760    }
5761   
5762    protected virtual void SendPropertyChanged(String propertyName)
5763    {
5764      if ((this.PropertyChanged != null))
5765      {
5766        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5767      }
5768    }
5769   
5770    private void attach_FactTasks(FactTask entity)
5771    {
5772      this.SendPropertyChanging();
5773      entity.DimTime = this;
5774    }
5775   
5776    private void detach_FactTasks(FactTask entity)
5777    {
5778      this.SendPropertyChanging();
5779      entity.DimTime = null;
5780    }
5781   
5782    private void attach_FactTasks1(FactTask entity)
5783    {
5784      this.SendPropertyChanging();
5785      entity.DimTime1 = this;
5786    }
5787   
5788    private void detach_FactTasks1(FactTask entity)
5789    {
5790      this.SendPropertyChanging();
5791      entity.DimTime1 = null;
5792    }
5793   
5794    private void attach_FactClientInfos(FactClientInfo entity)
5795    {
5796      this.SendPropertyChanging();
5797      entity.DimTime = this;
5798    }
5799   
5800    private void detach_FactClientInfos(FactClientInfo entity)
5801    {
5802      this.SendPropertyChanging();
5803      entity.DimTime = null;
5804    }
5805  }
5806 
5807  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimUser")]
5808  public partial class DimUser : INotifyPropertyChanging, INotifyPropertyChanged
5809  {
5810   
5811    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5812   
5813    private System.Guid _UserId;
5814   
5815    private string _Name;
5816   
5817    private EntitySet<FactClientInfo> _FactClientInfos;
5818   
5819    #region Extensibility Method Definitions
5820    partial void OnLoaded();
5821    partial void OnValidate(System.Data.Linq.ChangeAction action);
5822    partial void OnCreated();
5823    partial void OnUserIdChanging(System.Guid value);
5824    partial void OnUserIdChanged();
5825    partial void OnNameChanging(string value);
5826    partial void OnNameChanged();
5827    #endregion
5828   
5829    public DimUser()
5830    {
5831      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
5832      OnCreated();
5833    }
5834   
5835    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5836    public System.Guid UserId
5837    {
5838      get
5839      {
5840        return this._UserId;
5841      }
5842      set
5843      {
5844        if ((this._UserId != value))
5845        {
5846          this.OnUserIdChanging(value);
5847          this.SendPropertyChanging();
5848          this._UserId = value;
5849          this.SendPropertyChanged("UserId");
5850          this.OnUserIdChanged();
5851        }
5852      }
5853    }
5854   
5855    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5856    public string Name
5857    {
5858      get
5859      {
5860        return this._Name;
5861      }
5862      set
5863      {
5864        if ((this._Name != value))
5865        {
5866          this.OnNameChanging(value);
5867          this.SendPropertyChanging();
5868          this._Name = value;
5869          this.SendPropertyChanged("Name");
5870          this.OnNameChanged();
5871        }
5872      }
5873    }
5874   
5875    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimUser_FactClientInfo", Storage="_FactClientInfos", ThisKey="UserId", OtherKey="UserId")]
5876    public EntitySet<FactClientInfo> FactClientInfos
5877    {
5878      get
5879      {
5880        return this._FactClientInfos;
5881      }
5882      set
5883      {
5884        this._FactClientInfos.Assign(value);
5885      }
5886    }
5887   
5888    public event PropertyChangingEventHandler PropertyChanging;
5889   
5890    public event PropertyChangedEventHandler PropertyChanged;
5891   
5892    protected virtual void SendPropertyChanging()
5893    {
5894      if ((this.PropertyChanging != null))
5895      {
5896        this.PropertyChanging(this, emptyChangingEventArgs);
5897      }
5898    }
5899   
5900    protected virtual void SendPropertyChanged(String propertyName)
5901    {
5902      if ((this.PropertyChanged != null))
5903      {
5904        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5905      }
5906    }
5907   
5908    private void attach_FactClientInfos(FactClientInfo entity)
5909    {
5910      this.SendPropertyChanging();
5911      entity.DimUser = this;
5912    }
5913   
5914    private void detach_FactClientInfos(FactClientInfo entity)
5915    {
5916      this.SendPropertyChanging();
5917      entity.DimUser = null;
5918    }
5919  }
5920 
5921  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactClientInfo")]
5922  public partial class FactClientInfo : INotifyPropertyChanging, INotifyPropertyChanged
5923  {
5924   
5925    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5926   
5927    private System.Guid _ClientId;
5928   
5929    private System.DateTime _Time;
5930   
5931    private System.Guid _UserId;
5932   
5933    private int _NumUsedCores;
5934   
5935    private int _NumTotalCores;
5936   
5937    private int _UsedMemory;
5938   
5939    private int _TotalMemory;
5940   
5941    private double _CpuUtilization;
5942   
5943    private int _TrafficIn;
5944   
5945    private int _TrafficOut;
5946   
5947    private double _TotalTimeIdle;
5948   
5949    private double _TotalTimeCalculating;
5950   
5951    private double _TotalTimeTransferring;
5952   
5953    private double _TotalTimeOffline;
5954   
5955    private double _TotalTimeUnavailable;
5956   
5957    private EntityRef<DimClient> _DimClient;
5958   
5959    private EntityRef<DimTime> _DimTime;
5960   
5961    private EntityRef<DimUser> _DimUser;
5962   
5963    #region Extensibility Method Definitions
5964    partial void OnLoaded();
5965    partial void OnValidate(System.Data.Linq.ChangeAction action);
5966    partial void OnCreated();
5967    partial void OnClientIdChanging(System.Guid value);
5968    partial void OnClientIdChanged();
5969    partial void OnTimeChanging(System.DateTime value);
5970    partial void OnTimeChanged();
5971    partial void OnUserIdChanging(System.Guid value);
5972    partial void OnUserIdChanged();
5973    partial void OnNumUsedCoresChanging(int value);
5974    partial void OnNumUsedCoresChanged();
5975    partial void OnNumTotalCoresChanging(int value);
5976    partial void OnNumTotalCoresChanged();
5977    partial void OnUsedMemoryChanging(int value);
5978    partial void OnUsedMemoryChanged();
5979    partial void OnTotalMemoryChanging(int value);
5980    partial void OnTotalMemoryChanged();
5981    partial void OnCpuUtilizationChanging(double value);
5982    partial void OnCpuUtilizationChanged();
5983    partial void OnTrafficInChanging(int value);
5984    partial void OnTrafficInChanged();
5985    partial void OnTrafficOutChanging(int value);
5986    partial void OnTrafficOutChanged();
5987    partial void OnTotalTimeIdleChanging(double value);
5988    partial void OnTotalTimeIdleChanged();
5989    partial void OnTotalTimeCalculatingChanging(double value);
5990    partial void OnTotalTimeCalculatingChanged();
5991    partial void OnTotalTimeTransferringChanging(double value);
5992    partial void OnTotalTimeTransferringChanged();
5993    partial void OnTotalTimeOfflineChanging(double value);
5994    partial void OnTotalTimeOfflineChanged();
5995    partial void OnTotalTimeUnavailableChanging(double value);
5996    partial void OnTotalTimeUnavailableChanged();
5997    #endregion
5998   
5999    public FactClientInfo()
6000    {
6001      this._DimClient = default(EntityRef<DimClient>);
6002      this._DimTime = default(EntityRef<DimTime>);
6003      this._DimUser = default(EntityRef<DimUser>);
6004      OnCreated();
6005    }
6006   
6007    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
6008    public System.Guid ClientId
6009    {
6010      get
6011      {
6012        return this._ClientId;
6013      }
6014      set
6015      {
6016        if ((this._ClientId != value))
6017        {
6018          if (this._DimClient.HasLoadedOrAssignedValue)
6019          {
6020            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6021          }
6022          this.OnClientIdChanging(value);
6023          this.SendPropertyChanging();
6024          this._ClientId = value;
6025          this.SendPropertyChanged("ClientId");
6026          this.OnClientIdChanged();
6027        }
6028      }
6029    }
6030   
6031    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
6032    public System.DateTime Time
6033    {
6034      get
6035      {
6036        return this._Time;
6037      }
6038      set
6039      {
6040        if ((this._Time != value))
6041        {
6042          if (this._DimTime.HasLoadedOrAssignedValue)
6043          {
6044            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6045          }
6046          this.OnTimeChanging(value);
6047          this.SendPropertyChanging();
6048          this._Time = value;
6049          this.SendPropertyChanged("Time");
6050          this.OnTimeChanged();
6051        }
6052      }
6053    }
6054   
6055    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
6056    public System.Guid UserId
6057    {
6058      get
6059      {
6060        return this._UserId;
6061      }
6062      set
6063      {
6064        if ((this._UserId != value))
6065        {
6066          if (this._DimUser.HasLoadedOrAssignedValue)
6067          {
6068            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6069          }
6070          this.OnUserIdChanging(value);
6071          this.SendPropertyChanging();
6072          this._UserId = value;
6073          this.SendPropertyChanged("UserId");
6074          this.OnUserIdChanged();
6075        }
6076      }
6077    }
6078   
6079    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumUsedCores", DbType="Int NOT NULL")]
6080    public int NumUsedCores
6081    {
6082      get
6083      {
6084        return this._NumUsedCores;
6085      }
6086      set
6087      {
6088        if ((this._NumUsedCores != value))
6089        {
6090          this.OnNumUsedCoresChanging(value);
6091          this.SendPropertyChanging();
6092          this._NumUsedCores = value;
6093          this.SendPropertyChanged("NumUsedCores");
6094          this.OnNumUsedCoresChanged();
6095        }
6096      }
6097    }
6098   
6099    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumTotalCores", DbType="Int NOT NULL")]
6100    public int NumTotalCores
6101    {
6102      get
6103      {
6104        return this._NumTotalCores;
6105      }
6106      set
6107      {
6108        if ((this._NumTotalCores != value))
6109        {
6110          this.OnNumTotalCoresChanging(value);
6111          this.SendPropertyChanging();
6112          this._NumTotalCores = value;
6113          this.SendPropertyChanged("NumTotalCores");
6114          this.OnNumTotalCoresChanged();
6115        }
6116      }
6117    }
6118   
6119    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsedMemory", DbType="Int NOT NULL")]
6120    public int UsedMemory
6121    {
6122      get
6123      {
6124        return this._UsedMemory;
6125      }
6126      set
6127      {
6128        if ((this._UsedMemory != value))
6129        {
6130          this.OnUsedMemoryChanging(value);
6131          this.SendPropertyChanging();
6132          this._UsedMemory = value;
6133          this.SendPropertyChanged("UsedMemory");
6134          this.OnUsedMemoryChanged();
6135        }
6136      }
6137    }
6138   
6139    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalMemory", DbType="Int NOT NULL")]
6140    public int TotalMemory
6141    {
6142      get
6143      {
6144        return this._TotalMemory;
6145      }
6146      set
6147      {
6148        if ((this._TotalMemory != value))
6149        {
6150          this.OnTotalMemoryChanging(value);
6151          this.SendPropertyChanging();
6152          this._TotalMemory = value;
6153          this.SendPropertyChanged("TotalMemory");
6154          this.OnTotalMemoryChanged();
6155        }
6156      }
6157    }
6158   
6159    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="Float NOT NULL")]
6160    public double CpuUtilization
6161    {
6162      get
6163      {
6164        return this._CpuUtilization;
6165      }
6166      set
6167      {
6168        if ((this._CpuUtilization != value))
6169        {
6170          this.OnCpuUtilizationChanging(value);
6171          this.SendPropertyChanging();
6172          this._CpuUtilization = value;
6173          this.SendPropertyChanged("CpuUtilization");
6174          this.OnCpuUtilizationChanged();
6175        }
6176      }
6177    }
6178   
6179    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrafficIn", DbType="Int NOT NULL")]
6180    public int TrafficIn
6181    {
6182      get
6183      {
6184        return this._TrafficIn;
6185      }
6186      set
6187      {
6188        if ((this._TrafficIn != value))
6189        {
6190          this.OnTrafficInChanging(value);
6191          this.SendPropertyChanging();
6192          this._TrafficIn = value;
6193          this.SendPropertyChanged("TrafficIn");
6194          this.OnTrafficInChanged();
6195        }
6196      }
6197    }
6198   
6199    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrafficOut", DbType="Int NOT NULL")]
6200    public int TrafficOut
6201    {
6202      get
6203      {
6204        return this._TrafficOut;
6205      }
6206      set
6207      {
6208        if ((this._TrafficOut != value))
6209        {
6210          this.OnTrafficOutChanging(value);
6211          this.SendPropertyChanging();
6212          this._TrafficOut = value;
6213          this.SendPropertyChanged("TrafficOut");
6214          this.OnTrafficOutChanged();
6215        }
6216      }
6217    }
6218   
6219    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeIdle", DbType="Float NOT NULL")]
6220    public double TotalTimeIdle
6221    {
6222      get
6223      {
6224        return this._TotalTimeIdle;
6225      }
6226      set
6227      {
6228        if ((this._TotalTimeIdle != value))
6229        {
6230          this.OnTotalTimeIdleChanging(value);
6231          this.SendPropertyChanging();
6232          this._TotalTimeIdle = value;
6233          this.SendPropertyChanged("TotalTimeIdle");
6234          this.OnTotalTimeIdleChanged();
6235        }
6236      }
6237    }
6238   
6239    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeCalculating", DbType="Float NOT NULL")]
6240    public double TotalTimeCalculating
6241    {
6242      get
6243      {
6244        return this._TotalTimeCalculating;
6245      }
6246      set
6247      {
6248        if ((this._TotalTimeCalculating != value))
6249        {
6250          this.OnTotalTimeCalculatingChanging(value);
6251          this.SendPropertyChanging();
6252          this._TotalTimeCalculating = value;
6253          this.SendPropertyChanged("TotalTimeCalculating");
6254          this.OnTotalTimeCalculatingChanged();
6255        }
6256      }
6257    }
6258   
6259    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeTransferring", DbType="Float NOT NULL")]
6260    public double TotalTimeTransferring
6261    {
6262      get
6263      {
6264        return this._TotalTimeTransferring;
6265      }
6266      set
6267      {
6268        if ((this._TotalTimeTransferring != value))
6269        {
6270          this.OnTotalTimeTransferringChanging(value);
6271          this.SendPropertyChanging();
6272          this._TotalTimeTransferring = value;
6273          this.SendPropertyChanged("TotalTimeTransferring");
6274          this.OnTotalTimeTransferringChanged();
6275        }
6276      }
6277    }
6278   
6279    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeOffline", DbType="Float NOT NULL")]
6280    public double TotalTimeOffline
6281    {
6282      get
6283      {
6284        return this._TotalTimeOffline;
6285      }
6286      set
6287      {
6288        if ((this._TotalTimeOffline != value))
6289        {
6290          this.OnTotalTimeOfflineChanging(value);
6291          this.SendPropertyChanging();
6292          this._TotalTimeOffline = value;
6293          this.SendPropertyChanged("TotalTimeOffline");
6294          this.OnTotalTimeOfflineChanged();
6295        }
6296      }
6297    }
6298   
6299    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeUnavailable", DbType="Float NOT NULL")]
6300    public double TotalTimeUnavailable
6301    {
6302      get
6303      {
6304        return this._TotalTimeUnavailable;
6305      }
6306      set
6307      {
6308        if ((this._TotalTimeUnavailable != value))
6309        {
6310          this.OnTotalTimeUnavailableChanging(value);
6311          this.SendPropertyChanging();
6312          this._TotalTimeUnavailable = value;
6313          this.SendPropertyChanged("TotalTimeUnavailable");
6314          this.OnTotalTimeUnavailableChanged();
6315        }
6316      }
6317    }
6318   
6319    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_DimClient", ThisKey="ClientId", OtherKey="Id", IsForeignKey=true)]
6320    public DimClient DimClient
6321    {
6322      get
6323      {
6324        return this._DimClient.Entity;
6325      }
6326      set
6327      {
6328        DimClient previousValue = this._DimClient.Entity;
6329        if (((previousValue != value)
6330              || (this._DimClient.HasLoadedOrAssignedValue == false)))
6331        {
6332          this.SendPropertyChanging();
6333          if ((previousValue != null))
6334          {
6335            this._DimClient.Entity = null;
6336            previousValue.FactClientInfos.Remove(this);
6337          }
6338          this._DimClient.Entity = value;
6339          if ((value != null))
6340          {
6341            value.FactClientInfos.Add(this);
6342            this._ClientId = value.Id;
6343          }
6344          else
6345          {
6346            this._ClientId = default(System.Guid);
6347          }
6348          this.SendPropertyChanged("DimClient");
6349        }
6350      }
6351    }
6352   
6353    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactClientInfo", Storage="_DimTime", ThisKey="Time", OtherKey="Time", IsForeignKey=true)]
6354    public DimTime DimTime
6355    {
6356      get
6357      {
6358        return this._DimTime.Entity;
6359      }
6360      set
6361      {
6362        DimTime previousValue = this._DimTime.Entity;
6363        if (((previousValue != value)
6364              || (this._DimTime.HasLoadedOrAssignedValue == false)))
6365        {
6366          this.SendPropertyChanging();
6367          if ((previousValue != null))
6368          {
6369            this._DimTime.Entity = null;
6370            previousValue.FactClientInfos.Remove(this);
6371          }
6372          this._DimTime.Entity = value;
6373          if ((value != null))
6374          {
6375            value.FactClientInfos.Add(this);
6376            this._Time = value.Time;
6377          }
6378          else
6379          {
6380            this._Time = default(System.DateTime);
6381          }
6382          this.SendPropertyChanged("DimTime");
6383        }
6384      }
6385    }
6386   
6387    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimUser_FactClientInfo", Storage="_DimUser", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true)]
6388    public DimUser DimUser
6389    {
6390      get
6391      {
6392        return this._DimUser.Entity;
6393      }
6394      set
6395      {
6396        DimUser previousValue = this._DimUser.Entity;
6397        if (((previousValue != value)
6398              || (this._DimUser.HasLoadedOrAssignedValue == false)))
6399        {
6400          this.SendPropertyChanging();
6401          if ((previousValue != null))
6402          {
6403            this._DimUser.Entity = null;
6404            previousValue.FactClientInfos.Remove(this);
6405          }
6406          this._DimUser.Entity = value;
6407          if ((value != null))
6408          {
6409            value.FactClientInfos.Add(this);
6410            this._UserId = value.UserId;
6411          }
6412          else
6413          {
6414            this._UserId = default(System.Guid);
6415          }
6416          this.SendPropertyChanged("DimUser");
6417        }
6418      }
6419    }
6420   
6421    public event PropertyChangingEventHandler PropertyChanging;
6422   
6423    public event PropertyChangedEventHandler PropertyChanged;
6424   
6425    protected virtual void SendPropertyChanging()
6426    {
6427      if ((this.PropertyChanging != null))
6428      {
6429        this.PropertyChanging(this, emptyChangingEventArgs);
6430      }
6431    }
6432   
6433    protected virtual void SendPropertyChanged(String propertyName)
6434    {
6435      if ((this.PropertyChanged != null))
6436      {
6437        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
6438      }
6439    }
6440  }
6441}
6442#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.