Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs @ 7857

Last change on this file since 7857 was 7857, checked in by jkarder, 12 years ago

#1854:

  • integrated marker attribute (IsDisposable) into the Hive components
  • adjusted database scheme
  • extended administration user interface
File size: 110.3 KB
RevLine 
[6983]1#pragma warning disable 1591
2//------------------------------------------------------------------------------
3// <auto-generated>
4//     This code was generated by a tool.
[7857]5//     Runtime Version:4.0.30319.269
[6983]6//
7//     Changes to this file may cause incorrect behavior and will be lost if
8//     the code is regenerated.
9// </auto-generated>
10//------------------------------------------------------------------------------
11
12namespace HeuristicLab.Services.Hive.DataAccess
13{
14  using System.Data.Linq;
15  using System.Data.Linq.Mapping;
16  using System.Data;
17  using System.Collections.Generic;
18  using System.Reflection;
19  using System.Linq;
20  using System.Linq.Expressions;
21  using System.ComponentModel;
22  using System;
23 
24 
25  [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.Hive")]
26  public partial class HiveDataContext : System.Data.Linq.DataContext
27  {
28   
29    private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
30   
31    #region Extensibility Method Definitions
32    partial void OnCreated();
33    partial void InsertAssignedResource(AssignedResource instance);
34    partial void UpdateAssignedResource(AssignedResource instance);
35    partial void DeleteAssignedResource(AssignedResource instance);
36    partial void InsertPlugin(Plugin instance);
37    partial void UpdatePlugin(Plugin instance);
38    partial void DeletePlugin(Plugin instance);
39    partial void InsertRequiredPlugin(RequiredPlugin instance);
40    partial void UpdateRequiredPlugin(RequiredPlugin instance);
41    partial void DeleteRequiredPlugin(RequiredPlugin instance);
42    partial void InsertResource(Resource instance);
43    partial void UpdateResource(Resource instance);
44    partial void DeleteResource(Resource instance);
45    partial void InsertTask(Task instance);
46    partial void UpdateTask(Task instance);
47    partial void DeleteTask(Task instance);
48    partial void InsertDowntime(Downtime instance);
49    partial void UpdateDowntime(Downtime instance);
50    partial void DeleteDowntime(Downtime instance);
51    partial void InsertJob(Job instance);
52    partial void UpdateJob(Job instance);
53    partial void DeleteJob(Job instance);
54    partial void InsertTaskData(TaskData instance);
55    partial void UpdateTaskData(TaskData instance);
56    partial void DeleteTaskData(TaskData instance);
57    partial void InsertPluginData(PluginData instance);
58    partial void UpdatePluginData(PluginData instance);
59    partial void DeletePluginData(PluginData instance);
60    partial void InsertStateLog(StateLog instance);
61    partial void UpdateStateLog(StateLog instance);
62    partial void DeleteStateLog(StateLog instance);
63    partial void InsertJobPermission(JobPermission instance);
64    partial void UpdateJobPermission(JobPermission instance);
65    partial void DeleteJobPermission(JobPermission instance);
66    partial void InsertLifecycle(Lifecycle instance);
67    partial void UpdateLifecycle(Lifecycle instance);
68    partial void DeleteLifecycle(Lifecycle instance);
69    partial void 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    #endregion
82   
83    public HiveDataContext() :
84        base(global::HeuristicLab.Services.Hive.DataAccess.Settings.Default.HeuristicLab_Hive_LinqConnectionString, mappingSource)
85    {
86      OnCreated();
87    }
88   
89    public HiveDataContext(string connection) :
90        base(connection, mappingSource)
91    {
92      OnCreated();
93    }
94   
95    public HiveDataContext(System.Data.IDbConnection connection) :
96        base(connection, mappingSource)
97    {
98      OnCreated();
99    }
100   
101    public HiveDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
102        base(connection, mappingSource)
103    {
104      OnCreated();
105    }
106   
107    public HiveDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
108        base(connection, mappingSource)
109    {
110      OnCreated();
111    }
112   
113    public System.Data.Linq.Table<AssignedResource> AssignedResources
114    {
115      get
116      {
117        return this.GetTable<AssignedResource>();
118      }
119    }
120   
121    public System.Data.Linq.Table<Plugin> Plugins
122    {
123      get
124      {
125        return this.GetTable<Plugin>();
126      }
127    }
128   
129    public System.Data.Linq.Table<RequiredPlugin> RequiredPlugins
130    {
131      get
132      {
133        return this.GetTable<RequiredPlugin>();
134      }
135    }
136   
137    public System.Data.Linq.Table<Resource> Resources
138    {
139      get
140      {
141        return this.GetTable<Resource>();
142      }
143    }
144   
145    public System.Data.Linq.Table<Task> Tasks
146    {
147      get
148      {
149        return this.GetTable<Task>();
150      }
151    }
152   
153    public System.Data.Linq.Table<Downtime> Downtimes
154    {
155      get
156      {
157        return this.GetTable<Downtime>();
158      }
159    }
160   
161    public System.Data.Linq.Table<Job> Jobs
162    {
163      get
164      {
165        return this.GetTable<Job>();
166      }
167    }
168   
169    public System.Data.Linq.Table<TaskData> TaskDatas
170    {
171      get
172      {
173        return this.GetTable<TaskData>();
174      }
175    }
176   
177    public System.Data.Linq.Table<PluginData> PluginDatas
178    {
179      get
180      {
181        return this.GetTable<PluginData>();
182      }
183    }
184   
185    public System.Data.Linq.Table<StateLog> StateLogs
186    {
187      get
188      {
189        return this.GetTable<StateLog>();
190      }
191    }
192   
193    public System.Data.Linq.Table<JobPermission> JobPermissions
194    {
195      get
196      {
197        return this.GetTable<JobPermission>();
198      }
199    }
200   
201    public System.Data.Linq.Table<Lifecycle> Lifecycles
202    {
203      get
204      {
205        return this.GetTable<Lifecycle>();
206      }
207    }
208   
209    public System.Data.Linq.Table<DeletedJobStatistics> DeletedJobStatistics
210    {
211      get
212      {
213        return this.GetTable<DeletedJobStatistics>();
214      }
215    }
216   
217    public System.Data.Linq.Table<UserStatistics> UserStatistics
218    {
219      get
220      {
221        return this.GetTable<UserStatistics>();
222      }
223    }
224   
225    public System.Data.Linq.Table<SlaveStatistics> SlaveStatistics
226    {
227      get
228      {
229        return this.GetTable<SlaveStatistics>();
230      }
231    }
232   
233    public System.Data.Linq.Table<Statistics> Statistics
234    {
235      get
236      {
237        return this.GetTable<Statistics>();
238      }
239    }
240  }
241 
242  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedResources")]
243  public partial class AssignedResource : INotifyPropertyChanging, INotifyPropertyChanged
244  {
245   
246    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
247   
248    private System.Guid _ResourceId;
249   
250    private System.Guid _JobId;
251   
252    private EntityRef<Resource> _Resource;
253   
254    private EntityRef<Task> _Job;
255   
256    #region Extensibility Method Definitions
257    partial void OnLoaded();
258    partial void OnValidate(System.Data.Linq.ChangeAction action);
259    partial void OnCreated();
260    partial void OnResourceIdChanging(System.Guid value);
261    partial void OnResourceIdChanged();
262    partial void OnTaskIdChanging(System.Guid value);
263    partial void OnTaskIdChanged();
264    #endregion
265   
266    public AssignedResource()
267    {
268      this._Resource = default(EntityRef<Resource>);
269      this._Job = default(EntityRef<Task>);
270      OnCreated();
271    }
272   
273    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
274    public System.Guid ResourceId
275    {
276      get
277      {
278        return this._ResourceId;
279      }
280      set
281      {
282        if ((this._ResourceId != value))
283        {
284          if (this._Resource.HasLoadedOrAssignedValue)
285          {
286            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
287          }
288          this.OnResourceIdChanging(value);
289          this.SendPropertyChanging();
290          this._ResourceId = value;
291          this.SendPropertyChanged("ResourceId");
292          this.OnResourceIdChanged();
293        }
294      }
295    }
296   
297    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
298    public System.Guid TaskId
299    {
300      get
301      {
302        return this._JobId;
303      }
304      set
305      {
306        if ((this._JobId != value))
307        {
308          if (this._Job.HasLoadedOrAssignedValue)
309          {
310            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
311          }
312          this.OnTaskIdChanging(value);
313          this.SendPropertyChanging();
314          this._JobId = value;
315          this.SendPropertyChanged("TaskId");
316          this.OnTaskIdChanged();
317        }
318      }
319    }
320   
321    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
322    public Resource Resource
323    {
324      get
325      {
326        return this._Resource.Entity;
327      }
328      set
329      {
330        Resource previousValue = this._Resource.Entity;
331        if (((previousValue != value)
332              || (this._Resource.HasLoadedOrAssignedValue == false)))
333        {
334          this.SendPropertyChanging();
335          if ((previousValue != null))
336          {
337            this._Resource.Entity = null;
338            previousValue.AssignedResources.Remove(this);
339          }
340          this._Resource.Entity = value;
341          if ((value != null))
342          {
343            value.AssignedResources.Add(this);
344            this._ResourceId = value.ResourceId;
345          }
346          else
347          {
348            this._ResourceId = default(System.Guid);
349          }
350          this.SendPropertyChanged("Resource");
351        }
352      }
353    }
354   
355    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedResource", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true, DeleteRule="CASCADE")]
356    public Task Task
357    {
358      get
359      {
360        return this._Job.Entity;
361      }
362      set
363      {
364        Task previousValue = this._Job.Entity;
365        if (((previousValue != value)
366              || (this._Job.HasLoadedOrAssignedValue == false)))
367        {
368          this.SendPropertyChanging();
369          if ((previousValue != null))
370          {
371            this._Job.Entity = null;
372            previousValue.AssignedResources.Remove(this);
373          }
374          this._Job.Entity = value;
375          if ((value != null))
376          {
377            value.AssignedResources.Add(this);
378            this._JobId = value.TaskId;
379          }
380          else
381          {
382            this._JobId = default(System.Guid);
383          }
384          this.SendPropertyChanged("Task");
385        }
386      }
387    }
388   
389    public event PropertyChangingEventHandler PropertyChanging;
390   
391    public event PropertyChangedEventHandler PropertyChanged;
392   
393    protected virtual void SendPropertyChanging()
394    {
395      if ((this.PropertyChanging != null))
396      {
397        this.PropertyChanging(this, emptyChangingEventArgs);
398      }
399    }
400   
401    protected virtual void SendPropertyChanged(String propertyName)
402    {
403      if ((this.PropertyChanged != null))
404      {
405        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
406      }
407    }
408  }
409 
410  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Plugin")]
411  public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged
412  {
413   
414    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
415   
416    private System.Guid _PluginId;
417   
418    private string _Name;
419   
420    private string _Version;
421   
422    private System.Guid _UserId;
423   
424    private System.DateTime _DateCreated;
425   
426    private byte[] _Hash;
427   
428    private EntitySet<RequiredPlugin> _RequiredPlugins;
429   
430    private EntitySet<PluginData> _PluginData;
431   
432    #region Extensibility Method Definitions
433    partial void OnLoaded();
434    partial void OnValidate(System.Data.Linq.ChangeAction action);
435    partial void OnCreated();
436    partial void OnPluginIdChanging(System.Guid value);
437    partial void OnPluginIdChanged();
438    partial void OnNameChanging(string value);
439    partial void OnNameChanged();
440    partial void OnVersionChanging(string value);
441    partial void OnVersionChanged();
442    partial void OnUserIdChanging(System.Guid value);
443    partial void OnUserIdChanged();
444    partial void OnDateCreatedChanging(System.DateTime value);
445    partial void OnDateCreatedChanged();
446    partial void OnHashChanging(byte[] value);
447    partial void OnHashChanged();
448    #endregion
449   
450    public Plugin()
451    {
452      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
453      this._PluginData = new EntitySet<PluginData>(new Action<PluginData>(this.attach_PluginData), new Action<PluginData>(this.detach_PluginData));
454      OnCreated();
455    }
456   
457    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
458    public System.Guid PluginId
459    {
460      get
461      {
462        return this._PluginId;
463      }
464      set
465      {
466        if ((this._PluginId != value))
467        {
468          this.OnPluginIdChanging(value);
469          this.SendPropertyChanging();
470          this._PluginId = value;
471          this.SendPropertyChanged("PluginId");
472          this.OnPluginIdChanged();
473        }
474      }
475    }
476   
477    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
478    public string Name
479    {
480      get
481      {
482        return this._Name;
483      }
484      set
485      {
486        if ((this._Name != value))
487        {
488          this.OnNameChanging(value);
489          this.SendPropertyChanging();
490          this._Name = value;
491          this.SendPropertyChanged("Name");
492          this.OnNameChanged();
493        }
494      }
495    }
496   
497    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Version", DbType="VarChar(MAX)", CanBeNull=false)]
498    public string Version
499    {
500      get
501      {
502        return this._Version;
503      }
504      set
505      {
506        if ((this._Version != value))
507        {
508          this.OnVersionChanging(value);
509          this.SendPropertyChanging();
510          this._Version = value;
511          this.SendPropertyChanged("Version");
512          this.OnVersionChanged();
513        }
514      }
515    }
516   
517    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
518    public System.Guid UserId
519    {
520      get
521      {
522        return this._UserId;
523      }
524      set
525      {
526        if ((this._UserId != value))
527        {
528          this.OnUserIdChanging(value);
529          this.SendPropertyChanging();
530          this._UserId = value;
531          this.SendPropertyChanged("UserId");
532          this.OnUserIdChanged();
533        }
534      }
535    }
536   
537    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
538    public System.DateTime DateCreated
539    {
540      get
541      {
542        return this._DateCreated;
543      }
544      set
545      {
546        if ((this._DateCreated != value))
547        {
548          this.OnDateCreatedChanging(value);
549          this.SendPropertyChanging();
550          this._DateCreated = value;
551          this.SendPropertyChanged("DateCreated");
552          this.OnDateCreatedChanged();
553        }
554      }
555    }
556   
557    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hash", DbType="VarBinary(20) NOT NULL", CanBeNull=false)]
558    public byte[] Hash
559    {
560      get
561      {
562        return this._Hash;
563      }
564      set
565      {
566        if ((this._Hash != value))
567        {
568          this.OnHashChanging(value);
569          this.SendPropertyChanging();
570          this._Hash = value;
571          this.SendPropertyChanged("Hash");
572          this.OnHashChanged();
573        }
574      }
575    }
576   
577    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
578    public EntitySet<RequiredPlugin> RequiredPlugins
579    {
580      get
581      {
582        return this._RequiredPlugins;
583      }
584      set
585      {
586        this._RequiredPlugins.Assign(value);
587      }
588    }
589   
590    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_PluginData", ThisKey="PluginId", OtherKey="PluginId")]
591    public EntitySet<PluginData> PluginData
592    {
593      get
594      {
595        return this._PluginData;
596      }
597      set
598      {
599        this._PluginData.Assign(value);
600      }
601    }
602   
603    public event PropertyChangingEventHandler PropertyChanging;
604   
605    public event PropertyChangedEventHandler PropertyChanged;
606   
607    protected virtual void SendPropertyChanging()
608    {
609      if ((this.PropertyChanging != null))
610      {
611        this.PropertyChanging(this, emptyChangingEventArgs);
612      }
613    }
614   
615    protected virtual void SendPropertyChanged(String propertyName)
616    {
617      if ((this.PropertyChanged != null))
618      {
619        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
620      }
621    }
622   
623    private void attach_RequiredPlugins(RequiredPlugin entity)
624    {
625      this.SendPropertyChanging();
626      entity.Plugin = this;
627    }
628   
629    private void detach_RequiredPlugins(RequiredPlugin entity)
630    {
631      this.SendPropertyChanging();
632      entity.Plugin = null;
633    }
634   
635    private void attach_PluginData(PluginData entity)
636    {
637      this.SendPropertyChanging();
638      entity.Plugin = this;
639    }
640   
641    private void detach_PluginData(PluginData entity)
642    {
643      this.SendPropertyChanging();
644      entity.Plugin = null;
645    }
646  }
647 
648  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RequiredPlugins")]
649  public partial class RequiredPlugin : INotifyPropertyChanging, INotifyPropertyChanged
650  {
651   
652    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
653   
654    private System.Guid _RequiredPluginId;
655   
656    private System.Guid _JobId;
657   
658    private System.Guid _PluginId;
659   
660    private EntityRef<Plugin> _PluginInfo;
661   
662    private EntityRef<Task> _Job;
663   
664    #region Extensibility Method Definitions
665    partial void OnLoaded();
666    partial void OnValidate(System.Data.Linq.ChangeAction action);
667    partial void OnCreated();
668    partial void OnRequiredPluginIdChanging(System.Guid value);
669    partial void OnRequiredPluginIdChanged();
670    partial void OnTaskIdChanging(System.Guid value);
671    partial void OnTaskIdChanged();
672    partial void OnPluginIdChanging(System.Guid value);
673    partial void OnPluginIdChanged();
674    #endregion
675   
676    public RequiredPlugin()
677    {
678      this._PluginInfo = default(EntityRef<Plugin>);
679      this._Job = default(EntityRef<Task>);
680      OnCreated();
681    }
682   
683    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequiredPluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
684    public System.Guid RequiredPluginId
685    {
686      get
687      {
688        return this._RequiredPluginId;
689      }
690      set
691      {
692        if ((this._RequiredPluginId != value))
693        {
694          this.OnRequiredPluginIdChanging(value);
695          this.SendPropertyChanging();
696          this._RequiredPluginId = value;
697          this.SendPropertyChanged("RequiredPluginId");
698          this.OnRequiredPluginIdChanged();
699        }
700      }
701    }
702   
703    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
704    public System.Guid TaskId
705    {
706      get
707      {
708        return this._JobId;
709      }
710      set
711      {
712        if ((this._JobId != value))
713        {
714          if (this._Job.HasLoadedOrAssignedValue)
715          {
716            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
717          }
718          this.OnTaskIdChanging(value);
719          this.SendPropertyChanging();
720          this._JobId = value;
721          this.SendPropertyChanged("TaskId");
722          this.OnTaskIdChanged();
723        }
724      }
725    }
726   
727    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
728    public System.Guid PluginId
729    {
730      get
731      {
732        return this._PluginId;
733      }
734      set
735      {
736        if ((this._PluginId != value))
737        {
738          if (this._PluginInfo.HasLoadedOrAssignedValue)
739          {
740            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
741          }
742          this.OnPluginIdChanging(value);
743          this.SendPropertyChanging();
744          this._PluginId = value;
745          this.SendPropertyChanged("PluginId");
746          this.OnPluginIdChanged();
747        }
748      }
749    }
750   
751    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
752    public Plugin Plugin
753    {
754      get
755      {
756        return this._PluginInfo.Entity;
757      }
758      set
759      {
760        Plugin previousValue = this._PluginInfo.Entity;
761        if (((previousValue != value)
762              || (this._PluginInfo.HasLoadedOrAssignedValue == false)))
763        {
764          this.SendPropertyChanging();
765          if ((previousValue != null))
766          {
767            this._PluginInfo.Entity = null;
768            previousValue.RequiredPlugins.Remove(this);
769          }
770          this._PluginInfo.Entity = value;
771          if ((value != null))
772          {
773            value.RequiredPlugins.Add(this);
774            this._PluginId = value.PluginId;
775          }
776          else
777          {
778            this._PluginId = default(System.Guid);
779          }
780          this.SendPropertyChanged("Plugin");
781        }
782      }
783    }
784   
785    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
786    public Task Task
787    {
788      get
789      {
790        return this._Job.Entity;
791      }
792      set
793      {
794        Task previousValue = this._Job.Entity;
795        if (((previousValue != value)
796              || (this._Job.HasLoadedOrAssignedValue == false)))
797        {
798          this.SendPropertyChanging();
799          if ((previousValue != null))
800          {
801            this._Job.Entity = null;
802            previousValue.RequiredPlugins.Remove(this);
803          }
804          this._Job.Entity = value;
805          if ((value != null))
806          {
807            value.RequiredPlugins.Add(this);
808            this._JobId = value.TaskId;
809          }
810          else
811          {
812            this._JobId = default(System.Guid);
813          }
814          this.SendPropertyChanged("Task");
815        }
816      }
817    }
818   
819    public event PropertyChangingEventHandler PropertyChanging;
820   
821    public event PropertyChangedEventHandler PropertyChanged;
822   
823    protected virtual void SendPropertyChanging()
824    {
825      if ((this.PropertyChanging != null))
826      {
827        this.PropertyChanging(this, emptyChangingEventArgs);
828      }
829    }
830   
831    protected virtual void SendPropertyChanged(String propertyName)
832    {
833      if ((this.PropertyChanged != null))
834      {
835        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
836      }
837    }
838  }
839 
840  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Resource")]
841  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="RESOURCE", Type=typeof(Resource))]
842  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Slave", Type=typeof(Slave), IsDefault=true)]
843  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="GROUP", Type=typeof(SlaveGroup))]
844  public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
845  {
846   
847    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
848   
849    private System.Guid _ResourceId;
850   
851    private string _Name;
852   
853    private string _ResourceType;
854   
855    private System.Nullable<System.Guid> _ParentResourceId;
856   
857    private int _HbInterval;
858   
859    private EntitySet<AssignedResource> _AssignedResources;
860   
861    private EntitySet<Resource> _ChildResources;
862   
863    private EntitySet<Downtime> _UptimeCalendars;
864   
865    private EntitySet<StateLog> _StateLogs;
866   
867    private EntityRef<Resource> _ParentResource;
868   
869    #region Extensibility Method Definitions
870    partial void OnLoaded();
871    partial void OnValidate(System.Data.Linq.ChangeAction action);
872    partial void OnCreated();
873    partial void OnResourceIdChanging(System.Guid value);
874    partial void OnResourceIdChanged();
875    partial void OnNameChanging(string value);
876    partial void OnNameChanged();
877    partial void OnResourceTypeChanging(string value);
878    partial void OnResourceTypeChanged();
879    partial void OnParentResourceIdChanging(System.Nullable<System.Guid> value);
880    partial void OnParentResourceIdChanged();
881    partial void OnHbIntervalChanging(int value);
882    partial void OnHbIntervalChanged();
883    #endregion
884   
885    public Resource()
886    {
887      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
888      this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources));
889      this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars));
890      this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
891      this._ParentResource = default(EntityRef<Resource>);
892      OnCreated();
893    }
894   
895    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
896    public System.Guid ResourceId
897    {
898      get
899      {
900        return this._ResourceId;
901      }
902      set
903      {
904        if ((this._ResourceId != value))
905        {
906          this.OnResourceIdChanging(value);
907          this.SendPropertyChanging();
908          this._ResourceId = value;
909          this.SendPropertyChanged("ResourceId");
910          this.OnResourceIdChanged();
911        }
912      }
913    }
914   
915    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
916    public string Name
917    {
918      get
919      {
920        return this._Name;
921      }
922      set
923      {
924        if ((this._Name != value))
925        {
926          this.OnNameChanging(value);
927          this.SendPropertyChanging();
928          this._Name = value;
929          this.SendPropertyChanged("Name");
930          this.OnNameChanged();
931        }
932      }
933    }
934   
935    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", CanBeNull=false, IsDiscriminator=true)]
936    public string ResourceType
937    {
938      get
939      {
940        return this._ResourceType;
941      }
942      set
943      {
944        if ((this._ResourceType != value))
945        {
946          this.OnResourceTypeChanging(value);
947          this.SendPropertyChanging();
948          this._ResourceType = value;
949          this.SendPropertyChanged("ResourceType");
950          this.OnResourceTypeChanged();
951        }
952      }
953    }
954   
955    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentResourceId", DbType="UniqueIdentifier")]
956    public System.Nullable<System.Guid> ParentResourceId
957    {
958      get
959      {
960        return this._ParentResourceId;
961      }
962      set
963      {
964        if ((this._ParentResourceId != value))
965        {
966          if (this._ParentResource.HasLoadedOrAssignedValue)
967          {
968            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
969          }
970          this.OnParentResourceIdChanging(value);
971          this.SendPropertyChanging();
972          this._ParentResourceId = value;
973          this.SendPropertyChanged("ParentResourceId");
974          this.OnParentResourceIdChanged();
975        }
976      }
977    }
978   
979    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HbInterval", DbType="Int")]
980    public int HbInterval
981    {
982      get
983      {
984        return this._HbInterval;
985      }
986      set
987      {
988        if ((this._HbInterval != value))
989        {
990          this.OnHbIntervalChanging(value);
991          this.SendPropertyChanging();
992          this._HbInterval = value;
993          this.SendPropertyChanged("HbInterval");
994          this.OnHbIntervalChanged();
995        }
996      }
997    }
998   
999    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
1000    public EntitySet<AssignedResource> AssignedResources
1001    {
1002      get
1003      {
1004        return this._AssignedResources;
1005      }
1006      set
1007      {
1008        this._AssignedResources.Assign(value);
1009      }
1010    }
1011   
1012    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ChildResources", ThisKey="ResourceId", OtherKey="ParentResourceId")]
1013    public EntitySet<Resource> ChildResources
1014    {
1015      get
1016      {
1017        return this._ChildResources;
1018      }
1019      set
1020      {
1021        this._ChildResources.Assign(value);
1022      }
1023    }
1024   
1025    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
1026    public EntitySet<Downtime> Downtimes
1027    {
1028      get
1029      {
1030        return this._UptimeCalendars;
1031      }
1032      set
1033      {
1034        this._UptimeCalendars.Assign(value);
1035      }
1036    }
1037   
1038    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_StateLogs", ThisKey="ResourceId", OtherKey="SlaveId")]
1039    public EntitySet<StateLog> StateLogs
1040    {
1041      get
1042      {
1043        return this._StateLogs;
1044      }
1045      set
1046      {
1047        this._StateLogs.Assign(value);
1048      }
1049    }
1050   
1051    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ParentResource", ThisKey="ParentResourceId", OtherKey="ResourceId", IsForeignKey=true)]
1052    public Resource ParentResource
1053    {
1054      get
1055      {
1056        return this._ParentResource.Entity;
1057      }
1058      set
1059      {
1060        Resource previousValue = this._ParentResource.Entity;
1061        if (((previousValue != value)
1062              || (this._ParentResource.HasLoadedOrAssignedValue == false)))
1063        {
1064          this.SendPropertyChanging();
1065          if ((previousValue != null))
1066          {
1067            this._ParentResource.Entity = null;
1068            previousValue.ChildResources.Remove(this);
1069          }
1070          this._ParentResource.Entity = value;
1071          if ((value != null))
1072          {
1073            value.ChildResources.Add(this);
1074            this._ParentResourceId = value.ResourceId;
1075          }
1076          else
1077          {
1078            this._ParentResourceId = default(Nullable<System.Guid>);
1079          }
1080          this.SendPropertyChanged("ParentResource");
1081        }
1082      }
1083    }
1084   
1085    public event PropertyChangingEventHandler PropertyChanging;
1086   
1087    public event PropertyChangedEventHandler PropertyChanged;
1088   
1089    protected virtual void SendPropertyChanging()
1090    {
1091      if ((this.PropertyChanging != null))
1092      {
1093        this.PropertyChanging(this, emptyChangingEventArgs);
1094      }
1095    }
1096   
1097    protected virtual void SendPropertyChanged(String propertyName)
1098    {
1099      if ((this.PropertyChanged != null))
1100      {
1101        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1102      }
1103    }
1104   
1105    private void attach_AssignedResources(AssignedResource entity)
1106    {
1107      this.SendPropertyChanging();
1108      entity.Resource = this;
1109    }
1110   
1111    private void detach_AssignedResources(AssignedResource entity)
1112    {
1113      this.SendPropertyChanging();
1114      entity.Resource = null;
1115    }
1116   
1117    private void attach_ChildResources(Resource entity)
1118    {
1119      this.SendPropertyChanging();
1120      entity.ParentResource = this;
1121    }
1122   
1123    private void detach_ChildResources(Resource entity)
1124    {
1125      this.SendPropertyChanging();
1126      entity.ParentResource = null;
1127    }
1128   
1129    private void attach_UptimeCalendars(Downtime entity)
1130    {
1131      this.SendPropertyChanging();
1132      entity.Resource = this;
1133    }
1134   
1135    private void detach_UptimeCalendars(Downtime entity)
1136    {
1137      this.SendPropertyChanging();
1138      entity.Resource = null;
1139    }
1140   
1141    private void attach_StateLogs(StateLog entity)
1142    {
1143      this.SendPropertyChanging();
1144      entity.Resource = this;
1145    }
1146   
1147    private void detach_StateLogs(StateLog entity)
1148    {
1149      this.SendPropertyChanging();
1150      entity.Resource = null;
1151    }
1152  }
1153 
1154  public partial class Slave : Resource
1155  {
1156   
1157    private System.Nullable<int> _CPUSpeed;
1158   
1159    private System.Nullable<int> _Memory;
1160   
1161    private System.Nullable<System.DateTime> _Login;
1162   
1163    private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _Status;
1164   
1165    private System.Nullable<int> _NumberOfCores;
1166   
1167    private System.Nullable<int> _NumberOfFreeCores;
1168   
1169    private System.Nullable<int> _FreeMemory;
1170   
1171    private bool _IsAllowedToCalculate;
1172   
1173    private global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture _CpuArchitecture;
1174   
1175    private string _OperatingSystem;
1176   
1177    private System.Nullable<System.DateTime> _LastHeartbeat;
1178   
1179    private double _CpuUtilization;
1180   
[7857]1181    private bool _IsDisposable;
1182   
[6983]1183    #region Extensibility Method Definitions
1184    partial void OnLoaded();
1185    partial void OnValidate(System.Data.Linq.ChangeAction action);
1186    partial void OnCreated();
1187    partial void OnCpuSpeedChanging(System.Nullable<int> value);
1188    partial void OnCpuSpeedChanged();
1189    partial void OnMemoryChanging(System.Nullable<int> value);
1190    partial void OnMemoryChanged();
1191    partial void OnLoginChanging(System.Nullable<System.DateTime> value);
1192    partial void OnLoginChanged();
1193    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
1194    partial void OnSlaveStateChanged();
1195    partial void OnCoresChanging(System.Nullable<int> value);
1196    partial void OnCoresChanged();
1197    partial void OnFreeCoresChanging(System.Nullable<int> value);
1198    partial void OnFreeCoresChanged();
1199    partial void OnFreeMemoryChanging(System.Nullable<int> value);
1200    partial void OnFreeMemoryChanged();
1201    partial void OnIsAllowedToCalculateChanging(bool value);
1202    partial void OnIsAllowedToCalculateChanged();
1203    partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture value);
1204    partial void OnCpuArchitectureChanged();
1205    partial void OnOperatingSystemChanging(string value);
1206    partial void OnOperatingSystemChanged();
1207    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
1208    partial void OnLastHeartbeatChanged();
1209    partial void OnCpuUtilizationChanging(double value);
1210    partial void OnCpuUtilizationChanged();
[7857]1211    partial void OnIsDisposableChanging(bool value);
1212    partial void OnIsDisposableChanged();
[6983]1213    #endregion
1214   
1215    public Slave()
1216    {
1217      OnCreated();
1218    }
1219   
1220    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPUSpeed", DbType="Int")]
1221    public System.Nullable<int> CpuSpeed
1222    {
1223      get
1224      {
1225        return this._CPUSpeed;
1226      }
1227      set
1228      {
1229        if ((this._CPUSpeed != value))
1230        {
1231          this.OnCpuSpeedChanging(value);
1232          this.SendPropertyChanging();
1233          this._CPUSpeed = value;
1234          this.SendPropertyChanged("CpuSpeed");
1235          this.OnCpuSpeedChanged();
1236        }
1237      }
1238    }
1239   
1240    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int")]
1241    public System.Nullable<int> Memory
1242    {
1243      get
1244      {
1245        return this._Memory;
1246      }
1247      set
1248      {
1249        if ((this._Memory != value))
1250        {
1251          this.OnMemoryChanging(value);
1252          this.SendPropertyChanging();
1253          this._Memory = value;
1254          this.SendPropertyChanged("Memory");
1255          this.OnMemoryChanged();
1256        }
1257      }
1258    }
1259   
1260    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]
1261    public System.Nullable<System.DateTime> Login
1262    {
1263      get
1264      {
1265        return this._Login;
1266      }
1267      set
1268      {
1269        if ((this._Login != value))
1270        {
1271          this.OnLoginChanging(value);
1272          this.SendPropertyChanging();
1273          this._Login = value;
1274          this.SendPropertyChanged("Login");
1275          this.OnLoginChanged();
1276        }
1277      }
1278    }
1279   
1280    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(15)", CanBeNull=true)]
1281    public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
1282    {
1283      get
1284      {
1285        return this._Status;
1286      }
1287      set
1288      {
1289        if ((this._Status != value))
1290        {
1291          this.OnSlaveStateChanging(value);
1292          this.SendPropertyChanging();
1293          this._Status = value;
1294          this.SendPropertyChanged("SlaveState");
1295          this.OnSlaveStateChanged();
1296        }
1297      }
1298    }
1299   
1300    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfCores", DbType="Int")]
1301    public System.Nullable<int> Cores
1302    {
1303      get
1304      {
1305        return this._NumberOfCores;
1306      }
1307      set
1308      {
1309        if ((this._NumberOfCores != value))
1310        {
1311          this.OnCoresChanging(value);
1312          this.SendPropertyChanging();
1313          this._NumberOfCores = value;
1314          this.SendPropertyChanged("Cores");
1315          this.OnCoresChanged();
1316        }
1317      }
1318    }
1319   
1320    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfFreeCores", DbType="Int")]
1321    public System.Nullable<int> FreeCores
1322    {
1323      get
1324      {
1325        return this._NumberOfFreeCores;
1326      }
1327      set
1328      {
1329        if ((this._NumberOfFreeCores != value))
1330        {
1331          this.OnFreeCoresChanging(value);
1332          this.SendPropertyChanging();
1333          this._NumberOfFreeCores = value;
1334          this.SendPropertyChanged("FreeCores");
1335          this.OnFreeCoresChanged();
1336        }
1337      }
1338    }
1339   
1340    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int")]
1341    public System.Nullable<int> FreeMemory
1342    {
1343      get
1344      {
1345        return this._FreeMemory;
1346      }
1347      set
1348      {
1349        if ((this._FreeMemory != value))
1350        {
1351          this.OnFreeMemoryChanging(value);
1352          this.SendPropertyChanging();
1353          this._FreeMemory = value;
1354          this.SendPropertyChanged("FreeMemory");
1355          this.OnFreeMemoryChanged();
1356        }
1357      }
1358    }
1359   
1360    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAllowedToCalculate", DbType="Bit")]
1361    public bool IsAllowedToCalculate
1362    {
1363      get
1364      {
1365        return this._IsAllowedToCalculate;
1366      }
1367      set
1368      {
1369        if ((this._IsAllowedToCalculate != value))
1370        {
1371          this.OnIsAllowedToCalculateChanging(value);
1372          this.SendPropertyChanging();
1373          this._IsAllowedToCalculate = value;
1374          this.SendPropertyChanged("IsAllowedToCalculate");
1375          this.OnIsAllowedToCalculateChanged();
1376        }
1377      }
1378    }
1379   
1380    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuArchitecture", DbType="VarChar(3)", CanBeNull=false)]
1381    public global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture CpuArchitecture
1382    {
1383      get
1384      {
1385        return this._CpuArchitecture;
1386      }
1387      set
1388      {
1389        if ((this._CpuArchitecture != value))
1390        {
1391          this.OnCpuArchitectureChanging(value);
1392          this.SendPropertyChanging();
1393          this._CpuArchitecture = value;
1394          this.SendPropertyChanged("CpuArchitecture");
1395          this.OnCpuArchitectureChanged();
1396        }
1397      }
1398    }
1399   
1400    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingSystem", DbType="VarChar(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
1401    public string OperatingSystem
1402    {
1403      get
1404      {
1405        return this._OperatingSystem;
1406      }
1407      set
1408      {
1409        if ((this._OperatingSystem != value))
1410        {
1411          this.OnOperatingSystemChanging(value);
1412          this.SendPropertyChanging();
1413          this._OperatingSystem = value;
1414          this.SendPropertyChanged("OperatingSystem");
1415          this.OnOperatingSystemChanged();
1416        }
1417      }
1418    }
1419   
1420    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
1421    public System.Nullable<System.DateTime> LastHeartbeat
1422    {
1423      get
1424      {
1425        return this._LastHeartbeat;
1426      }
1427      set
1428      {
1429        if ((this._LastHeartbeat != value))
1430        {
1431          this.OnLastHeartbeatChanging(value);
1432          this.SendPropertyChanging();
1433          this._LastHeartbeat = value;
1434          this.SendPropertyChanged("LastHeartbeat");
1435          this.OnLastHeartbeatChanged();
1436        }
1437      }
1438    }
1439   
1440    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="float")]
1441    public double CpuUtilization
1442    {
1443      get
1444      {
1445        return this._CpuUtilization;
1446      }
1447      set
1448      {
1449        if ((this._CpuUtilization != value))
1450        {
1451          this.OnCpuUtilizationChanging(value);
1452          this.SendPropertyChanging();
1453          this._CpuUtilization = value;
1454          this.SendPropertyChanged("CpuUtilization");
1455          this.OnCpuUtilizationChanged();
1456        }
1457      }
1458    }
[7857]1459   
1460    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsDisposable", DbType="Bit")]
1461    public bool IsDisposable
1462    {
1463      get
1464      {
1465        return this._IsDisposable;
1466      }
1467      set
1468      {
1469        if ((this._IsDisposable != value))
1470        {
1471          this.OnIsDisposableChanging(value);
1472          this.SendPropertyChanging();
1473          this._IsDisposable = value;
1474          this.SendPropertyChanged("IsDisposable");
1475          this.OnIsDisposableChanged();
1476        }
1477      }
1478    }
[6983]1479  }
1480 
1481  public partial class SlaveGroup : Resource
1482  {
1483   
1484    #region Extensibility Method Definitions
1485    partial void OnLoaded();
1486    partial void OnValidate(System.Data.Linq.ChangeAction action);
1487    partial void OnCreated();
1488    #endregion
1489   
1490    public SlaveGroup()
1491    {
1492      OnCreated();
1493    }
1494  }
1495 
1496  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Task")]
1497  public partial class Task : INotifyPropertyChanging, INotifyPropertyChanged
1498  {
1499   
1500    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1501   
1502    private System.Guid _JobId;
1503   
1504    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
1505   
1506    private double _ExecutionTime;
1507   
1508    private System.Nullable<System.DateTime> _LastHeartbeat;
1509   
1510    private System.Nullable<System.Guid> _ParentJobId;
1511   
1512    private int _Priority;
1513   
1514    private int _CoresNeeded;
1515   
1516    private int _MemoryNeeded;
1517   
1518    private bool _IsParentJob;
1519   
1520    private bool _FinishWhenChildJobsFinished;
1521   
1522    private global::HeuristicLab.Services.Hive.DataAccess.Command? _Command;
1523   
1524    private System.Guid _HiveExperimentId;
1525   
1526    private bool _IsPrivileged;
1527   
1528    private EntitySet<AssignedResource> _AssignedResources;
1529   
1530    private EntitySet<RequiredPlugin> _RequiredPlugins;
1531   
1532    private EntitySet<Task> _Jobs;
1533   
1534    private EntityRef<TaskData> _JobData;
1535   
1536    private EntitySet<StateLog> _StateLogs;
1537   
1538    private EntityRef<Task> _Job1;
1539   
1540    private EntityRef<Job> _HiveExperiment;
1541   
1542    #region Extensibility Method Definitions
1543    partial void OnLoaded();
1544    partial void OnValidate(System.Data.Linq.ChangeAction action);
1545    partial void OnCreated();
1546    partial void OnTaskIdChanging(System.Guid value);
1547    partial void OnTaskIdChanged();
1548    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
1549    partial void OnStateChanged();
1550    partial void OnExecutionTimeMsChanging(double value);
1551    partial void OnExecutionTimeMsChanged();
1552    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
1553    partial void OnLastHeartbeatChanged();
1554    partial void OnParentTaskIdChanging(System.Nullable<System.Guid> value);
1555    partial void OnParentTaskIdChanged();
1556    partial void OnPriorityChanging(int value);
1557    partial void OnPriorityChanged();
1558    partial void OnCoresNeededChanging(int value);
1559    partial void OnCoresNeededChanged();
1560    partial void OnMemoryNeededChanging(int value);
1561    partial void OnMemoryNeededChanged();
1562    partial void OnIsParentTaskChanging(bool value);
1563    partial void OnIsParentTaskChanged();
1564    partial void OnFinishWhenChildJobsFinishedChanging(bool value);
1565    partial void OnFinishWhenChildJobsFinishedChanged();
1566    partial void OnCommandChanging(global::HeuristicLab.Services.Hive.DataAccess.Command? value);
1567    partial void OnCommandChanged();
1568    partial void OnJobIdChanging(System.Guid value);
1569    partial void OnJobIdChanged();
1570    partial void OnIsPrivilegedChanging(bool value);
1571    partial void OnIsPrivilegedChanged();
1572    #endregion
1573   
1574    public Task()
1575    {
1576      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
1577      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
1578      this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs));
1579      this._JobData = default(EntityRef<TaskData>);
1580      this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
1581      this._Job1 = default(EntityRef<Task>);
1582      this._HiveExperiment = default(EntityRef<Job>);
1583      OnCreated();
1584    }
1585   
1586    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
1587    public System.Guid TaskId
1588    {
1589      get
1590      {
1591        return this._JobId;
1592      }
1593      set
1594      {
1595        if ((this._JobId != value))
1596        {
1597          this.OnTaskIdChanging(value);
1598          this.SendPropertyChanging();
1599          this._JobId = value;
1600          this.SendPropertyChanged("TaskId");
1601          this.OnTaskIdChanged();
1602        }
1603      }
1604    }
1605   
1606    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="TaskState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)]
1607    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
1608    {
1609      get
1610      {
1611        return this._State;
1612      }
1613      set
1614      {
1615        if ((this._State != value))
1616        {
1617          this.OnStateChanging(value);
1618          this.SendPropertyChanging();
1619          this._State = value;
1620          this.SendPropertyChanged("State");
1621          this.OnStateChanged();
1622        }
1623      }
1624    }
1625   
1626    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float")]
1627    public double ExecutionTimeMs
1628    {
1629      get
1630      {
1631        return this._ExecutionTime;
1632      }
1633      set
1634      {
1635        if ((this._ExecutionTime != value))
1636        {
1637          this.OnExecutionTimeMsChanging(value);
1638          this.SendPropertyChanging();
1639          this._ExecutionTime = value;
1640          this.SendPropertyChanged("ExecutionTimeMs");
1641          this.OnExecutionTimeMsChanged();
1642        }
1643      }
1644    }
1645   
1646    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
1647    public System.Nullable<System.DateTime> LastHeartbeat
1648    {
1649      get
1650      {
1651        return this._LastHeartbeat;
1652      }
1653      set
1654      {
1655        if ((this._LastHeartbeat != value))
1656        {
1657          this.OnLastHeartbeatChanging(value);
1658          this.SendPropertyChanging();
1659          this._LastHeartbeat = value;
1660          this.SendPropertyChanged("LastHeartbeat");
1661          this.OnLastHeartbeatChanged();
1662        }
1663      }
1664    }
1665   
1666    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")]
1667    public System.Nullable<System.Guid> ParentTaskId
1668    {
1669      get
1670      {
1671        return this._ParentJobId;
1672      }
1673      set
1674      {
1675        if ((this._ParentJobId != value))
1676        {
1677          if (this._Job1.HasLoadedOrAssignedValue)
1678          {
1679            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1680          }
1681          this.OnParentTaskIdChanging(value);
1682          this.SendPropertyChanging();
1683          this._ParentJobId = value;
1684          this.SendPropertyChanged("ParentTaskId");
1685          this.OnParentTaskIdChanged();
1686        }
1687      }
1688    }
1689   
1690    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
1691    public int Priority
1692    {
1693      get
1694      {
1695        return this._Priority;
1696      }
1697      set
1698      {
1699        if ((this._Priority != value))
1700        {
1701          this.OnPriorityChanging(value);
1702          this.SendPropertyChanging();
1703          this._Priority = value;
1704          this.SendPropertyChanged("Priority");
1705          this.OnPriorityChanged();
1706        }
1707      }
1708    }
1709   
1710    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresNeeded", DbType="Int NOT NULL")]
1711    public int CoresNeeded
1712    {
1713      get
1714      {
1715        return this._CoresNeeded;
1716      }
1717      set
1718      {
1719        if ((this._CoresNeeded != value))
1720        {
1721          this.OnCoresNeededChanging(value);
1722          this.SendPropertyChanging();
1723          this._CoresNeeded = value;
1724          this.SendPropertyChanged("CoresNeeded");
1725          this.OnCoresNeededChanged();
1726        }
1727      }
1728    }
1729   
1730    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
1731    public int MemoryNeeded
1732    {
1733      get
1734      {
1735        return this._MemoryNeeded;
1736      }
1737      set
1738      {
1739        if ((this._MemoryNeeded != value))
1740        {
1741          this.OnMemoryNeededChanging(value);
1742          this.SendPropertyChanging();
1743          this._MemoryNeeded = value;
1744          this.SendPropertyChanged("MemoryNeeded");
1745          this.OnMemoryNeededChanged();
1746        }
1747      }
1748    }
1749   
1750    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsParentJob", DbType="Bit")]
1751    public bool IsParentTask
1752    {
1753      get
1754      {
1755        return this._IsParentJob;
1756      }
1757      set
1758      {
1759        if ((this._IsParentJob != value))
1760        {
1761          this.OnIsParentTaskChanging(value);
1762          this.SendPropertyChanging();
1763          this._IsParentJob = value;
1764          this.SendPropertyChanged("IsParentTask");
1765          this.OnIsParentTaskChanged();
1766        }
1767      }
1768    }
1769   
1770    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FinishWhenChildJobsFinished", DbType="Bit")]
1771    public bool FinishWhenChildJobsFinished
1772    {
1773      get
1774      {
1775        return this._FinishWhenChildJobsFinished;
1776      }
1777      set
1778      {
1779        if ((this._FinishWhenChildJobsFinished != value))
1780        {
1781          this.OnFinishWhenChildJobsFinishedChanging(value);
1782          this.SendPropertyChanging();
1783          this._FinishWhenChildJobsFinished = value;
1784          this.SendPropertyChanged("FinishWhenChildJobsFinished");
1785          this.OnFinishWhenChildJobsFinishedChanged();
1786        }
1787      }
1788    }
1789   
1790    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Command", DbType="VarChar(30)", CanBeNull=true)]
1791    public global::HeuristicLab.Services.Hive.DataAccess.Command? Command
1792    {
1793      get
1794      {
1795        return this._Command;
1796      }
1797      set
1798      {
1799        if ((this._Command != value))
1800        {
1801          this.OnCommandChanging(value);
1802          this.SendPropertyChanging();
1803          this._Command = value;
1804          this.SendPropertyChanged("Command");
1805          this.OnCommandChanged();
1806        }
1807      }
1808    }
1809   
1810    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL")]
1811    public System.Guid JobId
1812    {
1813      get
1814      {
1815        return this._HiveExperimentId;
1816      }
1817      set
1818      {
1819        if ((this._HiveExperimentId != value))
1820        {
1821          if (this._HiveExperiment.HasLoadedOrAssignedValue)
1822          {
1823            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1824          }
1825          this.OnJobIdChanging(value);
1826          this.SendPropertyChanging();
1827          this._HiveExperimentId = value;
1828          this.SendPropertyChanged("JobId");
1829          this.OnJobIdChanged();
1830        }
1831      }
1832    }
1833   
1834    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPrivileged", DbType="Bit")]
1835    public bool IsPrivileged
1836    {
1837      get
1838      {
1839        return this._IsPrivileged;
1840      }
1841      set
1842      {
1843        if ((this._IsPrivileged != value))
1844        {
1845          this.OnIsPrivilegedChanging(value);
1846          this.SendPropertyChanging();
1847          this._IsPrivileged = value;
1848          this.SendPropertyChanged("IsPrivileged");
1849          this.OnIsPrivilegedChanged();
1850        }
1851      }
1852    }
1853   
1854    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedResource", Storage="_AssignedResources", ThisKey="TaskId", OtherKey="TaskId")]
1855    public EntitySet<AssignedResource> AssignedResources
1856    {
1857      get
1858      {
1859        return this._AssignedResources;
1860      }
1861      set
1862      {
1863        this._AssignedResources.Assign(value);
1864      }
1865    }
1866   
1867    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="TaskId", OtherKey="TaskId")]
1868    public EntitySet<RequiredPlugin> RequiredPlugins
1869    {
1870      get
1871      {
1872        return this._RequiredPlugins;
1873      }
1874      set
1875      {
1876        this._RequiredPlugins.Assign(value);
1877      }
1878    }
1879   
1880    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Jobs", ThisKey="TaskId", OtherKey="ParentTaskId")]
1881    public EntitySet<Task> ChildJobs
1882    {
1883      get
1884      {
1885        return this._Jobs;
1886      }
1887      set
1888      {
1889        this._Jobs.Assign(value);
1890      }
1891    }
1892   
1893    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_JobData", ThisKey="TaskId", OtherKey="TaskId", IsUnique=true, IsForeignKey=false)]
1894    public TaskData JobData
1895    {
1896      get
1897      {
1898        return this._JobData.Entity;
1899      }
1900      set
1901      {
1902        TaskData previousValue = this._JobData.Entity;
1903        if (((previousValue != value)
1904              || (this._JobData.HasLoadedOrAssignedValue == false)))
1905        {
1906          this.SendPropertyChanging();
1907          if ((previousValue != null))
1908          {
1909            this._JobData.Entity = null;
1910            previousValue.Task = null;
1911          }
1912          this._JobData.Entity = value;
1913          if ((value != null))
1914          {
1915            value.Task = this;
1916          }
1917          this.SendPropertyChanged("JobData");
1918        }
1919      }
1920    }
1921   
1922    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_StateLogs", ThisKey="TaskId", OtherKey="TaskId")]
1923    public EntitySet<StateLog> StateLogs
1924    {
1925      get
1926      {
1927        return this._StateLogs;
1928      }
1929      set
1930      {
1931        this._StateLogs.Assign(value);
1932      }
1933    }
1934   
1935    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Job1", ThisKey="ParentTaskId", OtherKey="TaskId", IsForeignKey=true)]
1936    public Task ParentJob
1937    {
1938      get
1939      {
1940        return this._Job1.Entity;
1941      }
1942      set
1943      {
1944        Task previousValue = this._Job1.Entity;
1945        if (((previousValue != value)
1946              || (this._Job1.HasLoadedOrAssignedValue == false)))
1947        {
1948          this.SendPropertyChanging();
1949          if ((previousValue != null))
1950          {
1951            this._Job1.Entity = null;
1952            previousValue.ChildJobs.Remove(this);
1953          }
1954          this._Job1.Entity = value;
1955          if ((value != null))
1956          {
1957            value.ChildJobs.Add(this);
1958            this._ParentJobId = value.TaskId;
1959          }
1960          else
1961          {
1962            this._ParentJobId = default(Nullable<System.Guid>);
1963          }
1964          this.SendPropertyChanged("ParentJob");
1965        }
1966      }
1967    }
1968   
1969    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
1970    public Job Job
1971    {
1972      get
1973      {
1974        return this._HiveExperiment.Entity;
1975      }
1976      set
1977      {
1978        Job previousValue = this._HiveExperiment.Entity;
1979        if (((previousValue != value)
1980              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
1981        {
1982          this.SendPropertyChanging();
1983          if ((previousValue != null))
1984          {
1985            this._HiveExperiment.Entity = null;
1986            previousValue.Tasks.Remove(this);
1987          }
1988          this._HiveExperiment.Entity = value;
1989          if ((value != null))
1990          {
1991            value.Tasks.Add(this);
1992            this._HiveExperimentId = value.JobId;
1993          }
1994          else
1995          {
1996            this._HiveExperimentId = default(System.Guid);
1997          }
1998          this.SendPropertyChanged("Job");
1999        }
2000      }
2001    }
2002   
2003    public event PropertyChangingEventHandler PropertyChanging;
2004   
2005    public event PropertyChangedEventHandler PropertyChanged;
2006   
2007    protected virtual void SendPropertyChanging()
2008    {
2009      if ((this.PropertyChanging != null))
2010      {
2011        this.PropertyChanging(this, emptyChangingEventArgs);
2012      }
2013    }
2014   
2015    protected virtual void SendPropertyChanged(String propertyName)
2016    {
2017      if ((this.PropertyChanged != null))
2018      {
2019        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2020      }
2021    }
2022   
2023    private void attach_AssignedResources(AssignedResource entity)
2024    {
2025      this.SendPropertyChanging();
2026      entity.Task = this;
2027    }
2028   
2029    private void detach_AssignedResources(AssignedResource entity)
2030    {
2031      this.SendPropertyChanging();
2032      entity.Task = null;
2033    }
2034   
2035    private void attach_RequiredPlugins(RequiredPlugin entity)
2036    {
2037      this.SendPropertyChanging();
2038      entity.Task = this;
2039    }
2040   
2041    private void detach_RequiredPlugins(RequiredPlugin entity)
2042    {
2043      this.SendPropertyChanging();
2044      entity.Task = null;
2045    }
2046   
2047    private void attach_Jobs(Task entity)
2048    {
2049      this.SendPropertyChanging();
2050      entity.ParentJob = this;
2051    }
2052   
2053    private void detach_Jobs(Task entity)
2054    {
2055      this.SendPropertyChanging();
2056      entity.ParentJob = null;
2057    }
2058   
2059    private void attach_StateLogs(StateLog entity)
2060    {
2061      this.SendPropertyChanging();
2062      entity.Task = this;
2063    }
2064   
2065    private void detach_StateLogs(StateLog entity)
2066    {
2067      this.SendPropertyChanging();
2068      entity.Task = null;
2069    }
2070  }
2071 
2072  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Downtime")]
2073  public partial class Downtime : INotifyPropertyChanging, INotifyPropertyChanged
2074  {
2075   
2076    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2077   
2078    private System.Guid _UptimeCalendarId;
2079   
2080    private System.Guid _ResourceId;
2081   
2082    private System.DateTime _StartDate;
2083   
2084    private System.DateTime _EndDate;
2085   
2086    private bool _AllDayEvent;
2087   
2088    private bool _Recurring;
2089   
2090    private System.Guid _RecurringId;
2091   
2092    private EntityRef<Resource> _Resource;
2093   
2094    #region Extensibility Method Definitions
2095    partial void OnLoaded();
2096    partial void OnValidate(System.Data.Linq.ChangeAction action);
2097    partial void OnCreated();
2098    partial void OnDowntimeIdChanging(System.Guid value);
2099    partial void OnDowntimeIdChanged();
2100    partial void OnResourceIdChanging(System.Guid value);
2101    partial void OnResourceIdChanged();
2102    partial void OnStartDateChanging(System.DateTime value);
2103    partial void OnStartDateChanged();
2104    partial void OnEndDateChanging(System.DateTime value);
2105    partial void OnEndDateChanged();
2106    partial void OnAllDayEventChanging(bool value);
2107    partial void OnAllDayEventChanged();
2108    partial void OnRecurringChanging(bool value);
2109    partial void OnRecurringChanged();
2110    partial void OnRecurringIdChanging(System.Guid value);
2111    partial void OnRecurringIdChanged();
2112    #endregion
2113   
2114    public Downtime()
2115    {
2116      this._Resource = default(EntityRef<Resource>);
2117      OnCreated();
2118    }
2119   
2120    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier", IsPrimaryKey=true, IsDbGenerated=true)]
2121    public System.Guid DowntimeId
2122    {
2123      get
2124      {
2125        return this._UptimeCalendarId;
2126      }
2127      set
2128      {
2129        if ((this._UptimeCalendarId != value))
2130        {
2131          this.OnDowntimeIdChanging(value);
2132          this.SendPropertyChanging();
2133          this._UptimeCalendarId = value;
2134          this.SendPropertyChanged("DowntimeId");
2135          this.OnDowntimeIdChanged();
2136        }
2137      }
2138    }
2139   
2140    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
2141    public System.Guid ResourceId
2142    {
2143      get
2144      {
2145        return this._ResourceId;
2146      }
2147      set
2148      {
2149        if ((this._ResourceId != value))
2150        {
2151          if (this._Resource.HasLoadedOrAssignedValue)
2152          {
2153            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2154          }
2155          this.OnResourceIdChanging(value);
2156          this.SendPropertyChanging();
2157          this._ResourceId = value;
2158          this.SendPropertyChanged("ResourceId");
2159          this.OnResourceIdChanged();
2160        }
2161      }
2162    }
2163   
2164    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")]
2165    public System.DateTime StartDate
2166    {
2167      get
2168      {
2169        return this._StartDate;
2170      }
2171      set
2172      {
2173        if ((this._StartDate != value))
2174        {
2175          this.OnStartDateChanging(value);
2176          this.SendPropertyChanging();
2177          this._StartDate = value;
2178          this.SendPropertyChanged("StartDate");
2179          this.OnStartDateChanged();
2180        }
2181      }
2182    }
2183   
2184    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")]
2185    public System.DateTime EndDate
2186    {
2187      get
2188      {
2189        return this._EndDate;
2190      }
2191      set
2192      {
2193        if ((this._EndDate != value))
2194        {
2195          this.OnEndDateChanging(value);
2196          this.SendPropertyChanging();
2197          this._EndDate = value;
2198          this.SendPropertyChanged("EndDate");
2199          this.OnEndDateChanged();
2200        }
2201      }
2202    }
2203   
2204    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AllDayEvent", DbType="Bit")]
2205    public bool AllDayEvent
2206    {
2207      get
2208      {
2209        return this._AllDayEvent;
2210      }
2211      set
2212      {
2213        if ((this._AllDayEvent != value))
2214        {
2215          this.OnAllDayEventChanging(value);
2216          this.SendPropertyChanging();
2217          this._AllDayEvent = value;
2218          this.SendPropertyChanged("AllDayEvent");
2219          this.OnAllDayEventChanged();
2220        }
2221      }
2222    }
2223   
2224    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Recurring", DbType="Bit")]
2225    public bool Recurring
2226    {
2227      get
2228      {
2229        return this._Recurring;
2230      }
2231      set
2232      {
2233        if ((this._Recurring != value))
2234        {
2235          this.OnRecurringChanging(value);
2236          this.SendPropertyChanging();
2237          this._Recurring = value;
2238          this.SendPropertyChanged("Recurring");
2239          this.OnRecurringChanged();
2240        }
2241      }
2242    }
2243   
2244    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecurringId", DbType="UniqueIdentifier")]
2245    public System.Guid RecurringId
2246    {
2247      get
2248      {
2249        return this._RecurringId;
2250      }
2251      set
2252      {
2253        if ((this._RecurringId != value))
2254        {
2255          this.OnRecurringIdChanging(value);
2256          this.SendPropertyChanging();
2257          this._RecurringId = value;
2258          this.SendPropertyChanged("RecurringId");
2259          this.OnRecurringIdChanged();
2260        }
2261      }
2262    }
2263   
2264    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
2265    public Resource Resource
2266    {
2267      get
2268      {
2269        return this._Resource.Entity;
2270      }
2271      set
2272      {
2273        Resource previousValue = this._Resource.Entity;
2274        if (((previousValue != value)
2275              || (this._Resource.HasLoadedOrAssignedValue == false)))
2276        {
2277          this.SendPropertyChanging();
2278          if ((previousValue != null))
2279          {
2280            this._Resource.Entity = null;
2281            previousValue.Downtimes.Remove(this);
2282          }
2283          this._Resource.Entity = value;
2284          if ((value != null))
2285          {
2286            value.Downtimes.Add(this);
2287            this._ResourceId = value.ResourceId;
2288          }
2289          else
2290          {
2291            this._ResourceId = default(System.Guid);
2292          }
2293          this.SendPropertyChanged("Resource");
2294        }
2295      }
2296    }
2297   
2298    public event PropertyChangingEventHandler PropertyChanging;
2299   
2300    public event PropertyChangedEventHandler PropertyChanged;
2301   
2302    protected virtual void SendPropertyChanging()
2303    {
2304      if ((this.PropertyChanging != null))
2305      {
2306        this.PropertyChanging(this, emptyChangingEventArgs);
2307      }
2308    }
2309   
2310    protected virtual void SendPropertyChanged(String propertyName)
2311    {
2312      if ((this.PropertyChanged != null))
2313      {
2314        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2315      }
2316    }
2317  }
2318 
2319  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Job")]
2320  public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
2321  {
2322   
2323    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2324   
2325    private System.Guid _HiveExperimentId;
2326   
2327    private string _Name;
2328   
2329    private string _Description;
2330   
2331    private string _ResourceIds;
2332   
2333    private System.Guid _UserId;
2334   
2335    private System.DateTime _DateCreated;
2336   
2337    private EntitySet<Task> _Jobs;
2338   
2339    private EntitySet<JobPermission> _HiveExperimentPermissions;
2340   
2341    #region Extensibility Method Definitions
2342    partial void OnLoaded();
2343    partial void OnValidate(System.Data.Linq.ChangeAction action);
2344    partial void OnCreated();
2345    partial void OnJobIdChanging(System.Guid value);
2346    partial void OnJobIdChanged();
2347    partial void OnNameChanging(string value);
2348    partial void OnNameChanged();
2349    partial void OnDescriptionChanging(string value);
2350    partial void OnDescriptionChanged();
2351    partial void OnResourceIdsChanging(string value);
2352    partial void OnResourceIdsChanged();
2353    partial void OnOwnerUserIdChanging(System.Guid value);
2354    partial void OnOwnerUserIdChanged();
2355    partial void OnDateCreatedChanging(System.DateTime value);
2356    partial void OnDateCreatedChanged();
2357    #endregion
2358   
2359    public Job()
2360    {
2361      this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs));
2362      this._HiveExperimentPermissions = new EntitySet<JobPermission>(new Action<JobPermission>(this.attach_HiveExperimentPermissions), new Action<JobPermission>(this.detach_HiveExperimentPermissions));
2363      OnCreated();
2364    }
2365   
2366    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2367    public System.Guid JobId
2368    {
2369      get
2370      {
2371        return this._HiveExperimentId;
2372      }
2373      set
2374      {
2375        if ((this._HiveExperimentId != value))
2376        {
2377          this.OnJobIdChanging(value);
2378          this.SendPropertyChanging();
2379          this._HiveExperimentId = value;
2380          this.SendPropertyChanged("JobId");
2381          this.OnJobIdChanged();
2382        }
2383      }
2384    }
2385   
2386    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
2387    public string Name
2388    {
2389      get
2390      {
2391        return this._Name;
2392      }
2393      set
2394      {
2395        if ((this._Name != value))
2396        {
2397          this.OnNameChanging(value);
2398          this.SendPropertyChanging();
2399          this._Name = value;
2400          this.SendPropertyChanged("Name");
2401          this.OnNameChanged();
2402        }
2403      }
2404    }
2405   
2406    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="VarChar(MAX)")]
2407    public string Description
2408    {
2409      get
2410      {
2411        return this._Description;
2412      }
2413      set
2414      {
2415        if ((this._Description != value))
2416        {
2417          this.OnDescriptionChanging(value);
2418          this.SendPropertyChanging();
2419          this._Description = value;
2420          this.SendPropertyChanged("Description");
2421          this.OnDescriptionChanged();
2422        }
2423      }
2424    }
2425   
2426    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceIds", DbType="VarChar(MAX)")]
2427    public string ResourceIds
2428    {
2429      get
2430      {
2431        return this._ResourceIds;
2432      }
2433      set
2434      {
2435        if ((this._ResourceIds != value))
2436        {
2437          this.OnResourceIdsChanging(value);
2438          this.SendPropertyChanging();
2439          this._ResourceIds = value;
2440          this.SendPropertyChanged("ResourceIds");
2441          this.OnResourceIdsChanged();
2442        }
2443      }
2444    }
2445   
2446    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
2447    public System.Guid OwnerUserId
2448    {
2449      get
2450      {
2451        return this._UserId;
2452      }
2453      set
2454      {
2455        if ((this._UserId != value))
2456        {
2457          this.OnOwnerUserIdChanging(value);
2458          this.SendPropertyChanging();
2459          this._UserId = value;
2460          this.SendPropertyChanged("OwnerUserId");
2461          this.OnOwnerUserIdChanged();
2462        }
2463      }
2464    }
2465   
2466    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
2467    public System.DateTime DateCreated
2468    {
2469      get
2470      {
2471        return this._DateCreated;
2472      }
2473      set
2474      {
2475        if ((this._DateCreated != value))
2476        {
2477          this.OnDateCreatedChanging(value);
2478          this.SendPropertyChanging();
2479          this._DateCreated = value;
2480          this.SendPropertyChanged("DateCreated");
2481          this.OnDateCreatedChanged();
2482        }
2483      }
2484    }
2485   
2486    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_Jobs", ThisKey="JobId", OtherKey="JobId")]
2487    public EntitySet<Task> Tasks
2488    {
2489      get
2490      {
2491        return this._Jobs;
2492      }
2493      set
2494      {
2495        this._Jobs.Assign(value);
2496      }
2497    }
2498   
2499    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperimentPermissions", ThisKey="JobId", OtherKey="JobId")]
2500    public EntitySet<JobPermission> JobPermissions
2501    {
2502      get
2503      {
2504        return this._HiveExperimentPermissions;
2505      }
2506      set
2507      {
2508        this._HiveExperimentPermissions.Assign(value);
2509      }
2510    }
2511   
2512    public event PropertyChangingEventHandler PropertyChanging;
2513   
2514    public event PropertyChangedEventHandler PropertyChanged;
2515   
2516    protected virtual void SendPropertyChanging()
2517    {
2518      if ((this.PropertyChanging != null))
2519      {
2520        this.PropertyChanging(this, emptyChangingEventArgs);
2521      }
2522    }
2523   
2524    protected virtual void SendPropertyChanged(String propertyName)
2525    {
2526      if ((this.PropertyChanged != null))
2527      {
2528        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2529      }
2530    }
2531   
2532    private void attach_Jobs(Task entity)
2533    {
2534      this.SendPropertyChanging();
2535      entity.Job = this;
2536    }
2537   
2538    private void detach_Jobs(Task entity)
2539    {
2540      this.SendPropertyChanging();
2541      entity.Job = null;
2542    }
2543   
2544    private void attach_HiveExperimentPermissions(JobPermission entity)
2545    {
2546      this.SendPropertyChanging();
2547      entity.Job = this;
2548    }
2549   
2550    private void detach_HiveExperimentPermissions(JobPermission entity)
2551    {
2552      this.SendPropertyChanging();
2553      entity.Job = null;
2554    }
2555  }
2556 
2557  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.TaskData")]
2558  public partial class TaskData : INotifyPropertyChanging, INotifyPropertyChanged
2559  {
2560   
2561    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2562   
2563    private System.Guid _JobId;
2564   
2565    private System.Data.Linq.Binary _Data;
2566   
2567    private System.DateTime _LastUpdate;
2568   
2569    private EntityRef<Task> _Job;
2570   
2571    #region Extensibility Method Definitions
2572    partial void OnLoaded();
2573    partial void OnValidate(System.Data.Linq.ChangeAction action);
2574    partial void OnCreated();
2575    partial void OnTaskIdChanging(System.Guid value);
2576    partial void OnTaskIdChanged();
2577    partial void OnDataChanging(System.Data.Linq.Binary value);
2578    partial void OnDataChanged();
2579    partial void OnLastUpdateChanging(System.DateTime value);
2580    partial void OnLastUpdateChanged();
2581    #endregion
2582   
2583    public TaskData()
2584    {
2585      this._Job = default(EntityRef<Task>);
2586      OnCreated();
2587    }
2588   
2589    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
2590    public System.Guid TaskId
2591    {
2592      get
2593      {
2594        return this._JobId;
2595      }
2596      set
2597      {
2598        if ((this._JobId != value))
2599        {
2600          if (this._Job.HasLoadedOrAssignedValue)
2601          {
2602            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2603          }
2604          this.OnTaskIdChanging(value);
2605          this.SendPropertyChanging();
2606          this._JobId = value;
2607          this.SendPropertyChanged("TaskId");
2608          this.OnTaskIdChanged();
2609        }
2610      }
2611    }
2612   
2613    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2614    public System.Data.Linq.Binary Data
2615    {
2616      get
2617      {
2618        return this._Data;
2619      }
2620      set
2621      {
2622        if ((this._Data != value))
2623        {
2624          this.OnDataChanging(value);
2625          this.SendPropertyChanging();
2626          this._Data = value;
2627          this.SendPropertyChanged("Data");
2628          this.OnDataChanged();
2629        }
2630      }
2631    }
2632   
2633    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastUpdate", DbType="DateTime")]
2634    public System.DateTime LastUpdate
2635    {
2636      get
2637      {
2638        return this._LastUpdate;
2639      }
2640      set
2641      {
2642        if ((this._LastUpdate != value))
2643        {
2644          this.OnLastUpdateChanging(value);
2645          this.SendPropertyChanging();
2646          this._LastUpdate = value;
2647          this.SendPropertyChanged("LastUpdate");
2648          this.OnLastUpdateChanged();
2649        }
2650      }
2651    }
2652   
2653    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
2654    public Task Task
2655    {
2656      get
2657      {
2658        return this._Job.Entity;
2659      }
2660      set
2661      {
2662        Task previousValue = this._Job.Entity;
2663        if (((previousValue != value)
2664              || (this._Job.HasLoadedOrAssignedValue == false)))
2665        {
2666          this.SendPropertyChanging();
2667          if ((previousValue != null))
2668          {
2669            this._Job.Entity = null;
2670            previousValue.JobData = null;
2671          }
2672          this._Job.Entity = value;
2673          if ((value != null))
2674          {
2675            value.JobData = this;
2676            this._JobId = value.TaskId;
2677          }
2678          else
2679          {
2680            this._JobId = default(System.Guid);
2681          }
2682          this.SendPropertyChanged("Task");
2683        }
2684      }
2685    }
2686   
2687    public event PropertyChangingEventHandler PropertyChanging;
2688   
2689    public event PropertyChangedEventHandler PropertyChanged;
2690   
2691    protected virtual void SendPropertyChanging()
2692    {
2693      if ((this.PropertyChanging != null))
2694      {
2695        this.PropertyChanging(this, emptyChangingEventArgs);
2696      }
2697    }
2698   
2699    protected virtual void SendPropertyChanged(String propertyName)
2700    {
2701      if ((this.PropertyChanged != null))
2702      {
2703        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2704      }
2705    }
2706  }
2707 
2708  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginData")]
2709  public partial class PluginData : INotifyPropertyChanging, INotifyPropertyChanged
2710  {
2711   
2712    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2713   
2714    private System.Guid _PluginDataId;
2715   
2716    private System.Guid _PluginId;
2717   
2718    private System.Data.Linq.Binary _Data;
2719   
2720    private string _FileName;
2721   
2722    private EntityRef<Plugin> _Plugin;
2723   
2724    #region Extensibility Method Definitions
2725    partial void OnLoaded();
2726    partial void OnValidate(System.Data.Linq.ChangeAction action);
2727    partial void OnCreated();
2728    partial void OnPluginDataIdChanging(System.Guid value);
2729    partial void OnPluginDataIdChanged();
2730    partial void OnPluginIdChanging(System.Guid value);
2731    partial void OnPluginIdChanged();
2732    partial void OnDataChanging(System.Data.Linq.Binary value);
2733    partial void OnDataChanged();
2734    partial void OnFileNameChanging(string value);
2735    partial void OnFileNameChanged();
2736    #endregion
2737   
2738    public PluginData()
2739    {
2740      this._Plugin = default(EntityRef<Plugin>);
2741      OnCreated();
2742    }
2743   
2744    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginDataId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2745    public System.Guid PluginDataId
2746    {
2747      get
2748      {
2749        return this._PluginDataId;
2750      }
2751      set
2752      {
2753        if ((this._PluginDataId != value))
2754        {
2755          this.OnPluginDataIdChanging(value);
2756          this.SendPropertyChanging();
2757          this._PluginDataId = value;
2758          this.SendPropertyChanged("PluginDataId");
2759          this.OnPluginDataIdChanged();
2760        }
2761      }
2762    }
2763   
2764    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
2765    public System.Guid PluginId
2766    {
2767      get
2768      {
2769        return this._PluginId;
2770      }
2771      set
2772      {
2773        if ((this._PluginId != value))
2774        {
2775          if (this._Plugin.HasLoadedOrAssignedValue)
2776          {
2777            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2778          }
2779          this.OnPluginIdChanging(value);
2780          this.SendPropertyChanging();
2781          this._PluginId = value;
2782          this.SendPropertyChanged("PluginId");
2783          this.OnPluginIdChanged();
2784        }
2785      }
2786    }
2787   
2788    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2789    public System.Data.Linq.Binary Data
2790    {
2791      get
2792      {
2793        return this._Data;
2794      }
2795      set
2796      {
2797        if ((this._Data != value))
2798        {
2799          this.OnDataChanging(value);
2800          this.SendPropertyChanging();
2801          this._Data = value;
2802          this.SendPropertyChanged("Data");
2803          this.OnDataChanged();
2804        }
2805      }
2806    }
2807   
2808    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="VarChar(MAX)", CanBeNull=false)]
2809    public string FileName
2810    {
2811      get
2812      {
2813        return this._FileName;
2814      }
2815      set
2816      {
2817        if ((this._FileName != value))
2818        {
2819          this.OnFileNameChanging(value);
2820          this.SendPropertyChanging();
2821          this._FileName = value;
2822          this.SendPropertyChanged("FileName");
2823          this.OnFileNameChanged();
2824        }
2825      }
2826    }
2827   
2828    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_Plugin", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true)]
2829    public Plugin Plugin
2830    {
2831      get
2832      {
2833        return this._Plugin.Entity;
2834      }
2835      set
2836      {
2837        Plugin previousValue = this._Plugin.Entity;
2838        if (((previousValue != value)
2839              || (this._Plugin.HasLoadedOrAssignedValue == false)))
2840        {
2841          this.SendPropertyChanging();
2842          if ((previousValue != null))
2843          {
2844            this._Plugin.Entity = null;
2845            previousValue.PluginData.Remove(this);
2846          }
2847          this._Plugin.Entity = value;
2848          if ((value != null))
2849          {
2850            value.PluginData.Add(this);
2851            this._PluginId = value.PluginId;
2852          }
2853          else
2854          {
2855            this._PluginId = default(System.Guid);
2856          }
2857          this.SendPropertyChanged("Plugin");
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.StateLog")]
2884  public partial class StateLog : INotifyPropertyChanging, INotifyPropertyChanged
2885  {
2886   
2887    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2888   
2889    private System.Guid _StateLogId;
2890   
2891    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
2892   
2893    private System.DateTime _DateTime;
2894   
2895    private System.Guid _JobId;
2896   
2897    private System.Nullable<System.Guid> _UserId;
2898   
2899    private System.Nullable<System.Guid> _SlaveId;
2900   
2901    private string _Exception;
2902   
2903    private EntityRef<Task> _Job;
2904   
2905    private EntityRef<Resource> _Resource;
2906   
2907    #region Extensibility Method Definitions
2908    partial void OnLoaded();
2909    partial void OnValidate(System.Data.Linq.ChangeAction action);
2910    partial void OnCreated();
2911    partial void OnStateLogIdChanging(System.Guid value);
2912    partial void OnStateLogIdChanged();
2913    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
2914    partial void OnStateChanged();
2915    partial void OnDateTimeChanging(System.DateTime value);
2916    partial void OnDateTimeChanged();
2917    partial void OnTaskIdChanging(System.Guid value);
2918    partial void OnTaskIdChanged();
2919    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
2920    partial void OnUserIdChanged();
2921    partial void OnSlaveIdChanging(System.Nullable<System.Guid> value);
2922    partial void OnSlaveIdChanged();
2923    partial void OnExceptionChanging(string value);
2924    partial void OnExceptionChanged();
2925    #endregion
2926   
2927    public StateLog()
2928    {
2929      this._Job = default(EntityRef<Task>);
2930      this._Resource = default(EntityRef<Resource>);
2931      OnCreated();
2932    }
2933   
2934    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StateLogId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2935    public System.Guid StateLogId
2936    {
2937      get
2938      {
2939        return this._StateLogId;
2940      }
2941      set
2942      {
2943        if ((this._StateLogId != value))
2944        {
2945          this.OnStateLogIdChanging(value);
2946          this.SendPropertyChanging();
2947          this._StateLogId = value;
2948          this.SendPropertyChanged("StateLogId");
2949          this.OnStateLogIdChanged();
2950        }
2951      }
2952    }
2953   
2954    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
2955    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
2956    {
2957      get
2958      {
2959        return this._State;
2960      }
2961      set
2962      {
2963        if ((this._State != value))
2964        {
2965          this.OnStateChanging(value);
2966          this.SendPropertyChanging();
2967          this._State = value;
2968          this.SendPropertyChanged("State");
2969          this.OnStateChanged();
2970        }
2971      }
2972    }
2973   
2974    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateTime", DbType="DateTime NOT NULL")]
2975    public System.DateTime DateTime
2976    {
2977      get
2978      {
2979        return this._DateTime;
2980      }
2981      set
2982      {
2983        if ((this._DateTime != value))
2984        {
2985          this.OnDateTimeChanging(value);
2986          this.SendPropertyChanging();
2987          this._DateTime = value;
2988          this.SendPropertyChanged("DateTime");
2989          this.OnDateTimeChanged();
2990        }
2991      }
2992    }
2993   
2994    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
2995    public System.Guid TaskId
2996    {
2997      get
2998      {
2999        return this._JobId;
3000      }
3001      set
3002      {
3003        if ((this._JobId != value))
3004        {
3005          if (this._Job.HasLoadedOrAssignedValue)
3006          {
3007            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3008          }
3009          this.OnTaskIdChanging(value);
3010          this.SendPropertyChanging();
3011          this._JobId = value;
3012          this.SendPropertyChanged("TaskId");
3013          this.OnTaskIdChanged();
3014        }
3015      }
3016    }
3017   
3018    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
3019    public System.Nullable<System.Guid> UserId
3020    {
3021      get
3022      {
3023        return this._UserId;
3024      }
3025      set
3026      {
3027        if ((this._UserId != value))
3028        {
3029          this.OnUserIdChanging(value);
3030          this.SendPropertyChanging();
3031          this._UserId = value;
3032          this.SendPropertyChanged("UserId");
3033          this.OnUserIdChanged();
3034        }
3035      }
3036    }
3037   
3038    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier")]
3039    public System.Nullable<System.Guid> SlaveId
3040    {
3041      get
3042      {
3043        return this._SlaveId;
3044      }
3045      set
3046      {
3047        if ((this._SlaveId != value))
3048        {
3049          if (this._Resource.HasLoadedOrAssignedValue)
3050          {
3051            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3052          }
3053          this.OnSlaveIdChanging(value);
3054          this.SendPropertyChanging();
3055          this._SlaveId = value;
3056          this.SendPropertyChanged("SlaveId");
3057          this.OnSlaveIdChanged();
3058        }
3059      }
3060    }
3061   
3062    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)", CanBeNull=false)]
3063    public string Exception
3064    {
3065      get
3066      {
3067        return this._Exception;
3068      }
3069      set
3070      {
3071        if ((this._Exception != value))
3072        {
3073          this.OnExceptionChanging(value);
3074          this.SendPropertyChanging();
3075          this._Exception = value;
3076          this.SendPropertyChanged("Exception");
3077          this.OnExceptionChanged();
3078        }
3079      }
3080    }
3081   
3082    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
3083    public Task Task
3084    {
3085      get
3086      {
3087        return this._Job.Entity;
3088      }
3089      set
3090      {
3091        Task previousValue = this._Job.Entity;
3092        if (((previousValue != value)
3093              || (this._Job.HasLoadedOrAssignedValue == false)))
3094        {
3095          this.SendPropertyChanging();
3096          if ((previousValue != null))
3097          {
3098            this._Job.Entity = null;
3099            previousValue.StateLogs.Remove(this);
3100          }
3101          this._Job.Entity = value;
3102          if ((value != null))
3103          {
3104            value.StateLogs.Add(this);
3105            this._JobId = value.TaskId;
3106          }
3107          else
3108          {
3109            this._JobId = default(System.Guid);
3110          }
3111          this.SendPropertyChanged("Task");
3112        }
3113      }
3114    }
3115   
3116    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_Resource", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true)]
3117    public Resource Resource
3118    {
3119      get
3120      {
3121        return this._Resource.Entity;
3122      }
3123      set
3124      {
3125        Resource previousValue = this._Resource.Entity;
3126        if (((previousValue != value)
3127              || (this._Resource.HasLoadedOrAssignedValue == false)))
3128        {
3129          this.SendPropertyChanging();
3130          if ((previousValue != null))
3131          {
3132            this._Resource.Entity = null;
3133            previousValue.StateLogs.Remove(this);
3134          }
3135          this._Resource.Entity = value;
3136          if ((value != null))
3137          {
3138            value.StateLogs.Add(this);
3139            this._SlaveId = value.ResourceId;
3140          }
3141          else
3142          {
3143            this._SlaveId = default(Nullable<System.Guid>);
3144          }
3145          this.SendPropertyChanged("Resource");
3146        }
3147      }
3148    }
3149   
3150    public event PropertyChangingEventHandler PropertyChanging;
3151   
3152    public event PropertyChangedEventHandler PropertyChanged;
3153   
3154    protected virtual void SendPropertyChanging()
3155    {
3156      if ((this.PropertyChanging != null))
3157      {
3158        this.PropertyChanging(this, emptyChangingEventArgs);
3159      }
3160    }
3161   
3162    protected virtual void SendPropertyChanged(String propertyName)
3163    {
3164      if ((this.PropertyChanged != null))
3165      {
3166        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3167      }
3168    }
3169  }
3170 
3171  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JobPermission")]
3172  public partial class JobPermission : INotifyPropertyChanging, INotifyPropertyChanged
3173  {
3174   
3175    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3176   
3177    private System.Guid _HiveExperimentId;
3178   
3179    private System.Guid _GrantedUserId;
3180   
3181    private System.Guid _GrantedByUserId;
3182   
3183    private global::HeuristicLab.Services.Hive.DataAccess.Permission _Permission;
3184   
3185    private EntityRef<Job> _HiveExperiment;
3186   
3187    #region Extensibility Method Definitions
3188    partial void OnLoaded();
3189    partial void OnValidate(System.Data.Linq.ChangeAction action);
3190    partial void OnCreated();
3191    partial void OnJobIdChanging(System.Guid value);
3192    partial void OnJobIdChanged();
3193    partial void OnGrantedUserIdChanging(System.Guid value);
3194    partial void OnGrantedUserIdChanged();
3195    partial void OnGrantedByUserIdChanging(System.Guid value);
3196    partial void OnGrantedByUserIdChanged();
3197    partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.DataAccess.Permission value);
3198    partial void OnPermissionChanged();
3199    #endregion
3200   
3201    public JobPermission()
3202    {
3203      this._HiveExperiment = default(EntityRef<Job>);
3204      OnCreated();
3205    }
3206   
3207    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3208    public System.Guid JobId
3209    {
3210      get
3211      {
3212        return this._HiveExperimentId;
3213      }
3214      set
3215      {
3216        if ((this._HiveExperimentId != value))
3217        {
3218          if (this._HiveExperiment.HasLoadedOrAssignedValue)
3219          {
3220            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3221          }
3222          this.OnJobIdChanging(value);
3223          this.SendPropertyChanging();
3224          this._HiveExperimentId = value;
3225          this.SendPropertyChanged("JobId");
3226          this.OnJobIdChanged();
3227        }
3228      }
3229    }
3230   
3231    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3232    public System.Guid GrantedUserId
3233    {
3234      get
3235      {
3236        return this._GrantedUserId;
3237      }
3238      set
3239      {
3240        if ((this._GrantedUserId != value))
3241        {
3242          this.OnGrantedUserIdChanging(value);
3243          this.SendPropertyChanging();
3244          this._GrantedUserId = value;
3245          this.SendPropertyChanged("GrantedUserId");
3246          this.OnGrantedUserIdChanged();
3247        }
3248      }
3249    }
3250   
3251    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
3252    public System.Guid GrantedByUserId
3253    {
3254      get
3255      {
3256        return this._GrantedByUserId;
3257      }
3258      set
3259      {
3260        if ((this._GrantedByUserId != value))
3261        {
3262          this.OnGrantedByUserIdChanging(value);
3263          this.SendPropertyChanging();
3264          this._GrantedByUserId = value;
3265          this.SendPropertyChanged("GrantedByUserId");
3266          this.OnGrantedByUserIdChanged();
3267        }
3268      }
3269    }
3270   
3271    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)]
3272    public global::HeuristicLab.Services.Hive.DataAccess.Permission Permission
3273    {
3274      get
3275      {
3276        return this._Permission;
3277      }
3278      set
3279      {
3280        if ((this._Permission != value))
3281        {
3282          this.OnPermissionChanging(value);
3283          this.SendPropertyChanging();
3284          this._Permission = value;
3285          this.SendPropertyChanged("Permission");
3286          this.OnPermissionChanged();
3287        }
3288      }
3289    }
3290   
3291    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
3292    public Job Job
3293    {
3294      get
3295      {
3296        return this._HiveExperiment.Entity;
3297      }
3298      set
3299      {
3300        Job previousValue = this._HiveExperiment.Entity;
3301        if (((previousValue != value)
3302              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
3303        {
3304          this.SendPropertyChanging();
3305          if ((previousValue != null))
3306          {
3307            this._HiveExperiment.Entity = null;
3308            previousValue.JobPermissions.Remove(this);
3309          }
3310          this._HiveExperiment.Entity = value;
3311          if ((value != null))
3312          {
3313            value.JobPermissions.Add(this);
3314            this._HiveExperimentId = value.JobId;
3315          }
3316          else
3317          {
3318            this._HiveExperimentId = default(System.Guid);
3319          }
3320          this.SendPropertyChanged("Job");
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="")]
3347  public partial class Lifecycle : INotifyPropertyChanging, INotifyPropertyChanged
3348  {
3349   
3350    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3351   
3352    private int _LifecycleId;
3353   
3354    private System.DateTime _LastCleanup;
3355   
3356    #region Extensibility Method Definitions
3357    partial void OnLoaded();
3358    partial void OnValidate(System.Data.Linq.ChangeAction action);
3359    partial void OnCreated();
3360    partial void OnLifecycleIdChanging(int value);
3361    partial void OnLifecycleIdChanged();
3362    partial void OnLastCleanupChanging(System.DateTime value);
3363    partial void OnLastCleanupChanged();
3364    #endregion
3365   
3366    public Lifecycle()
3367    {
3368      OnCreated();
3369    }
3370   
3371    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LifecycleId", DbType="Int", IsPrimaryKey=true)]
3372    public int LifecycleId
3373    {
3374      get
3375      {
3376        return this._LifecycleId;
3377      }
3378      set
3379      {
3380        if ((this._LifecycleId != value))
3381        {
3382          this.OnLifecycleIdChanging(value);
3383          this.SendPropertyChanging();
3384          this._LifecycleId = value;
3385          this.SendPropertyChanged("LifecycleId");
3386          this.OnLifecycleIdChanged();
3387        }
3388      }
3389    }
3390   
3391    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastCleanup", DbType="DateTime")]
3392    public System.DateTime LastCleanup
3393    {
3394      get
3395      {
3396        return this._LastCleanup;
3397      }
3398      set
3399      {
3400        if ((this._LastCleanup != value))
3401        {
3402          this.OnLastCleanupChanging(value);
3403          this.SendPropertyChanging();
3404          this._LastCleanup = value;
3405          this.SendPropertyChanged("LastCleanup");
3406          this.OnLastCleanupChanged();
3407        }
3408      }
3409    }
3410   
3411    public event PropertyChangingEventHandler PropertyChanging;
3412   
3413    public event PropertyChangedEventHandler PropertyChanged;
3414   
3415    protected virtual void SendPropertyChanging()
3416    {
3417      if ((this.PropertyChanging != null))
3418      {
3419        this.PropertyChanging(this, emptyChangingEventArgs);
3420      }
3421    }
3422   
3423    protected virtual void SendPropertyChanged(String propertyName)
3424    {
3425      if ((this.PropertyChanged != null))
3426      {
3427        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3428      }
3429    }
3430  }
3431 
3432  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3433  public partial class DeletedJobStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3434  {
3435   
3436    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3437   
3438    private System.Guid _UserId;
3439   
3440    private double _ExecutionTime;
3441   
3442    private double _ExecutionTimeFinishedJobs;
3443   
3444    private double _StartToEndTime;
3445   
3446    private System.Guid _DeletedJobStatisticsId;
3447   
3448    #region Extensibility Method Definitions
3449    partial void OnLoaded();
3450    partial void OnValidate(System.Data.Linq.ChangeAction action);
3451    partial void OnCreated();
3452    partial void OnUserIdChanging(System.Guid value);
3453    partial void OnUserIdChanged();
3454    partial void OnExecutionTimeSChanging(double value);
3455    partial void OnExecutionTimeSChanged();
3456    partial void OnExecutionTimeSFinishedJobsChanging(double value);
3457    partial void OnExecutionTimeSFinishedJobsChanged();
3458    partial void OnStartToEndTimeSChanging(double value);
3459    partial void OnStartToEndTimeSChanged();
3460    partial void OnDeletedJobStatisticsIdChanging(System.Guid value);
3461    partial void OnDeletedJobStatisticsIdChanged();
3462    #endregion
3463   
3464    public DeletedJobStatistics()
3465    {
3466      OnCreated();
3467    }
3468   
3469    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
3470    public System.Guid UserId
3471    {
3472      get
3473      {
3474        return this._UserId;
3475      }
3476      set
3477      {
3478        if ((this._UserId != value))
3479        {
3480          this.OnUserIdChanging(value);
3481          this.SendPropertyChanging();
3482          this._UserId = value;
3483          this.SendPropertyChanged("UserId");
3484          this.OnUserIdChanged();
3485        }
3486      }
3487    }
3488   
3489    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
3490    public double ExecutionTimeS
3491    {
3492      get
3493      {
3494        return this._ExecutionTime;
3495      }
3496      set
3497      {
3498        if ((this._ExecutionTime != value))
3499        {
3500          this.OnExecutionTimeSChanging(value);
3501          this.SendPropertyChanging();
3502          this._ExecutionTime = value;
3503          this.SendPropertyChanged("ExecutionTimeS");
3504          this.OnExecutionTimeSChanged();
3505        }
3506      }
3507    }
3508   
3509    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
3510    public double ExecutionTimeSFinishedJobs
3511    {
3512      get
3513      {
3514        return this._ExecutionTimeFinishedJobs;
3515      }
3516      set
3517      {
3518        if ((this._ExecutionTimeFinishedJobs != value))
3519        {
3520          this.OnExecutionTimeSFinishedJobsChanging(value);
3521          this.SendPropertyChanging();
3522          this._ExecutionTimeFinishedJobs = value;
3523          this.SendPropertyChanged("ExecutionTimeSFinishedJobs");
3524          this.OnExecutionTimeSFinishedJobsChanged();
3525        }
3526      }
3527    }
3528   
3529    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
3530    public double StartToEndTimeS
3531    {
3532      get
3533      {
3534        return this._StartToEndTime;
3535      }
3536      set
3537      {
3538        if ((this._StartToEndTime != value))
3539        {
3540          this.OnStartToEndTimeSChanging(value);
3541          this.SendPropertyChanging();
3542          this._StartToEndTime = value;
3543          this.SendPropertyChanged("StartToEndTimeS");
3544          this.OnStartToEndTimeSChanged();
3545        }
3546      }
3547    }
3548   
3549    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeletedJobStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
3550    public System.Guid DeletedJobStatisticsId
3551    {
3552      get
3553      {
3554        return this._DeletedJobStatisticsId;
3555      }
3556      set
3557      {
3558        if ((this._DeletedJobStatisticsId != value))
3559        {
3560          this.OnDeletedJobStatisticsIdChanging(value);
3561          this.SendPropertyChanging();
3562          this._DeletedJobStatisticsId = value;
3563          this.SendPropertyChanged("DeletedJobStatisticsId");
3564          this.OnDeletedJobStatisticsIdChanged();
3565        }
3566      }
3567    }
3568   
3569    public event PropertyChangingEventHandler PropertyChanging;
3570   
3571    public event PropertyChangedEventHandler PropertyChanged;
3572   
3573    protected virtual void SendPropertyChanging()
3574    {
3575      if ((this.PropertyChanging != null))
3576      {
3577        this.PropertyChanging(this, emptyChangingEventArgs);
3578      }
3579    }
3580   
3581    protected virtual void SendPropertyChanged(String propertyName)
3582    {
3583      if ((this.PropertyChanged != null))
3584      {
3585        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3586      }
3587    }
3588  }
3589 
3590  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3591  public partial class UserStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3592  {
3593   
3594    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3595   
3596    private System.Guid _StatisticsId;
3597   
3598    private System.Guid _UserId;
3599   
3600    private double _ExecutionTime;
3601   
3602    private int _CoresUsed;
3603   
3604    private double _ExecutionTimeFinishedJobs;
3605   
3606    private double _StartToEndTime;
3607   
3608    private EntityRef<Statistics> _Statistics;
3609   
3610    #region Extensibility Method Definitions
3611    partial void OnLoaded();
3612    partial void OnValidate(System.Data.Linq.ChangeAction action);
3613    partial void OnCreated();
3614    partial void OnStatisticsIdChanging(System.Guid value);
3615    partial void OnStatisticsIdChanged();
3616    partial void OnUserIdChanging(System.Guid value);
3617    partial void OnUserIdChanged();
3618    partial void OnExecutionTimeMsChanging(double value);
3619    partial void OnExecutionTimeMsChanged();
3620    partial void OnUsedCoresChanging(int value);
3621    partial void OnUsedCoresChanged();
3622    partial void OnExecutionTimeMsFinishedJobsChanging(double value);
3623    partial void OnExecutionTimeMsFinishedJobsChanged();
3624    partial void OnStartToEndTimeMsChanging(double value);
3625    partial void OnStartToEndTimeMsChanged();
3626    #endregion
3627   
3628    public UserStatistics()
3629    {
3630      this._Statistics = default(EntityRef<Statistics>);
3631      OnCreated();
3632    }
3633   
3634    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3635    public System.Guid StatisticsId
3636    {
3637      get
3638      {
3639        return this._StatisticsId;
3640      }
3641      set
3642      {
3643        if ((this._StatisticsId != value))
3644        {
3645          if (this._Statistics.HasLoadedOrAssignedValue)
3646          {
3647            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3648          }
3649          this.OnStatisticsIdChanging(value);
3650          this.SendPropertyChanging();
3651          this._StatisticsId = value;
3652          this.SendPropertyChanged("StatisticsId");
3653          this.OnStatisticsIdChanged();
3654        }
3655      }
3656    }
3657   
3658    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3659    public System.Guid UserId
3660    {
3661      get
3662      {
3663        return this._UserId;
3664      }
3665      set
3666      {
3667        if ((this._UserId != value))
3668        {
3669          this.OnUserIdChanging(value);
3670          this.SendPropertyChanging();
3671          this._UserId = value;
3672          this.SendPropertyChanged("UserId");
3673          this.OnUserIdChanged();
3674        }
3675      }
3676    }
3677   
3678    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
3679    public double ExecutionTimeMs
3680    {
3681      get
3682      {
3683        return this._ExecutionTime;
3684      }
3685      set
3686      {
3687        if ((this._ExecutionTime != value))
3688        {
3689          this.OnExecutionTimeMsChanging(value);
3690          this.SendPropertyChanging();
3691          this._ExecutionTime = value;
3692          this.SendPropertyChanged("ExecutionTimeMs");
3693          this.OnExecutionTimeMsChanged();
3694        }
3695      }
3696    }
3697   
3698    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresUsed", DbType="Int NOT NULL")]
3699    public int UsedCores
3700    {
3701      get
3702      {
3703        return this._CoresUsed;
3704      }
3705      set
3706      {
3707        if ((this._CoresUsed != value))
3708        {
3709          this.OnUsedCoresChanging(value);
3710          this.SendPropertyChanging();
3711          this._CoresUsed = value;
3712          this.SendPropertyChanged("UsedCores");
3713          this.OnUsedCoresChanged();
3714        }
3715      }
3716    }
3717   
3718    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
3719    public double ExecutionTimeMsFinishedJobs
3720    {
3721      get
3722      {
3723        return this._ExecutionTimeFinishedJobs;
3724      }
3725      set
3726      {
3727        if ((this._ExecutionTimeFinishedJobs != value))
3728        {
3729          this.OnExecutionTimeMsFinishedJobsChanging(value);
3730          this.SendPropertyChanging();
3731          this._ExecutionTimeFinishedJobs = value;
3732          this.SendPropertyChanged("ExecutionTimeMsFinishedJobs");
3733          this.OnExecutionTimeMsFinishedJobsChanged();
3734        }
3735      }
3736    }
3737   
3738    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
3739    public double StartToEndTimeMs
3740    {
3741      get
3742      {
3743        return this._StartToEndTime;
3744      }
3745      set
3746      {
3747        if ((this._StartToEndTime != value))
3748        {
3749          this.OnStartToEndTimeMsChanging(value);
3750          this.SendPropertyChanging();
3751          this._StartToEndTime = value;
3752          this.SendPropertyChanged("StartToEndTimeMs");
3753          this.OnStartToEndTimeMsChanged();
3754        }
3755      }
3756    }
3757   
3758    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_UserStatistics", Storage="_Statistics", ThisKey="StatisticsId", OtherKey="StatisticsId", IsForeignKey=true)]
3759    public Statistics Statistics
3760    {
3761      get
3762      {
3763        return this._Statistics.Entity;
3764      }
3765      set
3766      {
3767        Statistics previousValue = this._Statistics.Entity;
3768        if (((previousValue != value)
3769              || (this._Statistics.HasLoadedOrAssignedValue == false)))
3770        {
3771          this.SendPropertyChanging();
3772          if ((previousValue != null))
3773          {
3774            this._Statistics.Entity = null;
3775            previousValue.UserStatistics.Remove(this);
3776          }
3777          this._Statistics.Entity = value;
3778          if ((value != null))
3779          {
3780            value.UserStatistics.Add(this);
3781            this._StatisticsId = value.StatisticsId;
3782          }
3783          else
3784          {
3785            this._StatisticsId = default(System.Guid);
3786          }
3787          this.SendPropertyChanged("Statistics");
3788        }
3789      }
3790    }
3791   
3792    public event PropertyChangingEventHandler PropertyChanging;
3793   
3794    public event PropertyChangedEventHandler PropertyChanged;
3795   
3796    protected virtual void SendPropertyChanging()
3797    {
3798      if ((this.PropertyChanging != null))
3799      {
3800        this.PropertyChanging(this, emptyChangingEventArgs);
3801      }
3802    }
3803   
3804    protected virtual void SendPropertyChanged(String propertyName)
3805    {
3806      if ((this.PropertyChanged != null))
3807      {
3808        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3809      }
3810    }
3811  }
3812 
3813  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3814  public partial class SlaveStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3815  {
3816   
3817    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3818   
3819    private System.Guid _StatisticsId;
3820   
3821    private System.Guid _SlaveId;
3822   
3823    private int _Cores;
3824   
3825    private int _FreeCores;
3826   
3827    private double _CpuUtilization;
3828   
3829    private int _Memory;
3830   
3831    private int _FreeMemory;
3832   
3833    private EntityRef<Statistics> _Statistics;
3834   
3835    #region Extensibility Method Definitions
3836    partial void OnLoaded();
3837    partial void OnValidate(System.Data.Linq.ChangeAction action);
3838    partial void OnCreated();
3839    partial void OnStatisticsIdChanging(System.Guid value);
3840    partial void OnStatisticsIdChanged();
3841    partial void OnSlaveIdChanging(System.Guid value);
3842    partial void OnSlaveIdChanged();
3843    partial void OnCoresChanging(int value);
3844    partial void OnCoresChanged();
3845    partial void OnFreeCoresChanging(int value);
3846    partial void OnFreeCoresChanged();
3847    partial void OnCpuUtilizationChanging(double value);
3848    partial void OnCpuUtilizationChanged();
3849    partial void OnMemoryChanging(int value);
3850    partial void OnMemoryChanged();
3851    partial void OnFreeMemoryChanging(int value);
3852    partial void OnFreeMemoryChanged();
3853    #endregion
3854   
3855    public SlaveStatistics()
3856    {
3857      this._Statistics = default(EntityRef<Statistics>);
3858      OnCreated();
3859    }
3860   
3861    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3862    public System.Guid StatisticsId
3863    {
3864      get
3865      {
3866        return this._StatisticsId;
3867      }
3868      set
3869      {
3870        if ((this._StatisticsId != value))
3871        {
3872          if (this._Statistics.HasLoadedOrAssignedValue)
3873          {
3874            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3875          }
3876          this.OnStatisticsIdChanging(value);
3877          this.SendPropertyChanging();
3878          this._StatisticsId = value;
3879          this.SendPropertyChanged("StatisticsId");
3880          this.OnStatisticsIdChanged();
3881        }
3882      }
3883    }
3884   
3885    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3886    public System.Guid SlaveId
3887    {
3888      get
3889      {
3890        return this._SlaveId;
3891      }
3892      set
3893      {
3894        if ((this._SlaveId != value))
3895        {
3896          this.OnSlaveIdChanging(value);
3897          this.SendPropertyChanging();
3898          this._SlaveId = value;
3899          this.SendPropertyChanged("SlaveId");
3900          this.OnSlaveIdChanged();
3901        }
3902      }
3903    }
3904   
3905    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cores", DbType="Int NOT NULL")]
3906    public int Cores
3907    {
3908      get
3909      {
3910        return this._Cores;
3911      }
3912      set
3913      {
3914        if ((this._Cores != value))
3915        {
3916          this.OnCoresChanging(value);
3917          this.SendPropertyChanging();
3918          this._Cores = value;
3919          this.SendPropertyChanged("Cores");
3920          this.OnCoresChanged();
3921        }
3922      }
3923    }
3924   
3925    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeCores", DbType="Int NOT NULL")]
3926    public int FreeCores
3927    {
3928      get
3929      {
3930        return this._FreeCores;
3931      }
3932      set
3933      {
3934        if ((this._FreeCores != value))
3935        {
3936          this.OnFreeCoresChanging(value);
3937          this.SendPropertyChanging();
3938          this._FreeCores = value;
3939          this.SendPropertyChanged("FreeCores");
3940          this.OnFreeCoresChanged();
3941        }
3942      }
3943    }
3944   
3945    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="float NOT NULL")]
3946    public double CpuUtilization
3947    {
3948      get
3949      {
3950        return this._CpuUtilization;
3951      }
3952      set
3953      {
3954        if ((this._CpuUtilization != value))
3955        {
3956          this.OnCpuUtilizationChanging(value);
3957          this.SendPropertyChanging();
3958          this._CpuUtilization = value;
3959          this.SendPropertyChanged("CpuUtilization");
3960          this.OnCpuUtilizationChanged();
3961        }
3962      }
3963    }
3964   
3965    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int NOT NULL")]
3966    public int Memory
3967    {
3968      get
3969      {
3970        return this._Memory;
3971      }
3972      set
3973      {
3974        if ((this._Memory != value))
3975        {
3976          this.OnMemoryChanging(value);
3977          this.SendPropertyChanging();
3978          this._Memory = value;
3979          this.SendPropertyChanged("Memory");
3980          this.OnMemoryChanged();
3981        }
3982      }
3983    }
3984   
3985    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int NOT NULL")]
3986    public int FreeMemory
3987    {
3988      get
3989      {
3990        return this._FreeMemory;
3991      }
3992      set
3993      {
3994        if ((this._FreeMemory != value))
3995        {
3996          this.OnFreeMemoryChanging(value);
3997          this.SendPropertyChanging();
3998          this._FreeMemory = value;
3999          this.SendPropertyChanged("FreeMemory");
4000          this.OnFreeMemoryChanged();
4001        }
4002      }
4003    }
4004   
4005    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_SlaveStatistics", Storage="_Statistics", ThisKey="StatisticsId", OtherKey="StatisticsId", IsForeignKey=true)]
4006    public Statistics Statistics
4007    {
4008      get
4009      {
4010        return this._Statistics.Entity;
4011      }
4012      set
4013      {
4014        Statistics previousValue = this._Statistics.Entity;
4015        if (((previousValue != value)
4016              || (this._Statistics.HasLoadedOrAssignedValue == false)))
4017        {
4018          this.SendPropertyChanging();
4019          if ((previousValue != null))
4020          {
4021            this._Statistics.Entity = null;
4022            previousValue.SlaveStatistics.Remove(this);
4023          }
4024          this._Statistics.Entity = value;
4025          if ((value != null))
4026          {
4027            value.SlaveStatistics.Add(this);
4028            this._StatisticsId = value.StatisticsId;
4029          }
4030          else
4031          {
4032            this._StatisticsId = default(System.Guid);
4033          }
4034          this.SendPropertyChanged("Statistics");
4035        }
4036      }
4037    }
4038   
4039    public event PropertyChangingEventHandler PropertyChanging;
4040   
4041    public event PropertyChangedEventHandler PropertyChanged;
4042   
4043    protected virtual void SendPropertyChanging()
4044    {
4045      if ((this.PropertyChanging != null))
4046      {
4047        this.PropertyChanging(this, emptyChangingEventArgs);
4048      }
4049    }
4050   
4051    protected virtual void SendPropertyChanged(String propertyName)
4052    {
4053      if ((this.PropertyChanged != null))
4054      {
4055        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4056      }
4057    }
4058  }
4059 
4060  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
4061  public partial class Statistics : INotifyPropertyChanging, INotifyPropertyChanged
4062  {
4063   
4064    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4065   
4066    private System.Guid _StatisticsId;
4067   
4068    private System.DateTime _Timestamp;
4069   
4070    private EntitySet<UserStatistics> _UserStatistics;
4071   
4072    private EntitySet<SlaveStatistics> _SlaveStatistics;
4073   
4074    #region Extensibility Method Definitions
4075    partial void OnLoaded();
4076    partial void OnValidate(System.Data.Linq.ChangeAction action);
4077    partial void OnCreated();
4078    partial void OnStatisticsIdChanging(System.Guid value);
4079    partial void OnStatisticsIdChanged();
4080    partial void OnTimestampChanging(System.DateTime value);
4081    partial void OnTimestampChanged();
4082    #endregion
4083   
4084    public Statistics()
4085    {
4086      this._UserStatistics = new EntitySet<UserStatistics>(new Action<UserStatistics>(this.attach_UserStatistics), new Action<UserStatistics>(this.detach_UserStatistics));
4087      this._SlaveStatistics = new EntitySet<SlaveStatistics>(new Action<SlaveStatistics>(this.attach_SlaveStatistics), new Action<SlaveStatistics>(this.detach_SlaveStatistics));
4088      OnCreated();
4089    }
4090   
4091    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
4092    public System.Guid StatisticsId
4093    {
4094      get
4095      {
4096        return this._StatisticsId;
4097      }
4098      set
4099      {
4100        if ((this._StatisticsId != value))
4101        {
4102          this.OnStatisticsIdChanging(value);
4103          this.SendPropertyChanging();
4104          this._StatisticsId = value;
4105          this.SendPropertyChanged("StatisticsId");
4106          this.OnStatisticsIdChanged();
4107        }
4108      }
4109    }
4110   
4111    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Timestamp")]
4112    public System.DateTime Timestamp
4113    {
4114      get
4115      {
4116        return this._Timestamp;
4117      }
4118      set
4119      {
4120        if ((this._Timestamp != value))
4121        {
4122          this.OnTimestampChanging(value);
4123          this.SendPropertyChanging();
4124          this._Timestamp = value;
4125          this.SendPropertyChanged("Timestamp");
4126          this.OnTimestampChanged();
4127        }
4128      }
4129    }
4130   
4131    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_UserStatistics", Storage="_UserStatistics", ThisKey="StatisticsId", OtherKey="StatisticsId")]
4132    public EntitySet<UserStatistics> UserStatistics
4133    {
4134      get
4135      {
4136        return this._UserStatistics;
4137      }
4138      set
4139      {
4140        this._UserStatistics.Assign(value);
4141      }
4142    }
4143   
4144    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_SlaveStatistics", Storage="_SlaveStatistics", ThisKey="StatisticsId", OtherKey="StatisticsId")]
4145    public EntitySet<SlaveStatistics> SlaveStatistics
4146    {
4147      get
4148      {
4149        return this._SlaveStatistics;
4150      }
4151      set
4152      {
4153        this._SlaveStatistics.Assign(value);
4154      }
4155    }
4156   
4157    public event PropertyChangingEventHandler PropertyChanging;
4158   
4159    public event PropertyChangedEventHandler PropertyChanged;
4160   
4161    protected virtual void SendPropertyChanging()
4162    {
4163      if ((this.PropertyChanging != null))
4164      {
4165        this.PropertyChanging(this, emptyChangingEventArgs);
4166      }
4167    }
4168   
4169    protected virtual void SendPropertyChanged(String propertyName)
4170    {
4171      if ((this.PropertyChanged != null))
4172      {
4173        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4174      }
4175    }
4176   
4177    private void attach_UserStatistics(UserStatistics entity)
4178    {
4179      this.SendPropertyChanging();
4180      entity.Statistics = this;
4181    }
4182   
4183    private void detach_UserStatistics(UserStatistics entity)
4184    {
4185      this.SendPropertyChanging();
4186      entity.Statistics = null;
4187    }
4188   
4189    private void attach_SlaveStatistics(SlaveStatistics entity)
4190    {
4191      this.SendPropertyChanging();
4192      entity.Statistics = this;
4193    }
4194   
4195    private void detach_SlaveStatistics(SlaveStatistics entity)
4196    {
4197      this.SendPropertyChanging();
4198      entity.Statistics = null;
4199    }
4200  }
4201}
4202#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.