Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 11040 was 11040, checked in by mroscoe, 10 years ago
File size: 169.8 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.18449
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 long _DataSize = default(long);
2734   
2735    private EntityRef<Task> _Job;
2736   
2737    #region Extensibility Method Definitions
2738    partial void OnLoaded();
2739    partial void OnValidate(System.Data.Linq.ChangeAction action);
2740    partial void OnCreated();
2741    partial void OnTaskIdChanging(System.Guid value);
2742    partial void OnTaskIdChanged();
2743    partial void OnDataChanging(byte[] value);
2744    partial void OnDataChanged();
2745    partial void OnLastUpdateChanging(System.DateTime value);
2746    partial void OnLastUpdateChanged();
2747    #endregion
2748   
2749    public TaskData()
2750    {
2751      this._Job = default(EntityRef<Task>);
2752      OnCreated();
2753    }
2754   
2755    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
2756    public System.Guid TaskId
2757    {
2758      get
2759      {
2760        return this._JobId;
2761      }
2762      set
2763      {
2764        if ((this._JobId != value))
2765        {
2766          if (this._Job.HasLoadedOrAssignedValue)
2767          {
2768            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2769          }
2770          this.OnTaskIdChanging(value);
2771          this.SendPropertyChanging();
2772          this._JobId = value;
2773          this.SendPropertyChanged("TaskId");
2774          this.OnTaskIdChanged();
2775        }
2776      }
2777    }
2778   
2779    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2780    public byte[] Data
2781    {
2782      get
2783      {
2784        return this._Data.Value;
2785      }
2786      set
2787      {
2788        if ((this._Data.Value != value))
2789        {
2790          this.OnDataChanging(value);
2791          this.SendPropertyChanging();
2792          this._Data.Value = value;
2793          this.SendPropertyChanged("Data");
2794          this.OnDataChanged();
2795        }
2796      }
2797    }
2798   
2799    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastUpdate", DbType="DateTime")]
2800    public System.DateTime LastUpdate
2801    {
2802      get
2803      {
2804        return this._LastUpdate;
2805      }
2806      set
2807      {
2808        if ((this._LastUpdate != value))
2809        {
2810          this.OnLastUpdateChanging(value);
2811          this.SendPropertyChanging();
2812          this._LastUpdate = value;
2813          this.SendPropertyChanged("LastUpdate");
2814          this.OnLastUpdateChanged();
2815        }
2816      }
2817    }
2818   
2819    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataSize", AutoSync=AutoSync.Always, DbType="BigInt NOT NULL", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
2820    public long DataSize
2821    {
2822      get
2823      {
2824        return this._DataSize;
2825      }
2826    }
2827   
2828    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
2829    public Task Task
2830    {
2831      get
2832      {
2833        return this._Job.Entity;
2834      }
2835      set
2836      {
2837        Task previousValue = this._Job.Entity;
2838        if (((previousValue != value)
2839              || (this._Job.HasLoadedOrAssignedValue == false)))
2840        {
2841          this.SendPropertyChanging();
2842          if ((previousValue != null))
2843          {
2844            this._Job.Entity = null;
2845            previousValue.JobData = null;
2846          }
2847          this._Job.Entity = value;
2848          if ((value != null))
2849          {
2850            value.JobData = this;
2851            this._JobId = value.TaskId;
2852          }
2853          else
2854          {
2855            this._JobId = default(System.Guid);
2856          }
2857          this.SendPropertyChanged("Task");
2858        }
2859      }
2860    }
2861   
2862    public event PropertyChangingEventHandler PropertyChanging;
2863   
2864    public event PropertyChangedEventHandler PropertyChanged;
2865   
2866    protected virtual void SendPropertyChanging()
2867    {
2868      if ((this.PropertyChanging != null))
2869      {
2870        this.PropertyChanging(this, emptyChangingEventArgs);
2871      }
2872    }
2873   
2874    protected virtual void SendPropertyChanged(String propertyName)
2875    {
2876      if ((this.PropertyChanged != null))
2877      {
2878        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2879      }
2880    }
2881  }
2882 
2883  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginData")]
2884  public partial class PluginData : INotifyPropertyChanging, INotifyPropertyChanged
2885  {
2886   
2887    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2888   
2889    private System.Guid _PluginDataId;
2890   
2891    private System.Guid _PluginId;
2892   
2893    private System.Data.Linq.Link<byte[]> _Data;
2894   
2895    private string _FileName;
2896   
2897    private EntityRef<Plugin> _Plugin;
2898   
2899    #region Extensibility Method Definitions
2900    partial void OnLoaded();
2901    partial void OnValidate(System.Data.Linq.ChangeAction action);
2902    partial void OnCreated();
2903    partial void OnPluginDataIdChanging(System.Guid value);
2904    partial void OnPluginDataIdChanged();
2905    partial void OnPluginIdChanging(System.Guid value);
2906    partial void OnPluginIdChanged();
2907    partial void OnDataChanging(byte[] value);
2908    partial void OnDataChanged();
2909    partial void OnFileNameChanging(string value);
2910    partial void OnFileNameChanged();
2911    #endregion
2912   
2913    public PluginData()
2914    {
2915      this._Plugin = default(EntityRef<Plugin>);
2916      OnCreated();
2917    }
2918   
2919    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginDataId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2920    public System.Guid PluginDataId
2921    {
2922      get
2923      {
2924        return this._PluginDataId;
2925      }
2926      set
2927      {
2928        if ((this._PluginDataId != value))
2929        {
2930          this.OnPluginDataIdChanging(value);
2931          this.SendPropertyChanging();
2932          this._PluginDataId = value;
2933          this.SendPropertyChanged("PluginDataId");
2934          this.OnPluginDataIdChanged();
2935        }
2936      }
2937    }
2938   
2939    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
2940    public System.Guid PluginId
2941    {
2942      get
2943      {
2944        return this._PluginId;
2945      }
2946      set
2947      {
2948        if ((this._PluginId != value))
2949        {
2950          if (this._Plugin.HasLoadedOrAssignedValue)
2951          {
2952            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2953          }
2954          this.OnPluginIdChanging(value);
2955          this.SendPropertyChanging();
2956          this._PluginId = value;
2957          this.SendPropertyChanged("PluginId");
2958          this.OnPluginIdChanged();
2959        }
2960      }
2961    }
2962   
2963    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2964    public byte[] Data
2965    {
2966      get
2967      {
2968        return this._Data.Value;
2969      }
2970      set
2971      {
2972        if ((this._Data.Value != value))
2973        {
2974          this.OnDataChanging(value);
2975          this.SendPropertyChanging();
2976          this._Data.Value = value;
2977          this.SendPropertyChanged("Data");
2978          this.OnDataChanged();
2979        }
2980      }
2981    }
2982   
2983    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="VarChar(MAX)", CanBeNull=false)]
2984    public string FileName
2985    {
2986      get
2987      {
2988        return this._FileName;
2989      }
2990      set
2991      {
2992        if ((this._FileName != value))
2993        {
2994          this.OnFileNameChanging(value);
2995          this.SendPropertyChanging();
2996          this._FileName = value;
2997          this.SendPropertyChanged("FileName");
2998          this.OnFileNameChanged();
2999        }
3000      }
3001    }
3002   
3003    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_Plugin", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true)]
3004    public Plugin Plugin
3005    {
3006      get
3007      {
3008        return this._Plugin.Entity;
3009      }
3010      set
3011      {
3012        Plugin previousValue = this._Plugin.Entity;
3013        if (((previousValue != value)
3014              || (this._Plugin.HasLoadedOrAssignedValue == false)))
3015        {
3016          this.SendPropertyChanging();
3017          if ((previousValue != null))
3018          {
3019            this._Plugin.Entity = null;
3020            previousValue.PluginData.Remove(this);
3021          }
3022          this._Plugin.Entity = value;
3023          if ((value != null))
3024          {
3025            value.PluginData.Add(this);
3026            this._PluginId = value.PluginId;
3027          }
3028          else
3029          {
3030            this._PluginId = default(System.Guid);
3031          }
3032          this.SendPropertyChanged("Plugin");
3033        }
3034      }
3035    }
3036   
3037    public event PropertyChangingEventHandler PropertyChanging;
3038   
3039    public event PropertyChangedEventHandler PropertyChanged;
3040   
3041    protected virtual void SendPropertyChanging()
3042    {
3043      if ((this.PropertyChanging != null))
3044      {
3045        this.PropertyChanging(this, emptyChangingEventArgs);
3046      }
3047    }
3048   
3049    protected virtual void SendPropertyChanged(String propertyName)
3050    {
3051      if ((this.PropertyChanged != null))
3052      {
3053        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3054      }
3055    }
3056  }
3057 
3058  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.StateLog")]
3059  public partial class StateLog : INotifyPropertyChanging, INotifyPropertyChanged
3060  {
3061   
3062    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3063   
3064    private System.Guid _StateLogId;
3065   
3066    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
3067   
3068    private System.DateTime _DateTime;
3069   
3070    private System.Guid _JobId;
3071   
3072    private System.Nullable<System.Guid> _UserId;
3073   
3074    private System.Nullable<System.Guid> _SlaveId;
3075   
3076    private string _Exception;
3077   
3078    private EntityRef<Task> _Job;
3079   
3080    private EntityRef<Resource> _Resource;
3081   
3082    #region Extensibility Method Definitions
3083    partial void OnLoaded();
3084    partial void OnValidate(System.Data.Linq.ChangeAction action);
3085    partial void OnCreated();
3086    partial void OnStateLogIdChanging(System.Guid value);
3087    partial void OnStateLogIdChanged();
3088    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
3089    partial void OnStateChanged();
3090    partial void OnDateTimeChanging(System.DateTime value);
3091    partial void OnDateTimeChanged();
3092    partial void OnTaskIdChanging(System.Guid value);
3093    partial void OnTaskIdChanged();
3094    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
3095    partial void OnUserIdChanged();
3096    partial void OnSlaveIdChanging(System.Nullable<System.Guid> value);
3097    partial void OnSlaveIdChanged();
3098    partial void OnExceptionChanging(string value);
3099    partial void OnExceptionChanged();
3100    #endregion
3101   
3102    public StateLog()
3103    {
3104      this._Job = default(EntityRef<Task>);
3105      this._Resource = default(EntityRef<Resource>);
3106      OnCreated();
3107    }
3108   
3109    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StateLogId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
3110    public System.Guid StateLogId
3111    {
3112      get
3113      {
3114        return this._StateLogId;
3115      }
3116      set
3117      {
3118        if ((this._StateLogId != value))
3119        {
3120          this.OnStateLogIdChanging(value);
3121          this.SendPropertyChanging();
3122          this._StateLogId = value;
3123          this.SendPropertyChanged("StateLogId");
3124          this.OnStateLogIdChanged();
3125        }
3126      }
3127    }
3128   
3129    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
3130    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
3131    {
3132      get
3133      {
3134        return this._State;
3135      }
3136      set
3137      {
3138        if ((this._State != value))
3139        {
3140          this.OnStateChanging(value);
3141          this.SendPropertyChanging();
3142          this._State = value;
3143          this.SendPropertyChanged("State");
3144          this.OnStateChanged();
3145        }
3146      }
3147    }
3148   
3149    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateTime", DbType="DateTime NOT NULL")]
3150    public System.DateTime DateTime
3151    {
3152      get
3153      {
3154        return this._DateTime;
3155      }
3156      set
3157      {
3158        if ((this._DateTime != value))
3159        {
3160          this.OnDateTimeChanging(value);
3161          this.SendPropertyChanging();
3162          this._DateTime = value;
3163          this.SendPropertyChanged("DateTime");
3164          this.OnDateTimeChanged();
3165        }
3166      }
3167    }
3168   
3169    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
3170    public System.Guid TaskId
3171    {
3172      get
3173      {
3174        return this._JobId;
3175      }
3176      set
3177      {
3178        if ((this._JobId != value))
3179        {
3180          if (this._Job.HasLoadedOrAssignedValue)
3181          {
3182            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3183          }
3184          this.OnTaskIdChanging(value);
3185          this.SendPropertyChanging();
3186          this._JobId = value;
3187          this.SendPropertyChanged("TaskId");
3188          this.OnTaskIdChanged();
3189        }
3190      }
3191    }
3192   
3193    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
3194    public System.Nullable<System.Guid> UserId
3195    {
3196      get
3197      {
3198        return this._UserId;
3199      }
3200      set
3201      {
3202        if ((this._UserId != value))
3203        {
3204          this.OnUserIdChanging(value);
3205          this.SendPropertyChanging();
3206          this._UserId = value;
3207          this.SendPropertyChanged("UserId");
3208          this.OnUserIdChanged();
3209        }
3210      }
3211    }
3212   
3213    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier")]
3214    public System.Nullable<System.Guid> SlaveId
3215    {
3216      get
3217      {
3218        return this._SlaveId;
3219      }
3220      set
3221      {
3222        if ((this._SlaveId != value))
3223        {
3224          if (this._Resource.HasLoadedOrAssignedValue)
3225          {
3226            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3227          }
3228          this.OnSlaveIdChanging(value);
3229          this.SendPropertyChanging();
3230          this._SlaveId = value;
3231          this.SendPropertyChanged("SlaveId");
3232          this.OnSlaveIdChanged();
3233        }
3234      }
3235    }
3236   
3237    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)", CanBeNull=false)]
3238    public string Exception
3239    {
3240      get
3241      {
3242        return this._Exception;
3243      }
3244      set
3245      {
3246        if ((this._Exception != value))
3247        {
3248          this.OnExceptionChanging(value);
3249          this.SendPropertyChanging();
3250          this._Exception = value;
3251          this.SendPropertyChanged("Exception");
3252          this.OnExceptionChanged();
3253        }
3254      }
3255    }
3256   
3257    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
3258    public Task Task
3259    {
3260      get
3261      {
3262        return this._Job.Entity;
3263      }
3264      set
3265      {
3266        Task previousValue = this._Job.Entity;
3267        if (((previousValue != value)
3268              || (this._Job.HasLoadedOrAssignedValue == false)))
3269        {
3270          this.SendPropertyChanging();
3271          if ((previousValue != null))
3272          {
3273            this._Job.Entity = null;
3274            previousValue.StateLogs.Remove(this);
3275          }
3276          this._Job.Entity = value;
3277          if ((value != null))
3278          {
3279            value.StateLogs.Add(this);
3280            this._JobId = value.TaskId;
3281          }
3282          else
3283          {
3284            this._JobId = default(System.Guid);
3285          }
3286          this.SendPropertyChanged("Task");
3287        }
3288      }
3289    }
3290   
3291    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_Resource", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true)]
3292    public Resource Resource
3293    {
3294      get
3295      {
3296        return this._Resource.Entity;
3297      }
3298      set
3299      {
3300        Resource previousValue = this._Resource.Entity;
3301        if (((previousValue != value)
3302              || (this._Resource.HasLoadedOrAssignedValue == false)))
3303        {
3304          this.SendPropertyChanging();
3305          if ((previousValue != null))
3306          {
3307            this._Resource.Entity = null;
3308            previousValue.StateLogs.Remove(this);
3309          }
3310          this._Resource.Entity = value;
3311          if ((value != null))
3312          {
3313            value.StateLogs.Add(this);
3314            this._SlaveId = value.ResourceId;
3315          }
3316          else
3317          {
3318            this._SlaveId = default(Nullable<System.Guid>);
3319          }
3320          this.SendPropertyChanged("Resource");
3321        }
3322      }
3323    }
3324   
3325    public event PropertyChangingEventHandler PropertyChanging;
3326   
3327    public event PropertyChangedEventHandler PropertyChanged;
3328   
3329    protected virtual void SendPropertyChanging()
3330    {
3331      if ((this.PropertyChanging != null))
3332      {
3333        this.PropertyChanging(this, emptyChangingEventArgs);
3334      }
3335    }
3336   
3337    protected virtual void SendPropertyChanged(String propertyName)
3338    {
3339      if ((this.PropertyChanged != null))
3340      {
3341        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3342      }
3343    }
3344  }
3345 
3346  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JobPermission")]
3347  public partial class JobPermission : INotifyPropertyChanging, INotifyPropertyChanged
3348  {
3349   
3350    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3351   
3352    private System.Guid _HiveExperimentId;
3353   
3354    private System.Guid _GrantedUserId;
3355   
3356    private System.Guid _GrantedByUserId;
3357   
3358    private global::HeuristicLab.Services.Hive.DataAccess.Permission _Permission;
3359   
3360    private EntityRef<Job> _HiveExperiment;
3361   
3362    #region Extensibility Method Definitions
3363    partial void OnLoaded();
3364    partial void OnValidate(System.Data.Linq.ChangeAction action);
3365    partial void OnCreated();
3366    partial void OnJobIdChanging(System.Guid value);
3367    partial void OnJobIdChanged();
3368    partial void OnGrantedUserIdChanging(System.Guid value);
3369    partial void OnGrantedUserIdChanged();
3370    partial void OnGrantedByUserIdChanging(System.Guid value);
3371    partial void OnGrantedByUserIdChanged();
3372    partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.DataAccess.Permission value);
3373    partial void OnPermissionChanged();
3374    #endregion
3375   
3376    public JobPermission()
3377    {
3378      this._HiveExperiment = default(EntityRef<Job>);
3379      OnCreated();
3380    }
3381   
3382    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3383    public System.Guid JobId
3384    {
3385      get
3386      {
3387        return this._HiveExperimentId;
3388      }
3389      set
3390      {
3391        if ((this._HiveExperimentId != value))
3392        {
3393          if (this._HiveExperiment.HasLoadedOrAssignedValue)
3394          {
3395            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3396          }
3397          this.OnJobIdChanging(value);
3398          this.SendPropertyChanging();
3399          this._HiveExperimentId = value;
3400          this.SendPropertyChanged("JobId");
3401          this.OnJobIdChanged();
3402        }
3403      }
3404    }
3405   
3406    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3407    public System.Guid GrantedUserId
3408    {
3409      get
3410      {
3411        return this._GrantedUserId;
3412      }
3413      set
3414      {
3415        if ((this._GrantedUserId != value))
3416        {
3417          this.OnGrantedUserIdChanging(value);
3418          this.SendPropertyChanging();
3419          this._GrantedUserId = value;
3420          this.SendPropertyChanged("GrantedUserId");
3421          this.OnGrantedUserIdChanged();
3422        }
3423      }
3424    }
3425   
3426    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
3427    public System.Guid GrantedByUserId
3428    {
3429      get
3430      {
3431        return this._GrantedByUserId;
3432      }
3433      set
3434      {
3435        if ((this._GrantedByUserId != value))
3436        {
3437          this.OnGrantedByUserIdChanging(value);
3438          this.SendPropertyChanging();
3439          this._GrantedByUserId = value;
3440          this.SendPropertyChanged("GrantedByUserId");
3441          this.OnGrantedByUserIdChanged();
3442        }
3443      }
3444    }
3445   
3446    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)]
3447    public global::HeuristicLab.Services.Hive.DataAccess.Permission Permission
3448    {
3449      get
3450      {
3451        return this._Permission;
3452      }
3453      set
3454      {
3455        if ((this._Permission != value))
3456        {
3457          this.OnPermissionChanging(value);
3458          this.SendPropertyChanging();
3459          this._Permission = value;
3460          this.SendPropertyChanged("Permission");
3461          this.OnPermissionChanged();
3462        }
3463      }
3464    }
3465   
3466    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
3467    public Job Job
3468    {
3469      get
3470      {
3471        return this._HiveExperiment.Entity;
3472      }
3473      set
3474      {
3475        Job previousValue = this._HiveExperiment.Entity;
3476        if (((previousValue != value)
3477              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
3478        {
3479          this.SendPropertyChanging();
3480          if ((previousValue != null))
3481          {
3482            this._HiveExperiment.Entity = null;
3483            previousValue.JobPermissions.Remove(this);
3484          }
3485          this._HiveExperiment.Entity = value;
3486          if ((value != null))
3487          {
3488            value.JobPermissions.Add(this);
3489            this._HiveExperimentId = value.JobId;
3490          }
3491          else
3492          {
3493            this._HiveExperimentId = default(System.Guid);
3494          }
3495          this.SendPropertyChanged("Job");
3496        }
3497      }
3498    }
3499   
3500    public event PropertyChangingEventHandler PropertyChanging;
3501   
3502    public event PropertyChangedEventHandler PropertyChanged;
3503   
3504    protected virtual void SendPropertyChanging()
3505    {
3506      if ((this.PropertyChanging != null))
3507      {
3508        this.PropertyChanging(this, emptyChangingEventArgs);
3509      }
3510    }
3511   
3512    protected virtual void SendPropertyChanged(String propertyName)
3513    {
3514      if ((this.PropertyChanged != null))
3515      {
3516        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3517      }
3518    }
3519  }
3520 
3521  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3522  public partial class Lifecycle : INotifyPropertyChanging, INotifyPropertyChanged
3523  {
3524   
3525    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3526   
3527    private int _LifecycleId;
3528   
3529    private System.DateTime _LastCleanup;
3530   
3531    #region Extensibility Method Definitions
3532    partial void OnLoaded();
3533    partial void OnValidate(System.Data.Linq.ChangeAction action);
3534    partial void OnCreated();
3535    partial void OnLifecycleIdChanging(int value);
3536    partial void OnLifecycleIdChanged();
3537    partial void OnLastCleanupChanging(System.DateTime value);
3538    partial void OnLastCleanupChanged();
3539    #endregion
3540   
3541    public Lifecycle()
3542    {
3543      OnCreated();
3544    }
3545   
3546    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LifecycleId", DbType="Int", IsPrimaryKey=true)]
3547    public int LifecycleId
3548    {
3549      get
3550      {
3551        return this._LifecycleId;
3552      }
3553      set
3554      {
3555        if ((this._LifecycleId != value))
3556        {
3557          this.OnLifecycleIdChanging(value);
3558          this.SendPropertyChanging();
3559          this._LifecycleId = value;
3560          this.SendPropertyChanged("LifecycleId");
3561          this.OnLifecycleIdChanged();
3562        }
3563      }
3564    }
3565   
3566    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastCleanup", DbType="DateTime")]
3567    public System.DateTime LastCleanup
3568    {
3569      get
3570      {
3571        return this._LastCleanup;
3572      }
3573      set
3574      {
3575        if ((this._LastCleanup != value))
3576        {
3577          this.OnLastCleanupChanging(value);
3578          this.SendPropertyChanging();
3579          this._LastCleanup = value;
3580          this.SendPropertyChanged("LastCleanup");
3581          this.OnLastCleanupChanged();
3582        }
3583      }
3584    }
3585   
3586    public event PropertyChangingEventHandler PropertyChanging;
3587   
3588    public event PropertyChangedEventHandler PropertyChanged;
3589   
3590    protected virtual void SendPropertyChanging()
3591    {
3592      if ((this.PropertyChanging != null))
3593      {
3594        this.PropertyChanging(this, emptyChangingEventArgs);
3595      }
3596    }
3597   
3598    protected virtual void SendPropertyChanged(String propertyName)
3599    {
3600      if ((this.PropertyChanged != null))
3601      {
3602        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3603      }
3604    }
3605  }
3606 
3607  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3608  public partial class DeletedJobStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3609  {
3610   
3611    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3612   
3613    private System.Guid _UserId;
3614   
3615    private double _ExecutionTime;
3616   
3617    private double _ExecutionTimeFinishedJobs;
3618   
3619    private double _StartToEndTime;
3620   
3621    private System.Guid _DeletedJobStatisticsId;
3622   
3623    #region Extensibility Method Definitions
3624    partial void OnLoaded();
3625    partial void OnValidate(System.Data.Linq.ChangeAction action);
3626    partial void OnCreated();
3627    partial void OnUserIdChanging(System.Guid value);
3628    partial void OnUserIdChanged();
3629    partial void OnExecutionTimeSChanging(double value);
3630    partial void OnExecutionTimeSChanged();
3631    partial void OnExecutionTimeSFinishedJobsChanging(double value);
3632    partial void OnExecutionTimeSFinishedJobsChanged();
3633    partial void OnStartToEndTimeSChanging(double value);
3634    partial void OnStartToEndTimeSChanged();
3635    partial void OnDeletedJobStatisticsIdChanging(System.Guid value);
3636    partial void OnDeletedJobStatisticsIdChanged();
3637    #endregion
3638   
3639    public DeletedJobStatistics()
3640    {
3641      OnCreated();
3642    }
3643   
3644    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
3645    public System.Guid UserId
3646    {
3647      get
3648      {
3649        return this._UserId;
3650      }
3651      set
3652      {
3653        if ((this._UserId != value))
3654        {
3655          this.OnUserIdChanging(value);
3656          this.SendPropertyChanging();
3657          this._UserId = value;
3658          this.SendPropertyChanged("UserId");
3659          this.OnUserIdChanged();
3660        }
3661      }
3662    }
3663   
3664    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
3665    public double ExecutionTimeS
3666    {
3667      get
3668      {
3669        return this._ExecutionTime;
3670      }
3671      set
3672      {
3673        if ((this._ExecutionTime != value))
3674        {
3675          this.OnExecutionTimeSChanging(value);
3676          this.SendPropertyChanging();
3677          this._ExecutionTime = value;
3678          this.SendPropertyChanged("ExecutionTimeS");
3679          this.OnExecutionTimeSChanged();
3680        }
3681      }
3682    }
3683   
3684    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
3685    public double ExecutionTimeSFinishedJobs
3686    {
3687      get
3688      {
3689        return this._ExecutionTimeFinishedJobs;
3690      }
3691      set
3692      {
3693        if ((this._ExecutionTimeFinishedJobs != value))
3694        {
3695          this.OnExecutionTimeSFinishedJobsChanging(value);
3696          this.SendPropertyChanging();
3697          this._ExecutionTimeFinishedJobs = value;
3698          this.SendPropertyChanged("ExecutionTimeSFinishedJobs");
3699          this.OnExecutionTimeSFinishedJobsChanged();
3700        }
3701      }
3702    }
3703   
3704    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
3705    public double StartToEndTimeS
3706    {
3707      get
3708      {
3709        return this._StartToEndTime;
3710      }
3711      set
3712      {
3713        if ((this._StartToEndTime != value))
3714        {
3715          this.OnStartToEndTimeSChanging(value);
3716          this.SendPropertyChanging();
3717          this._StartToEndTime = value;
3718          this.SendPropertyChanged("StartToEndTimeS");
3719          this.OnStartToEndTimeSChanged();
3720        }
3721      }
3722    }
3723   
3724    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeletedJobStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
3725    public System.Guid DeletedJobStatisticsId
3726    {
3727      get
3728      {
3729        return this._DeletedJobStatisticsId;
3730      }
3731      set
3732      {
3733        if ((this._DeletedJobStatisticsId != value))
3734        {
3735          this.OnDeletedJobStatisticsIdChanging(value);
3736          this.SendPropertyChanging();
3737          this._DeletedJobStatisticsId = value;
3738          this.SendPropertyChanged("DeletedJobStatisticsId");
3739          this.OnDeletedJobStatisticsIdChanged();
3740        }
3741      }
3742    }
3743   
3744    public event PropertyChangingEventHandler PropertyChanging;
3745   
3746    public event PropertyChangedEventHandler PropertyChanged;
3747   
3748    protected virtual void SendPropertyChanging()
3749    {
3750      if ((this.PropertyChanging != null))
3751      {
3752        this.PropertyChanging(this, emptyChangingEventArgs);
3753      }
3754    }
3755   
3756    protected virtual void SendPropertyChanged(String propertyName)
3757    {
3758      if ((this.PropertyChanged != null))
3759      {
3760        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3761      }
3762    }
3763  }
3764 
3765  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3766  public partial class UserStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3767  {
3768   
3769    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3770   
3771    private System.Guid _StatisticsId;
3772   
3773    private System.Guid _UserId;
3774   
3775    private double _ExecutionTime;
3776   
3777    private int _CoresUsed;
3778   
3779    private double _ExecutionTimeFinishedJobs;
3780   
3781    private double _StartToEndTime;
3782   
3783    private EntityRef<Statistics> _Statistics;
3784   
3785    #region Extensibility Method Definitions
3786    partial void OnLoaded();
3787    partial void OnValidate(System.Data.Linq.ChangeAction action);
3788    partial void OnCreated();
3789    partial void OnStatisticsIdChanging(System.Guid value);
3790    partial void OnStatisticsIdChanged();
3791    partial void OnUserIdChanging(System.Guid value);
3792    partial void OnUserIdChanged();
3793    partial void OnExecutionTimeMsChanging(double value);
3794    partial void OnExecutionTimeMsChanged();
3795    partial void OnUsedCoresChanging(int value);
3796    partial void OnUsedCoresChanged();
3797    partial void OnExecutionTimeMsFinishedJobsChanging(double value);
3798    partial void OnExecutionTimeMsFinishedJobsChanged();
3799    partial void OnStartToEndTimeMsChanging(double value);
3800    partial void OnStartToEndTimeMsChanged();
3801    #endregion
3802   
3803    public UserStatistics()
3804    {
3805      this._Statistics = default(EntityRef<Statistics>);
3806      OnCreated();
3807    }
3808   
3809    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3810    public System.Guid StatisticsId
3811    {
3812      get
3813      {
3814        return this._StatisticsId;
3815      }
3816      set
3817      {
3818        if ((this._StatisticsId != value))
3819        {
3820          if (this._Statistics.HasLoadedOrAssignedValue)
3821          {
3822            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3823          }
3824          this.OnStatisticsIdChanging(value);
3825          this.SendPropertyChanging();
3826          this._StatisticsId = value;
3827          this.SendPropertyChanged("StatisticsId");
3828          this.OnStatisticsIdChanged();
3829        }
3830      }
3831    }
3832   
3833    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3834    public System.Guid UserId
3835    {
3836      get
3837      {
3838        return this._UserId;
3839      }
3840      set
3841      {
3842        if ((this._UserId != value))
3843        {
3844          this.OnUserIdChanging(value);
3845          this.SendPropertyChanging();
3846          this._UserId = value;
3847          this.SendPropertyChanged("UserId");
3848          this.OnUserIdChanged();
3849        }
3850      }
3851    }
3852   
3853    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
3854    public double ExecutionTimeMs
3855    {
3856      get
3857      {
3858        return this._ExecutionTime;
3859      }
3860      set
3861      {
3862        if ((this._ExecutionTime != value))
3863        {
3864          this.OnExecutionTimeMsChanging(value);
3865          this.SendPropertyChanging();
3866          this._ExecutionTime = value;
3867          this.SendPropertyChanged("ExecutionTimeMs");
3868          this.OnExecutionTimeMsChanged();
3869        }
3870      }
3871    }
3872   
3873    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresUsed", DbType="Int NOT NULL")]
3874    public int UsedCores
3875    {
3876      get
3877      {
3878        return this._CoresUsed;
3879      }
3880      set
3881      {
3882        if ((this._CoresUsed != value))
3883        {
3884          this.OnUsedCoresChanging(value);
3885          this.SendPropertyChanging();
3886          this._CoresUsed = value;
3887          this.SendPropertyChanged("UsedCores");
3888          this.OnUsedCoresChanged();
3889        }
3890      }
3891    }
3892   
3893    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
3894    public double ExecutionTimeMsFinishedJobs
3895    {
3896      get
3897      {
3898        return this._ExecutionTimeFinishedJobs;
3899      }
3900      set
3901      {
3902        if ((this._ExecutionTimeFinishedJobs != value))
3903        {
3904          this.OnExecutionTimeMsFinishedJobsChanging(value);
3905          this.SendPropertyChanging();
3906          this._ExecutionTimeFinishedJobs = value;
3907          this.SendPropertyChanged("ExecutionTimeMsFinishedJobs");
3908          this.OnExecutionTimeMsFinishedJobsChanged();
3909        }
3910      }
3911    }
3912   
3913    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
3914    public double StartToEndTimeMs
3915    {
3916      get
3917      {
3918        return this._StartToEndTime;
3919      }
3920      set
3921      {
3922        if ((this._StartToEndTime != value))
3923        {
3924          this.OnStartToEndTimeMsChanging(value);
3925          this.SendPropertyChanging();
3926          this._StartToEndTime = value;
3927          this.SendPropertyChanged("StartToEndTimeMs");
3928          this.OnStartToEndTimeMsChanged();
3929        }
3930      }
3931    }
3932   
3933    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_UserStatistics", Storage="_Statistics", ThisKey="StatisticsId", OtherKey="StatisticsId", IsForeignKey=true)]
3934    public Statistics Statistics
3935    {
3936      get
3937      {
3938        return this._Statistics.Entity;
3939      }
3940      set
3941      {
3942        Statistics previousValue = this._Statistics.Entity;
3943        if (((previousValue != value)
3944              || (this._Statistics.HasLoadedOrAssignedValue == false)))
3945        {
3946          this.SendPropertyChanging();
3947          if ((previousValue != null))
3948          {
3949            this._Statistics.Entity = null;
3950            previousValue.UserStatistics.Remove(this);
3951          }
3952          this._Statistics.Entity = value;
3953          if ((value != null))
3954          {
3955            value.UserStatistics.Add(this);
3956            this._StatisticsId = value.StatisticsId;
3957          }
3958          else
3959          {
3960            this._StatisticsId = default(System.Guid);
3961          }
3962          this.SendPropertyChanged("Statistics");
3963        }
3964      }
3965    }
3966   
3967    public event PropertyChangingEventHandler PropertyChanging;
3968   
3969    public event PropertyChangedEventHandler PropertyChanged;
3970   
3971    protected virtual void SendPropertyChanging()
3972    {
3973      if ((this.PropertyChanging != null))
3974      {
3975        this.PropertyChanging(this, emptyChangingEventArgs);
3976      }
3977    }
3978   
3979    protected virtual void SendPropertyChanged(String propertyName)
3980    {
3981      if ((this.PropertyChanged != null))
3982      {
3983        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3984      }
3985    }
3986  }
3987 
3988  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3989  public partial class SlaveStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3990  {
3991   
3992    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3993   
3994    private System.Guid _StatisticsId;
3995   
3996    private System.Guid _SlaveId;
3997   
3998    private int _Cores;
3999   
4000    private int _FreeCores;
4001   
4002    private double _CpuUtilization;
4003   
4004    private int _Memory;
4005   
4006    private int _FreeMemory;
4007   
4008    private EntityRef<Statistics> _Statistics;
4009   
4010    #region Extensibility Method Definitions
4011    partial void OnLoaded();
4012    partial void OnValidate(System.Data.Linq.ChangeAction action);
4013    partial void OnCreated();
4014    partial void OnStatisticsIdChanging(System.Guid value);
4015    partial void OnStatisticsIdChanged();
4016    partial void OnSlaveIdChanging(System.Guid value);
4017    partial void OnSlaveIdChanged();
4018    partial void OnCoresChanging(int value);
4019    partial void OnCoresChanged();
4020    partial void OnFreeCoresChanging(int value);
4021    partial void OnFreeCoresChanged();
4022    partial void OnCpuUtilizationChanging(double value);
4023    partial void OnCpuUtilizationChanged();
4024    partial void OnMemoryChanging(int value);
4025    partial void OnMemoryChanged();
4026    partial void OnFreeMemoryChanging(int value);
4027    partial void OnFreeMemoryChanged();
4028    #endregion
4029   
4030    public SlaveStatistics()
4031    {
4032      this._Statistics = default(EntityRef<Statistics>);
4033      OnCreated();
4034    }
4035   
4036    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4037    public System.Guid StatisticsId
4038    {
4039      get
4040      {
4041        return this._StatisticsId;
4042      }
4043      set
4044      {
4045        if ((this._StatisticsId != value))
4046        {
4047          if (this._Statistics.HasLoadedOrAssignedValue)
4048          {
4049            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
4050          }
4051          this.OnStatisticsIdChanging(value);
4052          this.SendPropertyChanging();
4053          this._StatisticsId = value;
4054          this.SendPropertyChanged("StatisticsId");
4055          this.OnStatisticsIdChanged();
4056        }
4057      }
4058    }
4059   
4060    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4061    public System.Guid SlaveId
4062    {
4063      get
4064      {
4065        return this._SlaveId;
4066      }
4067      set
4068      {
4069        if ((this._SlaveId != value))
4070        {
4071          this.OnSlaveIdChanging(value);
4072          this.SendPropertyChanging();
4073          this._SlaveId = value;
4074          this.SendPropertyChanged("SlaveId");
4075          this.OnSlaveIdChanged();
4076        }
4077      }
4078    }
4079   
4080    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cores", DbType="Int NOT NULL")]
4081    public int Cores
4082    {
4083      get
4084      {
4085        return this._Cores;
4086      }
4087      set
4088      {
4089        if ((this._Cores != value))
4090        {
4091          this.OnCoresChanging(value);
4092          this.SendPropertyChanging();
4093          this._Cores = value;
4094          this.SendPropertyChanged("Cores");
4095          this.OnCoresChanged();
4096        }
4097      }
4098    }
4099   
4100    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeCores", DbType="Int NOT NULL")]
4101    public int FreeCores
4102    {
4103      get
4104      {
4105        return this._FreeCores;
4106      }
4107      set
4108      {
4109        if ((this._FreeCores != value))
4110        {
4111          this.OnFreeCoresChanging(value);
4112          this.SendPropertyChanging();
4113          this._FreeCores = value;
4114          this.SendPropertyChanged("FreeCores");
4115          this.OnFreeCoresChanged();
4116        }
4117      }
4118    }
4119   
4120    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="float NOT NULL")]
4121    public double CpuUtilization
4122    {
4123      get
4124      {
4125        return this._CpuUtilization;
4126      }
4127      set
4128      {
4129        if ((this._CpuUtilization != value))
4130        {
4131          this.OnCpuUtilizationChanging(value);
4132          this.SendPropertyChanging();
4133          this._CpuUtilization = value;
4134          this.SendPropertyChanged("CpuUtilization");
4135          this.OnCpuUtilizationChanged();
4136        }
4137      }
4138    }
4139   
4140    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int NOT NULL")]
4141    public int Memory
4142    {
4143      get
4144      {
4145        return this._Memory;
4146      }
4147      set
4148      {
4149        if ((this._Memory != value))
4150        {
4151          this.OnMemoryChanging(value);
4152          this.SendPropertyChanging();
4153          this._Memory = value;
4154          this.SendPropertyChanged("Memory");
4155          this.OnMemoryChanged();
4156        }
4157      }
4158    }
4159   
4160    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int NOT NULL")]
4161    public int FreeMemory
4162    {
4163      get
4164      {
4165        return this._FreeMemory;
4166      }
4167      set
4168      {
4169        if ((this._FreeMemory != value))
4170        {
4171          this.OnFreeMemoryChanging(value);
4172          this.SendPropertyChanging();
4173          this._FreeMemory = value;
4174          this.SendPropertyChanged("FreeMemory");
4175          this.OnFreeMemoryChanged();
4176        }
4177      }
4178    }
4179   
4180    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_SlaveStatistics", Storage="_Statistics", ThisKey="StatisticsId", OtherKey="StatisticsId", IsForeignKey=true)]
4181    public Statistics Statistics
4182    {
4183      get
4184      {
4185        return this._Statistics.Entity;
4186      }
4187      set
4188      {
4189        Statistics previousValue = this._Statistics.Entity;
4190        if (((previousValue != value)
4191              || (this._Statistics.HasLoadedOrAssignedValue == false)))
4192        {
4193          this.SendPropertyChanging();
4194          if ((previousValue != null))
4195          {
4196            this._Statistics.Entity = null;
4197            previousValue.SlaveStatistics.Remove(this);
4198          }
4199          this._Statistics.Entity = value;
4200          if ((value != null))
4201          {
4202            value.SlaveStatistics.Add(this);
4203            this._StatisticsId = value.StatisticsId;
4204          }
4205          else
4206          {
4207            this._StatisticsId = default(System.Guid);
4208          }
4209          this.SendPropertyChanged("Statistics");
4210        }
4211      }
4212    }
4213   
4214    public event PropertyChangingEventHandler PropertyChanging;
4215   
4216    public event PropertyChangedEventHandler PropertyChanged;
4217   
4218    protected virtual void SendPropertyChanging()
4219    {
4220      if ((this.PropertyChanging != null))
4221      {
4222        this.PropertyChanging(this, emptyChangingEventArgs);
4223      }
4224    }
4225   
4226    protected virtual void SendPropertyChanged(String propertyName)
4227    {
4228      if ((this.PropertyChanged != null))
4229      {
4230        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4231      }
4232    }
4233  }
4234 
4235  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
4236  public partial class Statistics : INotifyPropertyChanging, INotifyPropertyChanged
4237  {
4238   
4239    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4240   
4241    private System.Guid _StatisticsId;
4242   
4243    private System.DateTime _Timestamp;
4244   
4245    private EntitySet<UserStatistics> _UserStatistics;
4246   
4247    private EntitySet<SlaveStatistics> _SlaveStatistics;
4248   
4249    #region Extensibility Method Definitions
4250    partial void OnLoaded();
4251    partial void OnValidate(System.Data.Linq.ChangeAction action);
4252    partial void OnCreated();
4253    partial void OnStatisticsIdChanging(System.Guid value);
4254    partial void OnStatisticsIdChanged();
4255    partial void OnTimestampChanging(System.DateTime value);
4256    partial void OnTimestampChanged();
4257    #endregion
4258   
4259    public Statistics()
4260    {
4261      this._UserStatistics = new EntitySet<UserStatistics>(new Action<UserStatistics>(this.attach_UserStatistics), new Action<UserStatistics>(this.detach_UserStatistics));
4262      this._SlaveStatistics = new EntitySet<SlaveStatistics>(new Action<SlaveStatistics>(this.attach_SlaveStatistics), new Action<SlaveStatistics>(this.detach_SlaveStatistics));
4263      OnCreated();
4264    }
4265   
4266    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
4267    public System.Guid StatisticsId
4268    {
4269      get
4270      {
4271        return this._StatisticsId;
4272      }
4273      set
4274      {
4275        if ((this._StatisticsId != value))
4276        {
4277          this.OnStatisticsIdChanging(value);
4278          this.SendPropertyChanging();
4279          this._StatisticsId = value;
4280          this.SendPropertyChanged("StatisticsId");
4281          this.OnStatisticsIdChanged();
4282        }
4283      }
4284    }
4285   
4286    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Timestamp")]
4287    public System.DateTime Timestamp
4288    {
4289      get
4290      {
4291        return this._Timestamp;
4292      }
4293      set
4294      {
4295        if ((this._Timestamp != value))
4296        {
4297          this.OnTimestampChanging(value);
4298          this.SendPropertyChanging();
4299          this._Timestamp = value;
4300          this.SendPropertyChanged("Timestamp");
4301          this.OnTimestampChanged();
4302        }
4303      }
4304    }
4305   
4306    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_UserStatistics", Storage="_UserStatistics", ThisKey="StatisticsId", OtherKey="StatisticsId")]
4307    public EntitySet<UserStatistics> UserStatistics
4308    {
4309      get
4310      {
4311        return this._UserStatistics;
4312      }
4313      set
4314      {
4315        this._UserStatistics.Assign(value);
4316      }
4317    }
4318   
4319    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_SlaveStatistics", Storage="_SlaveStatistics", ThisKey="StatisticsId", OtherKey="StatisticsId")]
4320    public EntitySet<SlaveStatistics> SlaveStatistics
4321    {
4322      get
4323      {
4324        return this._SlaveStatistics;
4325      }
4326      set
4327      {
4328        this._SlaveStatistics.Assign(value);
4329      }
4330    }
4331   
4332    public event PropertyChangingEventHandler PropertyChanging;
4333   
4334    public event PropertyChangedEventHandler PropertyChanged;
4335   
4336    protected virtual void SendPropertyChanging()
4337    {
4338      if ((this.PropertyChanging != null))
4339      {
4340        this.PropertyChanging(this, emptyChangingEventArgs);
4341      }
4342    }
4343   
4344    protected virtual void SendPropertyChanged(String propertyName)
4345    {
4346      if ((this.PropertyChanged != null))
4347      {
4348        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4349      }
4350    }
4351   
4352    private void attach_UserStatistics(UserStatistics entity)
4353    {
4354      this.SendPropertyChanging();
4355      entity.Statistics = this;
4356    }
4357   
4358    private void detach_UserStatistics(UserStatistics entity)
4359    {
4360      this.SendPropertyChanging();
4361      entity.Statistics = null;
4362    }
4363   
4364    private void attach_SlaveStatistics(SlaveStatistics entity)
4365    {
4366      this.SendPropertyChanging();
4367      entity.Statistics = this;
4368    }
4369   
4370    private void detach_SlaveStatistics(SlaveStatistics entity)
4371    {
4372      this.SendPropertyChanging();
4373      entity.Statistics = null;
4374    }
4375  }
4376 
4377  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ResourcePermission")]
4378  public partial class ResourcePermission : INotifyPropertyChanging, INotifyPropertyChanged
4379  {
4380   
4381    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4382   
4383    private System.Guid _ResourceId;
4384   
4385    private System.Guid _GrantedUserId;
4386   
4387    private System.Guid _GrantedByUserId;
4388   
4389    private EntityRef<Resource> _Resource;
4390   
4391    #region Extensibility Method Definitions
4392    partial void OnLoaded();
4393    partial void OnValidate(System.Data.Linq.ChangeAction action);
4394    partial void OnCreated();
4395    partial void OnResourceIdChanging(System.Guid value);
4396    partial void OnResourceIdChanged();
4397    partial void OnGrantedUserIdChanging(System.Guid value);
4398    partial void OnGrantedUserIdChanged();
4399    partial void OnGrantedByUserIdChanging(System.Guid value);
4400    partial void OnGrantedByUserIdChanged();
4401    #endregion
4402   
4403    public ResourcePermission()
4404    {
4405      this._Resource = default(EntityRef<Resource>);
4406      OnCreated();
4407    }
4408   
4409    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4410    public System.Guid ResourceId
4411    {
4412      get
4413      {
4414        return this._ResourceId;
4415      }
4416      set
4417      {
4418        if ((this._ResourceId != value))
4419        {
4420          if (this._Resource.HasLoadedOrAssignedValue)
4421          {
4422            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
4423          }
4424          this.OnResourceIdChanging(value);
4425          this.SendPropertyChanging();
4426          this._ResourceId = value;
4427          this.SendPropertyChanged("ResourceId");
4428          this.OnResourceIdChanged();
4429        }
4430      }
4431    }
4432   
4433    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4434    public System.Guid GrantedUserId
4435    {
4436      get
4437      {
4438        return this._GrantedUserId;
4439      }
4440      set
4441      {
4442        if ((this._GrantedUserId != value))
4443        {
4444          this.OnGrantedUserIdChanging(value);
4445          this.SendPropertyChanging();
4446          this._GrantedUserId = value;
4447          this.SendPropertyChanged("GrantedUserId");
4448          this.OnGrantedUserIdChanged();
4449        }
4450      }
4451    }
4452   
4453    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
4454    public System.Guid GrantedByUserId
4455    {
4456      get
4457      {
4458        return this._GrantedByUserId;
4459      }
4460      set
4461      {
4462        if ((this._GrantedByUserId != value))
4463        {
4464          this.OnGrantedByUserIdChanging(value);
4465          this.SendPropertyChanging();
4466          this._GrantedByUserId = value;
4467          this.SendPropertyChanged("GrantedByUserId");
4468          this.OnGrantedByUserIdChanged();
4469        }
4470      }
4471    }
4472   
4473    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]
4474    public Resource Resource
4475    {
4476      get
4477      {
4478        return this._Resource.Entity;
4479      }
4480      set
4481      {
4482        Resource previousValue = this._Resource.Entity;
4483        if (((previousValue != value)
4484              || (this._Resource.HasLoadedOrAssignedValue == false)))
4485        {
4486          this.SendPropertyChanging();
4487          if ((previousValue != null))
4488          {
4489            this._Resource.Entity = null;
4490            previousValue.ResourcePermissions.Remove(this);
4491          }
4492          this._Resource.Entity = value;
4493          if ((value != null))
4494          {
4495            value.ResourcePermissions.Add(this);
4496            this._ResourceId = value.ResourceId;
4497          }
4498          else
4499          {
4500            this._ResourceId = default(System.Guid);
4501          }
4502          this.SendPropertyChanged("Resource");
4503        }
4504      }
4505    }
4506   
4507    public event PropertyChangingEventHandler PropertyChanging;
4508   
4509    public event PropertyChangedEventHandler PropertyChanged;
4510   
4511    protected virtual void SendPropertyChanging()
4512    {
4513      if ((this.PropertyChanging != null))
4514      {
4515        this.PropertyChanging(this, emptyChangingEventArgs);
4516      }
4517    }
4518   
4519    protected virtual void SendPropertyChanged(String propertyName)
4520    {
4521      if ((this.PropertyChanged != null))
4522      {
4523        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4524      }
4525    }
4526  }
4527 
4528  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
4529  public partial class UserPriority : INotifyPropertyChanging, INotifyPropertyChanged
4530  {
4531   
4532    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4533   
4534    private System.Guid _UserId;
4535   
4536    private System.DateTime _DateEnqueued;
4537   
4538    #region Extensibility Method Definitions
4539    partial void OnLoaded();
4540    partial void OnValidate(System.Data.Linq.ChangeAction action);
4541    partial void OnCreated();
4542    partial void OnUserIdChanging(System.Guid value);
4543    partial void OnUserIdChanged();
4544    partial void OnDateEnqueuedChanging(System.DateTime value);
4545    partial void OnDateEnqueuedChanged();
4546    #endregion
4547   
4548    public UserPriority()
4549    {
4550      OnCreated();
4551    }
4552   
4553    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4554    public System.Guid UserId
4555    {
4556      get
4557      {
4558        return this._UserId;
4559      }
4560      set
4561      {
4562        if ((this._UserId != value))
4563        {
4564          this.OnUserIdChanging(value);
4565          this.SendPropertyChanging();
4566          this._UserId = value;
4567          this.SendPropertyChanged("UserId");
4568          this.OnUserIdChanged();
4569        }
4570      }
4571    }
4572   
4573    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateEnqueued", DbType="DateTime NOT NULL")]
4574    public System.DateTime DateEnqueued
4575    {
4576      get
4577      {
4578        return this._DateEnqueued;
4579      }
4580      set
4581      {
4582        if ((this._DateEnqueued != value))
4583        {
4584          this.OnDateEnqueuedChanging(value);
4585          this.SendPropertyChanging();
4586          this._DateEnqueued = value;
4587          this.SendPropertyChanged("DateEnqueued");
4588          this.OnDateEnqueuedChanged();
4589        }
4590      }
4591    }
4592   
4593    public event PropertyChangingEventHandler PropertyChanging;
4594   
4595    public event PropertyChangedEventHandler PropertyChanged;
4596   
4597    protected virtual void SendPropertyChanging()
4598    {
4599      if ((this.PropertyChanging != null))
4600      {
4601        this.PropertyChanging(this, emptyChangingEventArgs);
4602      }
4603    }
4604   
4605    protected virtual void SendPropertyChanged(String propertyName)
4606    {
4607      if ((this.PropertyChanged != null))
4608      {
4609        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4610      }
4611    }
4612  }
4613 
4614  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimClient")]
4615  public partial class DimClient : INotifyPropertyChanging, INotifyPropertyChanged
4616  {
4617   
4618    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4619   
4620    private System.Guid _Id;
4621   
4622    private string _Name;
4623   
4624    private System.Guid _ResourceId;
4625   
4626    private System.Nullable<System.DateTime> _ExpirationTime;
4627   
4628    private System.Nullable<System.Guid> _ResourceGroupId;
4629   
4630    private System.Nullable<System.Guid> _ResourceGroup2Id;
4631   
4632    private EntitySet<FactTask> _FactTasks;
4633   
4634    private EntitySet<FactClientInfo> _FactClientInfos;
4635   
4636    #region Extensibility Method Definitions
4637    partial void OnLoaded();
4638    partial void OnValidate(System.Data.Linq.ChangeAction action);
4639    partial void OnCreated();
4640    partial void OnIdChanging(System.Guid value);
4641    partial void OnIdChanged();
4642    partial void OnNameChanging(string value);
4643    partial void OnNameChanged();
4644    partial void OnResourceIdChanging(System.Guid value);
4645    partial void OnResourceIdChanged();
4646    partial void OnExpirationTimeChanging(System.Nullable<System.DateTime> value);
4647    partial void OnExpirationTimeChanged();
4648    partial void OnResourceGroupIdChanging(System.Nullable<System.Guid> value);
4649    partial void OnResourceGroupIdChanged();
4650    partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
4651    partial void OnResourceGroup2IdChanged();
4652    #endregion
4653   
4654    public DimClient()
4655    {
4656      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
4657      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
4658      OnCreated();
4659    }
4660   
4661    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
4662    public System.Guid Id
4663    {
4664      get
4665      {
4666        return this._Id;
4667      }
4668      set
4669      {
4670        if ((this._Id != value))
4671        {
4672          this.OnIdChanging(value);
4673          this.SendPropertyChanging();
4674          this._Id = value;
4675          this.SendPropertyChanged("Id");
4676          this.OnIdChanged();
4677        }
4678      }
4679    }
4680   
4681    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
4682    public string Name
4683    {
4684      get
4685      {
4686        return this._Name;
4687      }
4688      set
4689      {
4690        if ((this._Name != value))
4691        {
4692          this.OnNameChanging(value);
4693          this.SendPropertyChanging();
4694          this._Name = value;
4695          this.SendPropertyChanged("Name");
4696          this.OnNameChanged();
4697        }
4698      }
4699    }
4700   
4701    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
4702    public System.Guid ResourceId
4703    {
4704      get
4705      {
4706        return this._ResourceId;
4707      }
4708      set
4709      {
4710        if ((this._ResourceId != value))
4711        {
4712          this.OnResourceIdChanging(value);
4713          this.SendPropertyChanging();
4714          this._ResourceId = value;
4715          this.SendPropertyChanged("ResourceId");
4716          this.OnResourceIdChanged();
4717        }
4718      }
4719    }
4720   
4721    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExpirationTime", DbType="DateTime")]
4722    public System.Nullable<System.DateTime> ExpirationTime
4723    {
4724      get
4725      {
4726        return this._ExpirationTime;
4727      }
4728      set
4729      {
4730        if ((this._ExpirationTime != value))
4731        {
4732          this.OnExpirationTimeChanging(value);
4733          this.SendPropertyChanging();
4734          this._ExpirationTime = value;
4735          this.SendPropertyChanged("ExpirationTime");
4736          this.OnExpirationTimeChanged();
4737        }
4738      }
4739    }
4740   
4741    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroupId", DbType="UniqueIdentifier")]
4742    public System.Nullable<System.Guid> ResourceGroupId
4743    {
4744      get
4745      {
4746        return this._ResourceGroupId;
4747      }
4748      set
4749      {
4750        if ((this._ResourceGroupId != value))
4751        {
4752          this.OnResourceGroupIdChanging(value);
4753          this.SendPropertyChanging();
4754          this._ResourceGroupId = value;
4755          this.SendPropertyChanged("ResourceGroupId");
4756          this.OnResourceGroupIdChanged();
4757        }
4758      }
4759    }
4760   
4761    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroup2Id", DbType="UniqueIdentifier")]
4762    public System.Nullable<System.Guid> ResourceGroup2Id
4763    {
4764      get
4765      {
4766        return this._ResourceGroup2Id;
4767      }
4768      set
4769      {
4770        if ((this._ResourceGroup2Id != value))
4771        {
4772          this.OnResourceGroup2IdChanging(value);
4773          this.SendPropertyChanging();
4774          this._ResourceGroup2Id = value;
4775          this.SendPropertyChanged("ResourceGroup2Id");
4776          this.OnResourceGroup2IdChanged();
4777        }
4778      }
4779    }
4780   
4781    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_FactTasks", ThisKey="Id", OtherKey="LastClientId")]
4782    public EntitySet<FactTask> FactTasks
4783    {
4784      get
4785      {
4786        return this._FactTasks;
4787      }
4788      set
4789      {
4790        this._FactTasks.Assign(value);
4791      }
4792    }
4793   
4794    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_FactClientInfos", ThisKey="Id", OtherKey="ClientId")]
4795    public EntitySet<FactClientInfo> FactClientInfos
4796    {
4797      get
4798      {
4799        return this._FactClientInfos;
4800      }
4801      set
4802      {
4803        this._FactClientInfos.Assign(value);
4804      }
4805    }
4806   
4807    public event PropertyChangingEventHandler PropertyChanging;
4808   
4809    public event PropertyChangedEventHandler PropertyChanged;
4810   
4811    protected virtual void SendPropertyChanging()
4812    {
4813      if ((this.PropertyChanging != null))
4814      {
4815        this.PropertyChanging(this, emptyChangingEventArgs);
4816      }
4817    }
4818   
4819    protected virtual void SendPropertyChanged(String propertyName)
4820    {
4821      if ((this.PropertyChanged != null))
4822      {
4823        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4824      }
4825    }
4826   
4827    private void attach_FactTasks(FactTask entity)
4828    {
4829      this.SendPropertyChanging();
4830      entity.DimClient = this;
4831    }
4832   
4833    private void detach_FactTasks(FactTask entity)
4834    {
4835      this.SendPropertyChanging();
4836      entity.DimClient = null;
4837    }
4838   
4839    private void attach_FactClientInfos(FactClientInfo entity)
4840    {
4841      this.SendPropertyChanging();
4842      entity.DimClient = this;
4843    }
4844   
4845    private void detach_FactClientInfos(FactClientInfo entity)
4846    {
4847      this.SendPropertyChanging();
4848      entity.DimClient = null;
4849    }
4850  }
4851 
4852  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactTask")]
4853  public partial class FactTask : INotifyPropertyChanging, INotifyPropertyChanged
4854  {
4855   
4856    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4857   
4858    private System.Guid _TaskId;
4859   
4860    private double _TotalRuntime;
4861   
4862    private double _TotalWaitingTime;
4863   
4864    private double _TotalTransferTime;
4865   
4866    private int _NumCalculationRuns;
4867   
4868    private int _NumFails;
4869   
4870    private int _CoresRequired;
4871   
4872    private int _MemoryRequired;
4873   
4874    private long _TaskSize;
4875   
4876    private System.Nullable<long> _ResultSize;
4877   
4878    private int _Priority;
4879   
4880    private System.Guid _LastClientId;
4881   
4882    private System.Guid _JobId;
4883   
4884    private System.DateTime _StartTime;
4885   
4886    private System.Nullable<System.DateTime> _EndTime;
4887   
4888    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _TaskState;
4889   
4890    private string _Exception;
4891   
4892    private EntityRef<DimClient> _DimClient;
4893   
4894    private EntityRef<DimJob> _DimJob;
4895   
4896    private EntityRef<DimTime> _DimTime;
4897   
4898    private EntityRef<DimTime> _DimTime1;
4899   
4900    #region Extensibility Method Definitions
4901    partial void OnLoaded();
4902    partial void OnValidate(System.Data.Linq.ChangeAction action);
4903    partial void OnCreated();
4904    partial void OnTaskIdChanging(System.Guid value);
4905    partial void OnTaskIdChanged();
4906    partial void OnTotalRuntimeChanging(double value);
4907    partial void OnTotalRuntimeChanged();
4908    partial void OnTotalWaitingTimeChanging(double value);
4909    partial void OnTotalWaitingTimeChanged();
4910    partial void OnTotalTransferTimeChanging(double value);
4911    partial void OnTotalTransferTimeChanged();
4912    partial void OnNumCalculationRunsChanging(int value);
4913    partial void OnNumCalculationRunsChanged();
4914    partial void OnNumRetriesChanging(int value);
4915    partial void OnNumRetriesChanged();
4916    partial void OnCoresRequiredChanging(int value);
4917    partial void OnCoresRequiredChanged();
4918    partial void OnMemoryRequiredChanging(int value);
4919    partial void OnMemoryRequiredChanged();
4920    partial void OnTaskSizeChanging(long value);
4921    partial void OnTaskSizeChanged();
4922    partial void OnResultSizeChanging(System.Nullable<long> value);
4923    partial void OnResultSizeChanged();
4924    partial void OnPriorityChanging(int value);
4925    partial void OnPriorityChanged();
4926    partial void OnLastClientIdChanging(System.Guid value);
4927    partial void OnLastClientIdChanged();
4928    partial void OnJobIdChanging(System.Guid value);
4929    partial void OnJobIdChanged();
4930    partial void OnStartTimeChanging(System.DateTime value);
4931    partial void OnStartTimeChanged();
4932    partial void OnEndTimeChanging(System.Nullable<System.DateTime> value);
4933    partial void OnEndTimeChanged();
4934    partial void OnTaskStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
4935    partial void OnTaskStateChanged();
4936    partial void OnExceptionChanging(string value);
4937    partial void OnExceptionChanged();
4938    #endregion
4939   
4940    public FactTask()
4941    {
4942      this._DimClient = default(EntityRef<DimClient>);
4943      this._DimJob = default(EntityRef<DimJob>);
4944      this._DimTime = default(EntityRef<DimTime>);
4945      this._DimTime1 = default(EntityRef<DimTime>);
4946      OnCreated();
4947    }
4948   
4949    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
4950    public System.Guid TaskId
4951    {
4952      get
4953      {
4954        return this._TaskId;
4955      }
4956      set
4957      {
4958        if ((this._TaskId != value))
4959        {
4960          this.OnTaskIdChanging(value);
4961          this.SendPropertyChanging();
4962          this._TaskId = value;
4963          this.SendPropertyChanged("TaskId");
4964          this.OnTaskIdChanged();
4965        }
4966      }
4967    }
4968   
4969    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRuntime", DbType="Float NOT NULL")]
4970    public double TotalRuntime
4971    {
4972      get
4973      {
4974        return this._TotalRuntime;
4975      }
4976      set
4977      {
4978        if ((this._TotalRuntime != value))
4979        {
4980          this.OnTotalRuntimeChanging(value);
4981          this.SendPropertyChanging();
4982          this._TotalRuntime = value;
4983          this.SendPropertyChanged("TotalRuntime");
4984          this.OnTotalRuntimeChanged();
4985        }
4986      }
4987    }
4988   
4989    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalWaitingTime", DbType="Float NOT NULL")]
4990    public double TotalWaitingTime
4991    {
4992      get
4993      {
4994        return this._TotalWaitingTime;
4995      }
4996      set
4997      {
4998        if ((this._TotalWaitingTime != value))
4999        {
5000          this.OnTotalWaitingTimeChanging(value);
5001          this.SendPropertyChanging();
5002          this._TotalWaitingTime = value;
5003          this.SendPropertyChanged("TotalWaitingTime");
5004          this.OnTotalWaitingTimeChanged();
5005        }
5006      }
5007    }
5008   
5009    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTransferTime", DbType="Float NOT NULL")]
5010    public double TotalTransferTime
5011    {
5012      get
5013      {
5014        return this._TotalTransferTime;
5015      }
5016      set
5017      {
5018        if ((this._TotalTransferTime != value))
5019        {
5020          this.OnTotalTransferTimeChanging(value);
5021          this.SendPropertyChanging();
5022          this._TotalTransferTime = value;
5023          this.SendPropertyChanged("TotalTransferTime");
5024          this.OnTotalTransferTimeChanged();
5025        }
5026      }
5027    }
5028   
5029    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumCalculationRuns", DbType="Int NOT NULL")]
5030    public int NumCalculationRuns
5031    {
5032      get
5033      {
5034        return this._NumCalculationRuns;
5035      }
5036      set
5037      {
5038        if ((this._NumCalculationRuns != value))
5039        {
5040          this.OnNumCalculationRunsChanging(value);
5041          this.SendPropertyChanging();
5042          this._NumCalculationRuns = value;
5043          this.SendPropertyChanged("NumCalculationRuns");
5044          this.OnNumCalculationRunsChanged();
5045        }
5046      }
5047    }
5048   
5049    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumFails", DbType="Int NOT NULL")]
5050    public int NumRetries
5051    {
5052      get
5053      {
5054        return this._NumFails;
5055      }
5056      set
5057      {
5058        if ((this._NumFails != value))
5059        {
5060          this.OnNumRetriesChanging(value);
5061          this.SendPropertyChanging();
5062          this._NumFails = value;
5063          this.SendPropertyChanged("NumRetries");
5064          this.OnNumRetriesChanged();
5065        }
5066      }
5067    }
5068   
5069    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresRequired", DbType="Int NOT NULL")]
5070    public int CoresRequired
5071    {
5072      get
5073      {
5074        return this._CoresRequired;
5075      }
5076      set
5077      {
5078        if ((this._CoresRequired != value))
5079        {
5080          this.OnCoresRequiredChanging(value);
5081          this.SendPropertyChanging();
5082          this._CoresRequired = value;
5083          this.SendPropertyChanged("CoresRequired");
5084          this.OnCoresRequiredChanged();
5085        }
5086      }
5087    }
5088   
5089    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryRequired", DbType="Int NOT NULL")]
5090    public int MemoryRequired
5091    {
5092      get
5093      {
5094        return this._MemoryRequired;
5095      }
5096      set
5097      {
5098        if ((this._MemoryRequired != value))
5099        {
5100          this.OnMemoryRequiredChanging(value);
5101          this.SendPropertyChanging();
5102          this._MemoryRequired = value;
5103          this.SendPropertyChanged("MemoryRequired");
5104          this.OnMemoryRequiredChanged();
5105        }
5106      }
5107    }
5108   
5109    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskSize", DbType="BigInt NOT NULL")]
5110    public long TaskSize
5111    {
5112      get
5113      {
5114        return this._TaskSize;
5115      }
5116      set
5117      {
5118        if ((this._TaskSize != value))
5119        {
5120          this.OnTaskSizeChanging(value);
5121          this.SendPropertyChanging();
5122          this._TaskSize = value;
5123          this.SendPropertyChanged("TaskSize");
5124          this.OnTaskSizeChanged();
5125        }
5126      }
5127    }
5128   
5129    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResultSize", DbType="BigInt")]
5130    public System.Nullable<long> ResultSize
5131    {
5132      get
5133      {
5134        return this._ResultSize;
5135      }
5136      set
5137      {
5138        if ((this._ResultSize != value))
5139        {
5140          this.OnResultSizeChanging(value);
5141          this.SendPropertyChanging();
5142          this._ResultSize = value;
5143          this.SendPropertyChanged("ResultSize");
5144          this.OnResultSizeChanged();
5145        }
5146      }
5147    }
5148   
5149    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
5150    public int Priority
5151    {
5152      get
5153      {
5154        return this._Priority;
5155      }
5156      set
5157      {
5158        if ((this._Priority != value))
5159        {
5160          this.OnPriorityChanging(value);
5161          this.SendPropertyChanging();
5162          this._Priority = value;
5163          this.SendPropertyChanged("Priority");
5164          this.OnPriorityChanged();
5165        }
5166      }
5167    }
5168   
5169    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastClientId", DbType="UniqueIdentifier NOT NULL")]
5170    public System.Guid LastClientId
5171    {
5172      get
5173      {
5174        return this._LastClientId;
5175      }
5176      set
5177      {
5178        if ((this._LastClientId != value))
5179        {
5180          if (this._DimClient.HasLoadedOrAssignedValue)
5181          {
5182            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5183          }
5184          this.OnLastClientIdChanging(value);
5185          this.SendPropertyChanging();
5186          this._LastClientId = value;
5187          this.SendPropertyChanged("LastClientId");
5188          this.OnLastClientIdChanged();
5189        }
5190      }
5191    }
5192   
5193    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
5194    public System.Guid JobId
5195    {
5196      get
5197      {
5198        return this._JobId;
5199      }
5200      set
5201      {
5202        if ((this._JobId != value))
5203        {
5204          if (this._DimJob.HasLoadedOrAssignedValue)
5205          {
5206            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5207          }
5208          this.OnJobIdChanging(value);
5209          this.SendPropertyChanging();
5210          this._JobId = value;
5211          this.SendPropertyChanged("JobId");
5212          this.OnJobIdChanged();
5213        }
5214      }
5215    }
5216   
5217    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartTime", DbType="DateTime NOT NULL")]
5218    public System.DateTime StartTime
5219    {
5220      get
5221      {
5222        return this._StartTime;
5223      }
5224      set
5225      {
5226        if ((this._StartTime != value))
5227        {
5228          if (this._DimTime1.HasLoadedOrAssignedValue)
5229          {
5230            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5231          }
5232          this.OnStartTimeChanging(value);
5233          this.SendPropertyChanging();
5234          this._StartTime = value;
5235          this.SendPropertyChanged("StartTime");
5236          this.OnStartTimeChanged();
5237        }
5238      }
5239    }
5240   
5241    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndTime", DbType="DateTime NOT NULL")]
5242    public System.Nullable<System.DateTime> EndTime
5243    {
5244      get
5245      {
5246        return this._EndTime;
5247      }
5248      set
5249      {
5250        if ((this._EndTime != value))
5251        {
5252          if (this._DimTime.HasLoadedOrAssignedValue)
5253          {
5254            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
5255          }
5256          this.OnEndTimeChanging(value);
5257          this.SendPropertyChanging();
5258          this._EndTime = value;
5259          this.SendPropertyChanged("EndTime");
5260          this.OnEndTimeChanged();
5261        }
5262      }
5263    }
5264   
5265    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskState", DbType="varchar(30)", CanBeNull=false)]
5266    public global::HeuristicLab.Services.Hive.DataAccess.TaskState TaskState
5267    {
5268      get
5269      {
5270        return this._TaskState;
5271      }
5272      set
5273      {
5274        if ((this._TaskState != value))
5275        {
5276          this.OnTaskStateChanging(value);
5277          this.SendPropertyChanging();
5278          this._TaskState = value;
5279          this.SendPropertyChanged("TaskState");
5280          this.OnTaskStateChanged();
5281        }
5282      }
5283    }
5284   
5285    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="varchar(MAX)")]
5286    public string Exception
5287    {
5288      get
5289      {
5290        return this._Exception;
5291      }
5292      set
5293      {
5294        if ((this._Exception != value))
5295        {
5296          this.OnExceptionChanging(value);
5297          this.SendPropertyChanging();
5298          this._Exception = value;
5299          this.SendPropertyChanged("Exception");
5300          this.OnExceptionChanged();
5301        }
5302      }
5303    }
5304   
5305    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_DimClient", ThisKey="LastClientId", OtherKey="Id", IsForeignKey=true)]
5306    public DimClient DimClient
5307    {
5308      get
5309      {
5310        return this._DimClient.Entity;
5311      }
5312      set
5313      {
5314        DimClient previousValue = this._DimClient.Entity;
5315        if (((previousValue != value)
5316              || (this._DimClient.HasLoadedOrAssignedValue == false)))
5317        {
5318          this.SendPropertyChanging();
5319          if ((previousValue != null))
5320          {
5321            this._DimClient.Entity = null;
5322            previousValue.FactTasks.Remove(this);
5323          }
5324          this._DimClient.Entity = value;
5325          if ((value != null))
5326          {
5327            value.FactTasks.Add(this);
5328            this._LastClientId = value.Id;
5329          }
5330          else
5331          {
5332            this._LastClientId = default(System.Guid);
5333          }
5334          this.SendPropertyChanged("DimClient");
5335        }
5336      }
5337    }
5338   
5339    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimJob_FactTask", Storage="_DimJob", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
5340    public DimJob DimJob
5341    {
5342      get
5343      {
5344        return this._DimJob.Entity;
5345      }
5346      set
5347      {
5348        DimJob previousValue = this._DimJob.Entity;
5349        if (((previousValue != value)
5350              || (this._DimJob.HasLoadedOrAssignedValue == false)))
5351        {
5352          this.SendPropertyChanging();
5353          if ((previousValue != null))
5354          {
5355            this._DimJob.Entity = null;
5356            previousValue.FactTasks.Remove(this);
5357          }
5358          this._DimJob.Entity = value;
5359          if ((value != null))
5360          {
5361            value.FactTasks.Add(this);
5362            this._JobId = value.JobId;
5363          }
5364          else
5365          {
5366            this._JobId = default(System.Guid);
5367          }
5368          this.SendPropertyChanged("DimJob");
5369        }
5370      }
5371    }
5372   
5373    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask", Storage="_DimTime", ThisKey="EndTime", OtherKey="Time", IsForeignKey=true)]
5374    public DimTime DimTimeEnd
5375    {
5376      get
5377      {
5378        return this._DimTime.Entity;
5379      }
5380      set
5381      {
5382        DimTime previousValue = this._DimTime.Entity;
5383        if (((previousValue != value)
5384              || (this._DimTime.HasLoadedOrAssignedValue == false)))
5385        {
5386          this.SendPropertyChanging();
5387          if ((previousValue != null))
5388          {
5389            this._DimTime.Entity = null;
5390            previousValue.FactTasks.Remove(this);
5391          }
5392          this._DimTime.Entity = value;
5393          if ((value != null))
5394          {
5395            value.FactTasks.Add(this);
5396            this._EndTime = value.Time;
5397          }
5398          else
5399          {
5400            this._EndTime = default(Nullable<System.DateTime>);
5401          }
5402          this.SendPropertyChanged("DimTimeEnd");
5403        }
5404      }
5405    }
5406   
5407    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask1", Storage="_DimTime1", ThisKey="StartTime", OtherKey="Time", IsForeignKey=true)]
5408    public DimTime DimTimeStart
5409    {
5410      get
5411      {
5412        return this._DimTime1.Entity;
5413      }
5414      set
5415      {
5416        DimTime previousValue = this._DimTime1.Entity;
5417        if (((previousValue != value)
5418              || (this._DimTime1.HasLoadedOrAssignedValue == false)))
5419        {
5420          this.SendPropertyChanging();
5421          if ((previousValue != null))
5422          {
5423            this._DimTime1.Entity = null;
5424            previousValue.FactTasks1.Remove(this);
5425          }
5426          this._DimTime1.Entity = value;
5427          if ((value != null))
5428          {
5429            value.FactTasks1.Add(this);
5430            this._StartTime = value.Time;
5431          }
5432          else
5433          {
5434            this._StartTime = default(System.DateTime);
5435          }
5436          this.SendPropertyChanged("DimTimeStart");
5437        }
5438      }
5439    }
5440   
5441    public event PropertyChangingEventHandler PropertyChanging;
5442   
5443    public event PropertyChangedEventHandler PropertyChanged;
5444   
5445    protected virtual void SendPropertyChanging()
5446    {
5447      if ((this.PropertyChanging != null))
5448      {
5449        this.PropertyChanging(this, emptyChangingEventArgs);
5450      }
5451    }
5452   
5453    protected virtual void SendPropertyChanged(String propertyName)
5454    {
5455      if ((this.PropertyChanged != null))
5456      {
5457        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5458      }
5459    }
5460  }
5461 
5462  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimJob")]
5463  public partial class DimJob : INotifyPropertyChanging, INotifyPropertyChanged
5464  {
5465   
5466    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5467   
5468    private System.Guid _JobId;
5469   
5470    private System.Guid _UserId;
5471   
5472    private string _JobName;
5473   
5474    private string _UserName;
5475   
5476    private EntitySet<FactTask> _FactTasks;
5477   
5478    #region Extensibility Method Definitions
5479    partial void OnLoaded();
5480    partial void OnValidate(System.Data.Linq.ChangeAction action);
5481    partial void OnCreated();
5482    partial void OnJobIdChanging(System.Guid value);
5483    partial void OnJobIdChanged();
5484    partial void OnUserIdChanging(System.Guid value);
5485    partial void OnUserIdChanged();
5486    partial void OnJobNameChanging(string value);
5487    partial void OnJobNameChanged();
5488    partial void OnUserNameChanging(string value);
5489    partial void OnUserNameChanged();
5490    #endregion
5491   
5492    public DimJob()
5493    {
5494      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
5495      OnCreated();
5496    }
5497   
5498    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5499    public System.Guid JobId
5500    {
5501      get
5502      {
5503        return this._JobId;
5504      }
5505      set
5506      {
5507        if ((this._JobId != value))
5508        {
5509          this.OnJobIdChanging(value);
5510          this.SendPropertyChanging();
5511          this._JobId = value;
5512          this.SendPropertyChanged("JobId");
5513          this.OnJobIdChanged();
5514        }
5515      }
5516    }
5517   
5518    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
5519    public System.Guid UserId
5520    {
5521      get
5522      {
5523        return this._UserId;
5524      }
5525      set
5526      {
5527        if ((this._UserId != value))
5528        {
5529          this.OnUserIdChanging(value);
5530          this.SendPropertyChanging();
5531          this._UserId = value;
5532          this.SendPropertyChanged("UserId");
5533          this.OnUserIdChanged();
5534        }
5535      }
5536    }
5537   
5538    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobName", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5539    public string JobName
5540    {
5541      get
5542      {
5543        return this._JobName;
5544      }
5545      set
5546      {
5547        if ((this._JobName != value))
5548        {
5549          this.OnJobNameChanging(value);
5550          this.SendPropertyChanging();
5551          this._JobName = value;
5552          this.SendPropertyChanged("JobName");
5553          this.OnJobNameChanged();
5554        }
5555      }
5556    }
5557   
5558    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5559    public string UserName
5560    {
5561      get
5562      {
5563        return this._UserName;
5564      }
5565      set
5566      {
5567        if ((this._UserName != value))
5568        {
5569          this.OnUserNameChanging(value);
5570          this.SendPropertyChanging();
5571          this._UserName = value;
5572          this.SendPropertyChanged("UserName");
5573          this.OnUserNameChanged();
5574        }
5575      }
5576    }
5577   
5578    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimJob_FactTask", Storage="_FactTasks", ThisKey="JobId", OtherKey="JobId")]
5579    public EntitySet<FactTask> FactTasks
5580    {
5581      get
5582      {
5583        return this._FactTasks;
5584      }
5585      set
5586      {
5587        this._FactTasks.Assign(value);
5588      }
5589    }
5590   
5591    public event PropertyChangingEventHandler PropertyChanging;
5592   
5593    public event PropertyChangedEventHandler PropertyChanged;
5594   
5595    protected virtual void SendPropertyChanging()
5596    {
5597      if ((this.PropertyChanging != null))
5598      {
5599        this.PropertyChanging(this, emptyChangingEventArgs);
5600      }
5601    }
5602   
5603    protected virtual void SendPropertyChanged(String propertyName)
5604    {
5605      if ((this.PropertyChanged != null))
5606      {
5607        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5608      }
5609    }
5610   
5611    private void attach_FactTasks(FactTask entity)
5612    {
5613      this.SendPropertyChanging();
5614      entity.DimJob = this;
5615    }
5616   
5617    private void detach_FactTasks(FactTask entity)
5618    {
5619      this.SendPropertyChanging();
5620      entity.DimJob = null;
5621    }
5622  }
5623 
5624  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimTime")]
5625  public partial class DimTime : INotifyPropertyChanging, INotifyPropertyChanged
5626  {
5627   
5628    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5629   
5630    private System.DateTime _Time;
5631   
5632    private System.DateTime _Hour;
5633   
5634    private System.DateTime _Day;
5635   
5636    private System.DateTime _Month;
5637   
5638    private System.DateTime _Year;
5639   
5640    private EntitySet<FactTask> _FactTasks;
5641   
5642    private EntitySet<FactTask> _FactTasks1;
5643   
5644    private EntitySet<FactClientInfo> _FactClientInfos;
5645   
5646    #region Extensibility Method Definitions
5647    partial void OnLoaded();
5648    partial void OnValidate(System.Data.Linq.ChangeAction action);
5649    partial void OnCreated();
5650    partial void OnTimeChanging(System.DateTime value);
5651    partial void OnTimeChanged();
5652    partial void OnHourChanging(System.DateTime value);
5653    partial void OnHourChanged();
5654    partial void OnDayChanging(System.DateTime value);
5655    partial void OnDayChanged();
5656    partial void OnMonthChanging(System.DateTime value);
5657    partial void OnMonthChanged();
5658    partial void OnYearChanging(System.DateTime value);
5659    partial void OnYearChanged();
5660    #endregion
5661   
5662    public DimTime()
5663    {
5664      this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
5665      this._FactTasks1 = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks1), new Action<FactTask>(this.detach_FactTasks1));
5666      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
5667      OnCreated();
5668    }
5669   
5670    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
5671    public System.DateTime Time
5672    {
5673      get
5674      {
5675        return this._Time;
5676      }
5677      set
5678      {
5679        if ((this._Time != value))
5680        {
5681          this.OnTimeChanging(value);
5682          this.SendPropertyChanging();
5683          this._Time = value;
5684          this.SendPropertyChanged("Time");
5685          this.OnTimeChanged();
5686        }
5687      }
5688    }
5689   
5690    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hour", DbType="DateTime NOT NULL")]
5691    public System.DateTime Hour
5692    {
5693      get
5694      {
5695        return this._Hour;
5696      }
5697      set
5698      {
5699        if ((this._Hour != value))
5700        {
5701          this.OnHourChanging(value);
5702          this.SendPropertyChanging();
5703          this._Hour = value;
5704          this.SendPropertyChanged("Hour");
5705          this.OnHourChanged();
5706        }
5707      }
5708    }
5709   
5710    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Day", DbType="Date NOT NULL")]
5711    public System.DateTime Day
5712    {
5713      get
5714      {
5715        return this._Day;
5716      }
5717      set
5718      {
5719        if ((this._Day != value))
5720        {
5721          this.OnDayChanging(value);
5722          this.SendPropertyChanging();
5723          this._Day = value;
5724          this.SendPropertyChanged("Day");
5725          this.OnDayChanged();
5726        }
5727      }
5728    }
5729   
5730    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Date NOT NULL")]
5731    public System.DateTime Month
5732    {
5733      get
5734      {
5735        return this._Month;
5736      }
5737      set
5738      {
5739        if ((this._Month != value))
5740        {
5741          this.OnMonthChanging(value);
5742          this.SendPropertyChanging();
5743          this._Month = value;
5744          this.SendPropertyChanged("Month");
5745          this.OnMonthChanged();
5746        }
5747      }
5748    }
5749   
5750    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Date NOT NULL")]
5751    public System.DateTime Year
5752    {
5753      get
5754      {
5755        return this._Year;
5756      }
5757      set
5758      {
5759        if ((this._Year != value))
5760        {
5761          this.OnYearChanging(value);
5762          this.SendPropertyChanging();
5763          this._Year = value;
5764          this.SendPropertyChanged("Year");
5765          this.OnYearChanged();
5766        }
5767      }
5768    }
5769   
5770    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask", Storage="_FactTasks", ThisKey="Time", OtherKey="EndTime")]
5771    public EntitySet<FactTask> FactTasks
5772    {
5773      get
5774      {
5775        return this._FactTasks;
5776      }
5777      set
5778      {
5779        this._FactTasks.Assign(value);
5780      }
5781    }
5782   
5783    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask1", Storage="_FactTasks1", ThisKey="Time", OtherKey="StartTime")]
5784    public EntitySet<FactTask> FactTasks1
5785    {
5786      get
5787      {
5788        return this._FactTasks1;
5789      }
5790      set
5791      {
5792        this._FactTasks1.Assign(value);
5793      }
5794    }
5795   
5796    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactClientInfo", Storage="_FactClientInfos", ThisKey="Time", OtherKey="Time")]
5797    public EntitySet<FactClientInfo> FactClientInfos
5798    {
5799      get
5800      {
5801        return this._FactClientInfos;
5802      }
5803      set
5804      {
5805        this._FactClientInfos.Assign(value);
5806      }
5807    }
5808   
5809    public event PropertyChangingEventHandler PropertyChanging;
5810   
5811    public event PropertyChangedEventHandler PropertyChanged;
5812   
5813    protected virtual void SendPropertyChanging()
5814    {
5815      if ((this.PropertyChanging != null))
5816      {
5817        this.PropertyChanging(this, emptyChangingEventArgs);
5818      }
5819    }
5820   
5821    protected virtual void SendPropertyChanged(String propertyName)
5822    {
5823      if ((this.PropertyChanged != null))
5824      {
5825        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5826      }
5827    }
5828   
5829    private void attach_FactTasks(FactTask entity)
5830    {
5831      this.SendPropertyChanging();
5832      entity.DimTimeEnd = this;
5833    }
5834   
5835    private void detach_FactTasks(FactTask entity)
5836    {
5837      this.SendPropertyChanging();
5838      entity.DimTimeEnd = null;
5839    }
5840   
5841    private void attach_FactTasks1(FactTask entity)
5842    {
5843      this.SendPropertyChanging();
5844      entity.DimTimeStart = this;
5845    }
5846   
5847    private void detach_FactTasks1(FactTask entity)
5848    {
5849      this.SendPropertyChanging();
5850      entity.DimTimeStart = null;
5851    }
5852   
5853    private void attach_FactClientInfos(FactClientInfo entity)
5854    {
5855      this.SendPropertyChanging();
5856      entity.DimTime = this;
5857    }
5858   
5859    private void detach_FactClientInfos(FactClientInfo entity)
5860    {
5861      this.SendPropertyChanging();
5862      entity.DimTime = null;
5863    }
5864  }
5865 
5866  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimUser")]
5867  public partial class DimUser : INotifyPropertyChanging, INotifyPropertyChanged
5868  {
5869   
5870    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5871   
5872    private System.Guid _UserId;
5873   
5874    private string _Name;
5875   
5876    private EntitySet<FactClientInfo> _FactClientInfos;
5877   
5878    #region Extensibility Method Definitions
5879    partial void OnLoaded();
5880    partial void OnValidate(System.Data.Linq.ChangeAction action);
5881    partial void OnCreated();
5882    partial void OnUserIdChanging(System.Guid value);
5883    partial void OnUserIdChanged();
5884    partial void OnNameChanging(string value);
5885    partial void OnNameChanged();
5886    #endregion
5887   
5888    public DimUser()
5889    {
5890      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
5891      OnCreated();
5892    }
5893   
5894    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
5895    public System.Guid UserId
5896    {
5897      get
5898      {
5899        return this._UserId;
5900      }
5901      set
5902      {
5903        if ((this._UserId != value))
5904        {
5905          this.OnUserIdChanging(value);
5906          this.SendPropertyChanging();
5907          this._UserId = value;
5908          this.SendPropertyChanged("UserId");
5909          this.OnUserIdChanged();
5910        }
5911      }
5912    }
5913   
5914    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
5915    public string Name
5916    {
5917      get
5918      {
5919        return this._Name;
5920      }
5921      set
5922      {
5923        if ((this._Name != value))
5924        {
5925          this.OnNameChanging(value);
5926          this.SendPropertyChanging();
5927          this._Name = value;
5928          this.SendPropertyChanged("Name");
5929          this.OnNameChanged();
5930        }
5931      }
5932    }
5933   
5934    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimUser_FactClientInfo", Storage="_FactClientInfos", ThisKey="UserId", OtherKey="UserId")]
5935    public EntitySet<FactClientInfo> FactClientInfos
5936    {
5937      get
5938      {
5939        return this._FactClientInfos;
5940      }
5941      set
5942      {
5943        this._FactClientInfos.Assign(value);
5944      }
5945    }
5946   
5947    public event PropertyChangingEventHandler PropertyChanging;
5948   
5949    public event PropertyChangedEventHandler PropertyChanged;
5950   
5951    protected virtual void SendPropertyChanging()
5952    {
5953      if ((this.PropertyChanging != null))
5954      {
5955        this.PropertyChanging(this, emptyChangingEventArgs);
5956      }
5957    }
5958   
5959    protected virtual void SendPropertyChanged(String propertyName)
5960    {
5961      if ((this.PropertyChanged != null))
5962      {
5963        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
5964      }
5965    }
5966   
5967    private void attach_FactClientInfos(FactClientInfo entity)
5968    {
5969      this.SendPropertyChanging();
5970      entity.DimUser = this;
5971    }
5972   
5973    private void detach_FactClientInfos(FactClientInfo entity)
5974    {
5975      this.SendPropertyChanging();
5976      entity.DimUser = null;
5977    }
5978  }
5979 
5980  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactClientInfo")]
5981  public partial class FactClientInfo : INotifyPropertyChanging, INotifyPropertyChanged
5982  {
5983   
5984    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
5985   
5986    private System.Guid _ClientId;
5987   
5988    private System.DateTime _Time;
5989   
5990    private System.Guid _UserId;
5991   
5992    private int _NumUsedCores;
5993   
5994    private int _NumTotalCores;
5995   
5996    private int _UsedMemory;
5997   
5998    private int _TotalMemory;
5999   
6000    private double _CpuUtilization;
6001   
6002    private int _TrafficIn;
6003   
6004    private int _TrafficOut;
6005   
6006    private double _TotalTimeIdle;
6007   
6008    private double _TotalTimeCalculating;
6009   
6010    private double _TotalTimeTransferring;
6011   
6012    private double _TotalTimeOffline;
6013   
6014    private double _TotalTimeUnavailable;
6015   
6016    private EntityRef<DimClient> _DimClient;
6017   
6018    private EntityRef<DimTime> _DimTime;
6019   
6020    private EntityRef<DimUser> _DimUser;
6021   
6022    #region Extensibility Method Definitions
6023    partial void OnLoaded();
6024    partial void OnValidate(System.Data.Linq.ChangeAction action);
6025    partial void OnCreated();
6026    partial void OnClientIdChanging(System.Guid value);
6027    partial void OnClientIdChanged();
6028    partial void OnTimeChanging(System.DateTime value);
6029    partial void OnTimeChanged();
6030    partial void OnUserIdChanging(System.Guid value);
6031    partial void OnUserIdChanged();
6032    partial void OnNumUsedCoresChanging(int value);
6033    partial void OnNumUsedCoresChanged();
6034    partial void OnNumTotalCoresChanging(int value);
6035    partial void OnNumTotalCoresChanged();
6036    partial void OnUsedMemoryChanging(int value);
6037    partial void OnUsedMemoryChanged();
6038    partial void OnTotalMemoryChanging(int value);
6039    partial void OnTotalMemoryChanged();
6040    partial void OnCpuUtilizationChanging(double value);
6041    partial void OnCpuUtilizationChanged();
6042    partial void OnTrafficInChanging(int value);
6043    partial void OnTrafficInChanged();
6044    partial void OnTrafficOutChanging(int value);
6045    partial void OnTrafficOutChanged();
6046    partial void OnTotalTimeIdleChanging(double value);
6047    partial void OnTotalTimeIdleChanged();
6048    partial void OnTotalTimeCalculatingChanging(double value);
6049    partial void OnTotalTimeCalculatingChanged();
6050    partial void OnTotalTimeTransferringChanging(double value);
6051    partial void OnTotalTimeTransferringChanged();
6052    partial void OnTotalTimeOfflineChanging(double value);
6053    partial void OnTotalTimeOfflineChanged();
6054    partial void OnTotalTimeUnavailableChanging(double value);
6055    partial void OnTotalTimeUnavailableChanged();
6056    #endregion
6057   
6058    public FactClientInfo()
6059    {
6060      this._DimClient = default(EntityRef<DimClient>);
6061      this._DimTime = default(EntityRef<DimTime>);
6062      this._DimUser = default(EntityRef<DimUser>);
6063      OnCreated();
6064    }
6065   
6066    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
6067    public System.Guid ClientId
6068    {
6069      get
6070      {
6071        return this._ClientId;
6072      }
6073      set
6074      {
6075        if ((this._ClientId != value))
6076        {
6077          if (this._DimClient.HasLoadedOrAssignedValue)
6078          {
6079            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6080          }
6081          this.OnClientIdChanging(value);
6082          this.SendPropertyChanging();
6083          this._ClientId = value;
6084          this.SendPropertyChanged("ClientId");
6085          this.OnClientIdChanged();
6086        }
6087      }
6088    }
6089   
6090    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
6091    public System.DateTime Time
6092    {
6093      get
6094      {
6095        return this._Time;
6096      }
6097      set
6098      {
6099        if ((this._Time != value))
6100        {
6101          if (this._DimTime.HasLoadedOrAssignedValue)
6102          {
6103            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6104          }
6105          this.OnTimeChanging(value);
6106          this.SendPropertyChanging();
6107          this._Time = value;
6108          this.SendPropertyChanged("Time");
6109          this.OnTimeChanged();
6110        }
6111      }
6112    }
6113   
6114    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NULL", IsPrimaryKey=true)]
6115    public System.Guid UserId
6116    {
6117      get
6118      {
6119        return this._UserId;
6120      }
6121      set
6122      {
6123        if ((this._UserId != value))
6124        {
6125          if (this._DimUser.HasLoadedOrAssignedValue)
6126          {
6127            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
6128          }
6129          this.OnUserIdChanging(value);
6130          this.SendPropertyChanging();
6131          this._UserId = value;
6132          this.SendPropertyChanged("UserId");
6133          this.OnUserIdChanged();
6134        }
6135      }
6136    }
6137   
6138    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumUsedCores", DbType="Int NOT NULL")]
6139    public int NumUsedCores
6140    {
6141      get
6142      {
6143        return this._NumUsedCores;
6144      }
6145      set
6146      {
6147        if ((this._NumUsedCores != value))
6148        {
6149          this.OnNumUsedCoresChanging(value);
6150          this.SendPropertyChanging();
6151          this._NumUsedCores = value;
6152          this.SendPropertyChanged("NumUsedCores");
6153          this.OnNumUsedCoresChanged();
6154        }
6155      }
6156    }
6157   
6158    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumTotalCores", DbType="Int NOT NULL")]
6159    public int NumTotalCores
6160    {
6161      get
6162      {
6163        return this._NumTotalCores;
6164      }
6165      set
6166      {
6167        if ((this._NumTotalCores != value))
6168        {
6169          this.OnNumTotalCoresChanging(value);
6170          this.SendPropertyChanging();
6171          this._NumTotalCores = value;
6172          this.SendPropertyChanged("NumTotalCores");
6173          this.OnNumTotalCoresChanged();
6174        }
6175      }
6176    }
6177   
6178    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsedMemory", DbType="Int NOT NULL")]
6179    public int UsedMemory
6180    {
6181      get
6182      {
6183        return this._UsedMemory;
6184      }
6185      set
6186      {
6187        if ((this._UsedMemory != value))
6188        {
6189          this.OnUsedMemoryChanging(value);
6190          this.SendPropertyChanging();
6191          this._UsedMemory = value;
6192          this.SendPropertyChanged("UsedMemory");
6193          this.OnUsedMemoryChanged();
6194        }
6195      }
6196    }
6197   
6198    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalMemory", DbType="Int NOT NULL")]
6199    public int TotalMemory
6200    {
6201      get
6202      {
6203        return this._TotalMemory;
6204      }
6205      set
6206      {
6207        if ((this._TotalMemory != value))
6208        {
6209          this.OnTotalMemoryChanging(value);
6210          this.SendPropertyChanging();
6211          this._TotalMemory = value;
6212          this.SendPropertyChanged("TotalMemory");
6213          this.OnTotalMemoryChanged();
6214        }
6215      }
6216    }
6217   
6218    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="Float NOT NULL")]
6219    public double CpuUtilization
6220    {
6221      get
6222      {
6223        return this._CpuUtilization;
6224      }
6225      set
6226      {
6227        if ((this._CpuUtilization != value))
6228        {
6229          this.OnCpuUtilizationChanging(value);
6230          this.SendPropertyChanging();
6231          this._CpuUtilization = value;
6232          this.SendPropertyChanged("CpuUtilization");
6233          this.OnCpuUtilizationChanged();
6234        }
6235      }
6236    }
6237   
6238    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrafficIn", DbType="Int NOT NULL")]
6239    public int TrafficIn
6240    {
6241      get
6242      {
6243        return this._TrafficIn;
6244      }
6245      set
6246      {
6247        if ((this._TrafficIn != value))
6248        {
6249          this.OnTrafficInChanging(value);
6250          this.SendPropertyChanging();
6251          this._TrafficIn = value;
6252          this.SendPropertyChanged("TrafficIn");
6253          this.OnTrafficInChanged();
6254        }
6255      }
6256    }
6257   
6258    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrafficOut", DbType="Int NOT NULL")]
6259    public int TrafficOut
6260    {
6261      get
6262      {
6263        return this._TrafficOut;
6264      }
6265      set
6266      {
6267        if ((this._TrafficOut != value))
6268        {
6269          this.OnTrafficOutChanging(value);
6270          this.SendPropertyChanging();
6271          this._TrafficOut = value;
6272          this.SendPropertyChanged("TrafficOut");
6273          this.OnTrafficOutChanged();
6274        }
6275      }
6276    }
6277   
6278    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeIdle", DbType="Float NOT NULL")]
6279    public double TotalTimeIdle
6280    {
6281      get
6282      {
6283        return this._TotalTimeIdle;
6284      }
6285      set
6286      {
6287        if ((this._TotalTimeIdle != value))
6288        {
6289          this.OnTotalTimeIdleChanging(value);
6290          this.SendPropertyChanging();
6291          this._TotalTimeIdle = value;
6292          this.SendPropertyChanged("TotalTimeIdle");
6293          this.OnTotalTimeIdleChanged();
6294        }
6295      }
6296    }
6297   
6298    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeCalculating", DbType="Float NOT NULL")]
6299    public double TotalTimeCalculating
6300    {
6301      get
6302      {
6303        return this._TotalTimeCalculating;
6304      }
6305      set
6306      {
6307        if ((this._TotalTimeCalculating != value))
6308        {
6309          this.OnTotalTimeCalculatingChanging(value);
6310          this.SendPropertyChanging();
6311          this._TotalTimeCalculating = value;
6312          this.SendPropertyChanged("TotalTimeCalculating");
6313          this.OnTotalTimeCalculatingChanged();
6314        }
6315      }
6316    }
6317   
6318    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeTransferring", DbType="Float NOT NULL")]
6319    public double TotalTimeTransferring
6320    {
6321      get
6322      {
6323        return this._TotalTimeTransferring;
6324      }
6325      set
6326      {
6327        if ((this._TotalTimeTransferring != value))
6328        {
6329          this.OnTotalTimeTransferringChanging(value);
6330          this.SendPropertyChanging();
6331          this._TotalTimeTransferring = value;
6332          this.SendPropertyChanged("TotalTimeTransferring");
6333          this.OnTotalTimeTransferringChanged();
6334        }
6335      }
6336    }
6337   
6338    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeOffline", DbType="Float NOT NULL")]
6339    public double TotalTimeOffline
6340    {
6341      get
6342      {
6343        return this._TotalTimeOffline;
6344      }
6345      set
6346      {
6347        if ((this._TotalTimeOffline != value))
6348        {
6349          this.OnTotalTimeOfflineChanging(value);
6350          this.SendPropertyChanging();
6351          this._TotalTimeOffline = value;
6352          this.SendPropertyChanged("TotalTimeOffline");
6353          this.OnTotalTimeOfflineChanged();
6354        }
6355      }
6356    }
6357   
6358    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeUnavailable", DbType="Float NOT NULL")]
6359    public double TotalTimeUnavailable
6360    {
6361      get
6362      {
6363        return this._TotalTimeUnavailable;
6364      }
6365      set
6366      {
6367        if ((this._TotalTimeUnavailable != value))
6368        {
6369          this.OnTotalTimeUnavailableChanging(value);
6370          this.SendPropertyChanging();
6371          this._TotalTimeUnavailable = value;
6372          this.SendPropertyChanged("TotalTimeUnavailable");
6373          this.OnTotalTimeUnavailableChanged();
6374        }
6375      }
6376    }
6377   
6378    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_DimClient", ThisKey="ClientId", OtherKey="Id", IsForeignKey=true)]
6379    public DimClient DimClient
6380    {
6381      get
6382      {
6383        return this._DimClient.Entity;
6384      }
6385      set
6386      {
6387        DimClient previousValue = this._DimClient.Entity;
6388        if (((previousValue != value)
6389              || (this._DimClient.HasLoadedOrAssignedValue == false)))
6390        {
6391          this.SendPropertyChanging();
6392          if ((previousValue != null))
6393          {
6394            this._DimClient.Entity = null;
6395            previousValue.FactClientInfos.Remove(this);
6396          }
6397          this._DimClient.Entity = value;
6398          if ((value != null))
6399          {
6400            value.FactClientInfos.Add(this);
6401            this._ClientId = value.Id;
6402          }
6403          else
6404          {
6405            this._ClientId = default(System.Guid);
6406          }
6407          this.SendPropertyChanged("DimClient");
6408        }
6409      }
6410    }
6411   
6412    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactClientInfo", Storage="_DimTime", ThisKey="Time", OtherKey="Time", IsForeignKey=true)]
6413    public DimTime DimTime
6414    {
6415      get
6416      {
6417        return this._DimTime.Entity;
6418      }
6419      set
6420      {
6421        DimTime previousValue = this._DimTime.Entity;
6422        if (((previousValue != value)
6423              || (this._DimTime.HasLoadedOrAssignedValue == false)))
6424        {
6425          this.SendPropertyChanging();
6426          if ((previousValue != null))
6427          {
6428            this._DimTime.Entity = null;
6429            previousValue.FactClientInfos.Remove(this);
6430          }
6431          this._DimTime.Entity = value;
6432          if ((value != null))
6433          {
6434            value.FactClientInfos.Add(this);
6435            this._Time = value.Time;
6436          }
6437          else
6438          {
6439            this._Time = default(System.DateTime);
6440          }
6441          this.SendPropertyChanged("DimTime");
6442        }
6443      }
6444    }
6445   
6446    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimUser_FactClientInfo", Storage="_DimUser", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true)]
6447    public DimUser DimUser
6448    {
6449      get
6450      {
6451        return this._DimUser.Entity;
6452      }
6453      set
6454      {
6455        DimUser previousValue = this._DimUser.Entity;
6456        if (((previousValue != value)
6457              || (this._DimUser.HasLoadedOrAssignedValue == false)))
6458        {
6459          this.SendPropertyChanging();
6460          if ((previousValue != null))
6461          {
6462            this._DimUser.Entity = null;
6463            previousValue.FactClientInfos.Remove(this);
6464          }
6465          this._DimUser.Entity = value;
6466          if ((value != null))
6467          {
6468            value.FactClientInfos.Add(this);
6469            this._UserId = value.UserId;
6470          }
6471          else
6472          {
6473            this._UserId = default(System.Guid);
6474          }
6475          this.SendPropertyChanged("DimUser");
6476        }
6477      }
6478    }
6479   
6480    public event PropertyChangingEventHandler PropertyChanging;
6481   
6482    public event PropertyChangedEventHandler PropertyChanged;
6483   
6484    protected virtual void SendPropertyChanging()
6485    {
6486      if ((this.PropertyChanging != null))
6487      {
6488        this.PropertyChanging(this, emptyChangingEventArgs);
6489      }
6490    }
6491   
6492    protected virtual void SendPropertyChanged(String propertyName)
6493    {
6494      if ((this.PropertyChanged != null))
6495      {
6496        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
6497      }
6498    }
6499  }
6500}
6501#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.