Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 6983 was 6983, checked in by ascheibe, 12 years ago

#1672

  • added the Hive Services and Slave projects
  • added missing svn ignores
File size: 109.7 KB
RevLine 
[6983]1#pragma warning disable 1591
2//------------------------------------------------------------------------------
3// <auto-generated>
4//     This code was generated by a tool.
5//     Runtime Version:4.0.30319.239
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   
1181    #region Extensibility Method Definitions
1182    partial void OnLoaded();
1183    partial void OnValidate(System.Data.Linq.ChangeAction action);
1184    partial void OnCreated();
1185    partial void OnCpuSpeedChanging(System.Nullable<int> value);
1186    partial void OnCpuSpeedChanged();
1187    partial void OnMemoryChanging(System.Nullable<int> value);
1188    partial void OnMemoryChanged();
1189    partial void OnLoginChanging(System.Nullable<System.DateTime> value);
1190    partial void OnLoginChanged();
1191    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
1192    partial void OnSlaveStateChanged();
1193    partial void OnCoresChanging(System.Nullable<int> value);
1194    partial void OnCoresChanged();
1195    partial void OnFreeCoresChanging(System.Nullable<int> value);
1196    partial void OnFreeCoresChanged();
1197    partial void OnFreeMemoryChanging(System.Nullable<int> value);
1198    partial void OnFreeMemoryChanged();
1199    partial void OnIsAllowedToCalculateChanging(bool value);
1200    partial void OnIsAllowedToCalculateChanged();
1201    partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture value);
1202    partial void OnCpuArchitectureChanged();
1203    partial void OnOperatingSystemChanging(string value);
1204    partial void OnOperatingSystemChanged();
1205    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
1206    partial void OnLastHeartbeatChanged();
1207    partial void OnCpuUtilizationChanging(double value);
1208    partial void OnCpuUtilizationChanged();
1209    #endregion
1210   
1211    public Slave()
1212    {
1213      OnCreated();
1214    }
1215   
1216    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPUSpeed", DbType="Int")]
1217    public System.Nullable<int> CpuSpeed
1218    {
1219      get
1220      {
1221        return this._CPUSpeed;
1222      }
1223      set
1224      {
1225        if ((this._CPUSpeed != value))
1226        {
1227          this.OnCpuSpeedChanging(value);
1228          this.SendPropertyChanging();
1229          this._CPUSpeed = value;
1230          this.SendPropertyChanged("CpuSpeed");
1231          this.OnCpuSpeedChanged();
1232        }
1233      }
1234    }
1235   
1236    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int")]
1237    public System.Nullable<int> Memory
1238    {
1239      get
1240      {
1241        return this._Memory;
1242      }
1243      set
1244      {
1245        if ((this._Memory != value))
1246        {
1247          this.OnMemoryChanging(value);
1248          this.SendPropertyChanging();
1249          this._Memory = value;
1250          this.SendPropertyChanged("Memory");
1251          this.OnMemoryChanged();
1252        }
1253      }
1254    }
1255   
1256    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]
1257    public System.Nullable<System.DateTime> Login
1258    {
1259      get
1260      {
1261        return this._Login;
1262      }
1263      set
1264      {
1265        if ((this._Login != value))
1266        {
1267          this.OnLoginChanging(value);
1268          this.SendPropertyChanging();
1269          this._Login = value;
1270          this.SendPropertyChanged("Login");
1271          this.OnLoginChanged();
1272        }
1273      }
1274    }
1275   
1276    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(15)", CanBeNull=true)]
1277    public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
1278    {
1279      get
1280      {
1281        return this._Status;
1282      }
1283      set
1284      {
1285        if ((this._Status != value))
1286        {
1287          this.OnSlaveStateChanging(value);
1288          this.SendPropertyChanging();
1289          this._Status = value;
1290          this.SendPropertyChanged("SlaveState");
1291          this.OnSlaveStateChanged();
1292        }
1293      }
1294    }
1295   
1296    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfCores", DbType="Int")]
1297    public System.Nullable<int> Cores
1298    {
1299      get
1300      {
1301        return this._NumberOfCores;
1302      }
1303      set
1304      {
1305        if ((this._NumberOfCores != value))
1306        {
1307          this.OnCoresChanging(value);
1308          this.SendPropertyChanging();
1309          this._NumberOfCores = value;
1310          this.SendPropertyChanged("Cores");
1311          this.OnCoresChanged();
1312        }
1313      }
1314    }
1315   
1316    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfFreeCores", DbType="Int")]
1317    public System.Nullable<int> FreeCores
1318    {
1319      get
1320      {
1321        return this._NumberOfFreeCores;
1322      }
1323      set
1324      {
1325        if ((this._NumberOfFreeCores != value))
1326        {
1327          this.OnFreeCoresChanging(value);
1328          this.SendPropertyChanging();
1329          this._NumberOfFreeCores = value;
1330          this.SendPropertyChanged("FreeCores");
1331          this.OnFreeCoresChanged();
1332        }
1333      }
1334    }
1335   
1336    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int")]
1337    public System.Nullable<int> FreeMemory
1338    {
1339      get
1340      {
1341        return this._FreeMemory;
1342      }
1343      set
1344      {
1345        if ((this._FreeMemory != value))
1346        {
1347          this.OnFreeMemoryChanging(value);
1348          this.SendPropertyChanging();
1349          this._FreeMemory = value;
1350          this.SendPropertyChanged("FreeMemory");
1351          this.OnFreeMemoryChanged();
1352        }
1353      }
1354    }
1355   
1356    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAllowedToCalculate", DbType="Bit")]
1357    public bool IsAllowedToCalculate
1358    {
1359      get
1360      {
1361        return this._IsAllowedToCalculate;
1362      }
1363      set
1364      {
1365        if ((this._IsAllowedToCalculate != value))
1366        {
1367          this.OnIsAllowedToCalculateChanging(value);
1368          this.SendPropertyChanging();
1369          this._IsAllowedToCalculate = value;
1370          this.SendPropertyChanged("IsAllowedToCalculate");
1371          this.OnIsAllowedToCalculateChanged();
1372        }
1373      }
1374    }
1375   
1376    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuArchitecture", DbType="VarChar(3)", CanBeNull=false)]
1377    public global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture CpuArchitecture
1378    {
1379      get
1380      {
1381        return this._CpuArchitecture;
1382      }
1383      set
1384      {
1385        if ((this._CpuArchitecture != value))
1386        {
1387          this.OnCpuArchitectureChanging(value);
1388          this.SendPropertyChanging();
1389          this._CpuArchitecture = value;
1390          this.SendPropertyChanged("CpuArchitecture");
1391          this.OnCpuArchitectureChanged();
1392        }
1393      }
1394    }
1395   
1396    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingSystem", DbType="VarChar(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
1397    public string OperatingSystem
1398    {
1399      get
1400      {
1401        return this._OperatingSystem;
1402      }
1403      set
1404      {
1405        if ((this._OperatingSystem != value))
1406        {
1407          this.OnOperatingSystemChanging(value);
1408          this.SendPropertyChanging();
1409          this._OperatingSystem = value;
1410          this.SendPropertyChanged("OperatingSystem");
1411          this.OnOperatingSystemChanged();
1412        }
1413      }
1414    }
1415   
1416    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
1417    public System.Nullable<System.DateTime> LastHeartbeat
1418    {
1419      get
1420      {
1421        return this._LastHeartbeat;
1422      }
1423      set
1424      {
1425        if ((this._LastHeartbeat != value))
1426        {
1427          this.OnLastHeartbeatChanging(value);
1428          this.SendPropertyChanging();
1429          this._LastHeartbeat = value;
1430          this.SendPropertyChanged("LastHeartbeat");
1431          this.OnLastHeartbeatChanged();
1432        }
1433      }
1434    }
1435   
1436    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="float")]
1437    public double CpuUtilization
1438    {
1439      get
1440      {
1441        return this._CpuUtilization;
1442      }
1443      set
1444      {
1445        if ((this._CpuUtilization != value))
1446        {
1447          this.OnCpuUtilizationChanging(value);
1448          this.SendPropertyChanging();
1449          this._CpuUtilization = value;
1450          this.SendPropertyChanged("CpuUtilization");
1451          this.OnCpuUtilizationChanged();
1452        }
1453      }
1454    }
1455  }
1456 
1457  public partial class SlaveGroup : Resource
1458  {
1459   
1460    #region Extensibility Method Definitions
1461    partial void OnLoaded();
1462    partial void OnValidate(System.Data.Linq.ChangeAction action);
1463    partial void OnCreated();
1464    #endregion
1465   
1466    public SlaveGroup()
1467    {
1468      OnCreated();
1469    }
1470  }
1471 
1472  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Task")]
1473  public partial class Task : INotifyPropertyChanging, INotifyPropertyChanged
1474  {
1475   
1476    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1477   
1478    private System.Guid _JobId;
1479   
1480    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
1481   
1482    private double _ExecutionTime;
1483   
1484    private System.Nullable<System.DateTime> _LastHeartbeat;
1485   
1486    private System.Nullable<System.Guid> _ParentJobId;
1487   
1488    private int _Priority;
1489   
1490    private int _CoresNeeded;
1491   
1492    private int _MemoryNeeded;
1493   
1494    private bool _IsParentJob;
1495   
1496    private bool _FinishWhenChildJobsFinished;
1497   
1498    private global::HeuristicLab.Services.Hive.DataAccess.Command? _Command;
1499   
1500    private System.Guid _HiveExperimentId;
1501   
1502    private bool _IsPrivileged;
1503   
1504    private EntitySet<AssignedResource> _AssignedResources;
1505   
1506    private EntitySet<RequiredPlugin> _RequiredPlugins;
1507   
1508    private EntitySet<Task> _Jobs;
1509   
1510    private EntityRef<TaskData> _JobData;
1511   
1512    private EntitySet<StateLog> _StateLogs;
1513   
1514    private EntityRef<Task> _Job1;
1515   
1516    private EntityRef<Job> _HiveExperiment;
1517   
1518    #region Extensibility Method Definitions
1519    partial void OnLoaded();
1520    partial void OnValidate(System.Data.Linq.ChangeAction action);
1521    partial void OnCreated();
1522    partial void OnTaskIdChanging(System.Guid value);
1523    partial void OnTaskIdChanged();
1524    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
1525    partial void OnStateChanged();
1526    partial void OnExecutionTimeMsChanging(double value);
1527    partial void OnExecutionTimeMsChanged();
1528    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
1529    partial void OnLastHeartbeatChanged();
1530    partial void OnParentTaskIdChanging(System.Nullable<System.Guid> value);
1531    partial void OnParentTaskIdChanged();
1532    partial void OnPriorityChanging(int value);
1533    partial void OnPriorityChanged();
1534    partial void OnCoresNeededChanging(int value);
1535    partial void OnCoresNeededChanged();
1536    partial void OnMemoryNeededChanging(int value);
1537    partial void OnMemoryNeededChanged();
1538    partial void OnIsParentTaskChanging(bool value);
1539    partial void OnIsParentTaskChanged();
1540    partial void OnFinishWhenChildJobsFinishedChanging(bool value);
1541    partial void OnFinishWhenChildJobsFinishedChanged();
1542    partial void OnCommandChanging(global::HeuristicLab.Services.Hive.DataAccess.Command? value);
1543    partial void OnCommandChanged();
1544    partial void OnJobIdChanging(System.Guid value);
1545    partial void OnJobIdChanged();
1546    partial void OnIsPrivilegedChanging(bool value);
1547    partial void OnIsPrivilegedChanged();
1548    #endregion
1549   
1550    public Task()
1551    {
1552      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
1553      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
1554      this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs));
1555      this._JobData = default(EntityRef<TaskData>);
1556      this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
1557      this._Job1 = default(EntityRef<Task>);
1558      this._HiveExperiment = default(EntityRef<Job>);
1559      OnCreated();
1560    }
1561   
1562    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
1563    public System.Guid TaskId
1564    {
1565      get
1566      {
1567        return this._JobId;
1568      }
1569      set
1570      {
1571        if ((this._JobId != value))
1572        {
1573          this.OnTaskIdChanging(value);
1574          this.SendPropertyChanging();
1575          this._JobId = value;
1576          this.SendPropertyChanged("TaskId");
1577          this.OnTaskIdChanged();
1578        }
1579      }
1580    }
1581   
1582    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="TaskState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)]
1583    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
1584    {
1585      get
1586      {
1587        return this._State;
1588      }
1589      set
1590      {
1591        if ((this._State != value))
1592        {
1593          this.OnStateChanging(value);
1594          this.SendPropertyChanging();
1595          this._State = value;
1596          this.SendPropertyChanged("State");
1597          this.OnStateChanged();
1598        }
1599      }
1600    }
1601   
1602    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float")]
1603    public double ExecutionTimeMs
1604    {
1605      get
1606      {
1607        return this._ExecutionTime;
1608      }
1609      set
1610      {
1611        if ((this._ExecutionTime != value))
1612        {
1613          this.OnExecutionTimeMsChanging(value);
1614          this.SendPropertyChanging();
1615          this._ExecutionTime = value;
1616          this.SendPropertyChanged("ExecutionTimeMs");
1617          this.OnExecutionTimeMsChanged();
1618        }
1619      }
1620    }
1621   
1622    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")]
1623    public System.Nullable<System.DateTime> LastHeartbeat
1624    {
1625      get
1626      {
1627        return this._LastHeartbeat;
1628      }
1629      set
1630      {
1631        if ((this._LastHeartbeat != value))
1632        {
1633          this.OnLastHeartbeatChanging(value);
1634          this.SendPropertyChanging();
1635          this._LastHeartbeat = value;
1636          this.SendPropertyChanged("LastHeartbeat");
1637          this.OnLastHeartbeatChanged();
1638        }
1639      }
1640    }
1641   
1642    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")]
1643    public System.Nullable<System.Guid> ParentTaskId
1644    {
1645      get
1646      {
1647        return this._ParentJobId;
1648      }
1649      set
1650      {
1651        if ((this._ParentJobId != value))
1652        {
1653          if (this._Job1.HasLoadedOrAssignedValue)
1654          {
1655            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1656          }
1657          this.OnParentTaskIdChanging(value);
1658          this.SendPropertyChanging();
1659          this._ParentJobId = value;
1660          this.SendPropertyChanged("ParentTaskId");
1661          this.OnParentTaskIdChanged();
1662        }
1663      }
1664    }
1665   
1666    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
1667    public int Priority
1668    {
1669      get
1670      {
1671        return this._Priority;
1672      }
1673      set
1674      {
1675        if ((this._Priority != value))
1676        {
1677          this.OnPriorityChanging(value);
1678          this.SendPropertyChanging();
1679          this._Priority = value;
1680          this.SendPropertyChanged("Priority");
1681          this.OnPriorityChanged();
1682        }
1683      }
1684    }
1685   
1686    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresNeeded", DbType="Int NOT NULL")]
1687    public int CoresNeeded
1688    {
1689      get
1690      {
1691        return this._CoresNeeded;
1692      }
1693      set
1694      {
1695        if ((this._CoresNeeded != value))
1696        {
1697          this.OnCoresNeededChanging(value);
1698          this.SendPropertyChanging();
1699          this._CoresNeeded = value;
1700          this.SendPropertyChanged("CoresNeeded");
1701          this.OnCoresNeededChanged();
1702        }
1703      }
1704    }
1705   
1706    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
1707    public int MemoryNeeded
1708    {
1709      get
1710      {
1711        return this._MemoryNeeded;
1712      }
1713      set
1714      {
1715        if ((this._MemoryNeeded != value))
1716        {
1717          this.OnMemoryNeededChanging(value);
1718          this.SendPropertyChanging();
1719          this._MemoryNeeded = value;
1720          this.SendPropertyChanged("MemoryNeeded");
1721          this.OnMemoryNeededChanged();
1722        }
1723      }
1724    }
1725   
1726    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsParentJob", DbType="Bit")]
1727    public bool IsParentTask
1728    {
1729      get
1730      {
1731        return this._IsParentJob;
1732      }
1733      set
1734      {
1735        if ((this._IsParentJob != value))
1736        {
1737          this.OnIsParentTaskChanging(value);
1738          this.SendPropertyChanging();
1739          this._IsParentJob = value;
1740          this.SendPropertyChanged("IsParentTask");
1741          this.OnIsParentTaskChanged();
1742        }
1743      }
1744    }
1745   
1746    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FinishWhenChildJobsFinished", DbType="Bit")]
1747    public bool FinishWhenChildJobsFinished
1748    {
1749      get
1750      {
1751        return this._FinishWhenChildJobsFinished;
1752      }
1753      set
1754      {
1755        if ((this._FinishWhenChildJobsFinished != value))
1756        {
1757          this.OnFinishWhenChildJobsFinishedChanging(value);
1758          this.SendPropertyChanging();
1759          this._FinishWhenChildJobsFinished = value;
1760          this.SendPropertyChanged("FinishWhenChildJobsFinished");
1761          this.OnFinishWhenChildJobsFinishedChanged();
1762        }
1763      }
1764    }
1765   
1766    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Command", DbType="VarChar(30)", CanBeNull=true)]
1767    public global::HeuristicLab.Services.Hive.DataAccess.Command? Command
1768    {
1769      get
1770      {
1771        return this._Command;
1772      }
1773      set
1774      {
1775        if ((this._Command != value))
1776        {
1777          this.OnCommandChanging(value);
1778          this.SendPropertyChanging();
1779          this._Command = value;
1780          this.SendPropertyChanged("Command");
1781          this.OnCommandChanged();
1782        }
1783      }
1784    }
1785   
1786    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL")]
1787    public System.Guid JobId
1788    {
1789      get
1790      {
1791        return this._HiveExperimentId;
1792      }
1793      set
1794      {
1795        if ((this._HiveExperimentId != value))
1796        {
1797          if (this._HiveExperiment.HasLoadedOrAssignedValue)
1798          {
1799            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1800          }
1801          this.OnJobIdChanging(value);
1802          this.SendPropertyChanging();
1803          this._HiveExperimentId = value;
1804          this.SendPropertyChanged("JobId");
1805          this.OnJobIdChanged();
1806        }
1807      }
1808    }
1809   
1810    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPrivileged", DbType="Bit")]
1811    public bool IsPrivileged
1812    {
1813      get
1814      {
1815        return this._IsPrivileged;
1816      }
1817      set
1818      {
1819        if ((this._IsPrivileged != value))
1820        {
1821          this.OnIsPrivilegedChanging(value);
1822          this.SendPropertyChanging();
1823          this._IsPrivileged = value;
1824          this.SendPropertyChanged("IsPrivileged");
1825          this.OnIsPrivilegedChanged();
1826        }
1827      }
1828    }
1829   
1830    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedResource", Storage="_AssignedResources", ThisKey="TaskId", OtherKey="TaskId")]
1831    public EntitySet<AssignedResource> AssignedResources
1832    {
1833      get
1834      {
1835        return this._AssignedResources;
1836      }
1837      set
1838      {
1839        this._AssignedResources.Assign(value);
1840      }
1841    }
1842   
1843    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="TaskId", OtherKey="TaskId")]
1844    public EntitySet<RequiredPlugin> RequiredPlugins
1845    {
1846      get
1847      {
1848        return this._RequiredPlugins;
1849      }
1850      set
1851      {
1852        this._RequiredPlugins.Assign(value);
1853      }
1854    }
1855   
1856    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Jobs", ThisKey="TaskId", OtherKey="ParentTaskId")]
1857    public EntitySet<Task> ChildJobs
1858    {
1859      get
1860      {
1861        return this._Jobs;
1862      }
1863      set
1864      {
1865        this._Jobs.Assign(value);
1866      }
1867    }
1868   
1869    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_JobData", ThisKey="TaskId", OtherKey="TaskId", IsUnique=true, IsForeignKey=false)]
1870    public TaskData JobData
1871    {
1872      get
1873      {
1874        return this._JobData.Entity;
1875      }
1876      set
1877      {
1878        TaskData previousValue = this._JobData.Entity;
1879        if (((previousValue != value)
1880              || (this._JobData.HasLoadedOrAssignedValue == false)))
1881        {
1882          this.SendPropertyChanging();
1883          if ((previousValue != null))
1884          {
1885            this._JobData.Entity = null;
1886            previousValue.Task = null;
1887          }
1888          this._JobData.Entity = value;
1889          if ((value != null))
1890          {
1891            value.Task = this;
1892          }
1893          this.SendPropertyChanged("JobData");
1894        }
1895      }
1896    }
1897   
1898    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_StateLogs", ThisKey="TaskId", OtherKey="TaskId")]
1899    public EntitySet<StateLog> StateLogs
1900    {
1901      get
1902      {
1903        return this._StateLogs;
1904      }
1905      set
1906      {
1907        this._StateLogs.Assign(value);
1908      }
1909    }
1910   
1911    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Job1", ThisKey="ParentTaskId", OtherKey="TaskId", IsForeignKey=true)]
1912    public Task ParentJob
1913    {
1914      get
1915      {
1916        return this._Job1.Entity;
1917      }
1918      set
1919      {
1920        Task previousValue = this._Job1.Entity;
1921        if (((previousValue != value)
1922              || (this._Job1.HasLoadedOrAssignedValue == false)))
1923        {
1924          this.SendPropertyChanging();
1925          if ((previousValue != null))
1926          {
1927            this._Job1.Entity = null;
1928            previousValue.ChildJobs.Remove(this);
1929          }
1930          this._Job1.Entity = value;
1931          if ((value != null))
1932          {
1933            value.ChildJobs.Add(this);
1934            this._ParentJobId = value.TaskId;
1935          }
1936          else
1937          {
1938            this._ParentJobId = default(Nullable<System.Guid>);
1939          }
1940          this.SendPropertyChanged("ParentJob");
1941        }
1942      }
1943    }
1944   
1945    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
1946    public Job Job
1947    {
1948      get
1949      {
1950        return this._HiveExperiment.Entity;
1951      }
1952      set
1953      {
1954        Job previousValue = this._HiveExperiment.Entity;
1955        if (((previousValue != value)
1956              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
1957        {
1958          this.SendPropertyChanging();
1959          if ((previousValue != null))
1960          {
1961            this._HiveExperiment.Entity = null;
1962            previousValue.Tasks.Remove(this);
1963          }
1964          this._HiveExperiment.Entity = value;
1965          if ((value != null))
1966          {
1967            value.Tasks.Add(this);
1968            this._HiveExperimentId = value.JobId;
1969          }
1970          else
1971          {
1972            this._HiveExperimentId = default(System.Guid);
1973          }
1974          this.SendPropertyChanged("Job");
1975        }
1976      }
1977    }
1978   
1979    public event PropertyChangingEventHandler PropertyChanging;
1980   
1981    public event PropertyChangedEventHandler PropertyChanged;
1982   
1983    protected virtual void SendPropertyChanging()
1984    {
1985      if ((this.PropertyChanging != null))
1986      {
1987        this.PropertyChanging(this, emptyChangingEventArgs);
1988      }
1989    }
1990   
1991    protected virtual void SendPropertyChanged(String propertyName)
1992    {
1993      if ((this.PropertyChanged != null))
1994      {
1995        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1996      }
1997    }
1998   
1999    private void attach_AssignedResources(AssignedResource entity)
2000    {
2001      this.SendPropertyChanging();
2002      entity.Task = this;
2003    }
2004   
2005    private void detach_AssignedResources(AssignedResource entity)
2006    {
2007      this.SendPropertyChanging();
2008      entity.Task = null;
2009    }
2010   
2011    private void attach_RequiredPlugins(RequiredPlugin entity)
2012    {
2013      this.SendPropertyChanging();
2014      entity.Task = this;
2015    }
2016   
2017    private void detach_RequiredPlugins(RequiredPlugin entity)
2018    {
2019      this.SendPropertyChanging();
2020      entity.Task = null;
2021    }
2022   
2023    private void attach_Jobs(Task entity)
2024    {
2025      this.SendPropertyChanging();
2026      entity.ParentJob = this;
2027    }
2028   
2029    private void detach_Jobs(Task entity)
2030    {
2031      this.SendPropertyChanging();
2032      entity.ParentJob = null;
2033    }
2034   
2035    private void attach_StateLogs(StateLog entity)
2036    {
2037      this.SendPropertyChanging();
2038      entity.Task = this;
2039    }
2040   
2041    private void detach_StateLogs(StateLog entity)
2042    {
2043      this.SendPropertyChanging();
2044      entity.Task = null;
2045    }
2046  }
2047 
2048  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Downtime")]
2049  public partial class Downtime : INotifyPropertyChanging, INotifyPropertyChanged
2050  {
2051   
2052    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2053   
2054    private System.Guid _UptimeCalendarId;
2055   
2056    private System.Guid _ResourceId;
2057   
2058    private System.DateTime _StartDate;
2059   
2060    private System.DateTime _EndDate;
2061   
2062    private bool _AllDayEvent;
2063   
2064    private bool _Recurring;
2065   
2066    private System.Guid _RecurringId;
2067   
2068    private EntityRef<Resource> _Resource;
2069   
2070    #region Extensibility Method Definitions
2071    partial void OnLoaded();
2072    partial void OnValidate(System.Data.Linq.ChangeAction action);
2073    partial void OnCreated();
2074    partial void OnDowntimeIdChanging(System.Guid value);
2075    partial void OnDowntimeIdChanged();
2076    partial void OnResourceIdChanging(System.Guid value);
2077    partial void OnResourceIdChanged();
2078    partial void OnStartDateChanging(System.DateTime value);
2079    partial void OnStartDateChanged();
2080    partial void OnEndDateChanging(System.DateTime value);
2081    partial void OnEndDateChanged();
2082    partial void OnAllDayEventChanging(bool value);
2083    partial void OnAllDayEventChanged();
2084    partial void OnRecurringChanging(bool value);
2085    partial void OnRecurringChanged();
2086    partial void OnRecurringIdChanging(System.Guid value);
2087    partial void OnRecurringIdChanged();
2088    #endregion
2089   
2090    public Downtime()
2091    {
2092      this._Resource = default(EntityRef<Resource>);
2093      OnCreated();
2094    }
2095   
2096    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier", IsPrimaryKey=true, IsDbGenerated=true)]
2097    public System.Guid DowntimeId
2098    {
2099      get
2100      {
2101        return this._UptimeCalendarId;
2102      }
2103      set
2104      {
2105        if ((this._UptimeCalendarId != value))
2106        {
2107          this.OnDowntimeIdChanging(value);
2108          this.SendPropertyChanging();
2109          this._UptimeCalendarId = value;
2110          this.SendPropertyChanged("DowntimeId");
2111          this.OnDowntimeIdChanged();
2112        }
2113      }
2114    }
2115   
2116    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
2117    public System.Guid ResourceId
2118    {
2119      get
2120      {
2121        return this._ResourceId;
2122      }
2123      set
2124      {
2125        if ((this._ResourceId != value))
2126        {
2127          if (this._Resource.HasLoadedOrAssignedValue)
2128          {
2129            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2130          }
2131          this.OnResourceIdChanging(value);
2132          this.SendPropertyChanging();
2133          this._ResourceId = value;
2134          this.SendPropertyChanged("ResourceId");
2135          this.OnResourceIdChanged();
2136        }
2137      }
2138    }
2139   
2140    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")]
2141    public System.DateTime StartDate
2142    {
2143      get
2144      {
2145        return this._StartDate;
2146      }
2147      set
2148      {
2149        if ((this._StartDate != value))
2150        {
2151          this.OnStartDateChanging(value);
2152          this.SendPropertyChanging();
2153          this._StartDate = value;
2154          this.SendPropertyChanged("StartDate");
2155          this.OnStartDateChanged();
2156        }
2157      }
2158    }
2159   
2160    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")]
2161    public System.DateTime EndDate
2162    {
2163      get
2164      {
2165        return this._EndDate;
2166      }
2167      set
2168      {
2169        if ((this._EndDate != value))
2170        {
2171          this.OnEndDateChanging(value);
2172          this.SendPropertyChanging();
2173          this._EndDate = value;
2174          this.SendPropertyChanged("EndDate");
2175          this.OnEndDateChanged();
2176        }
2177      }
2178    }
2179   
2180    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AllDayEvent", DbType="Bit")]
2181    public bool AllDayEvent
2182    {
2183      get
2184      {
2185        return this._AllDayEvent;
2186      }
2187      set
2188      {
2189        if ((this._AllDayEvent != value))
2190        {
2191          this.OnAllDayEventChanging(value);
2192          this.SendPropertyChanging();
2193          this._AllDayEvent = value;
2194          this.SendPropertyChanged("AllDayEvent");
2195          this.OnAllDayEventChanged();
2196        }
2197      }
2198    }
2199   
2200    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Recurring", DbType="Bit")]
2201    public bool Recurring
2202    {
2203      get
2204      {
2205        return this._Recurring;
2206      }
2207      set
2208      {
2209        if ((this._Recurring != value))
2210        {
2211          this.OnRecurringChanging(value);
2212          this.SendPropertyChanging();
2213          this._Recurring = value;
2214          this.SendPropertyChanged("Recurring");
2215          this.OnRecurringChanged();
2216        }
2217      }
2218    }
2219   
2220    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecurringId", DbType="UniqueIdentifier")]
2221    public System.Guid RecurringId
2222    {
2223      get
2224      {
2225        return this._RecurringId;
2226      }
2227      set
2228      {
2229        if ((this._RecurringId != value))
2230        {
2231          this.OnRecurringIdChanging(value);
2232          this.SendPropertyChanging();
2233          this._RecurringId = value;
2234          this.SendPropertyChanged("RecurringId");
2235          this.OnRecurringIdChanged();
2236        }
2237      }
2238    }
2239   
2240    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
2241    public Resource Resource
2242    {
2243      get
2244      {
2245        return this._Resource.Entity;
2246      }
2247      set
2248      {
2249        Resource previousValue = this._Resource.Entity;
2250        if (((previousValue != value)
2251              || (this._Resource.HasLoadedOrAssignedValue == false)))
2252        {
2253          this.SendPropertyChanging();
2254          if ((previousValue != null))
2255          {
2256            this._Resource.Entity = null;
2257            previousValue.Downtimes.Remove(this);
2258          }
2259          this._Resource.Entity = value;
2260          if ((value != null))
2261          {
2262            value.Downtimes.Add(this);
2263            this._ResourceId = value.ResourceId;
2264          }
2265          else
2266          {
2267            this._ResourceId = default(System.Guid);
2268          }
2269          this.SendPropertyChanged("Resource");
2270        }
2271      }
2272    }
2273   
2274    public event PropertyChangingEventHandler PropertyChanging;
2275   
2276    public event PropertyChangedEventHandler PropertyChanged;
2277   
2278    protected virtual void SendPropertyChanging()
2279    {
2280      if ((this.PropertyChanging != null))
2281      {
2282        this.PropertyChanging(this, emptyChangingEventArgs);
2283      }
2284    }
2285   
2286    protected virtual void SendPropertyChanged(String propertyName)
2287    {
2288      if ((this.PropertyChanged != null))
2289      {
2290        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2291      }
2292    }
2293  }
2294 
2295  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Job")]
2296  public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
2297  {
2298   
2299    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2300   
2301    private System.Guid _HiveExperimentId;
2302   
2303    private string _Name;
2304   
2305    private string _Description;
2306   
2307    private string _ResourceIds;
2308   
2309    private System.Guid _UserId;
2310   
2311    private System.DateTime _DateCreated;
2312   
2313    private EntitySet<Task> _Jobs;
2314   
2315    private EntitySet<JobPermission> _HiveExperimentPermissions;
2316   
2317    #region Extensibility Method Definitions
2318    partial void OnLoaded();
2319    partial void OnValidate(System.Data.Linq.ChangeAction action);
2320    partial void OnCreated();
2321    partial void OnJobIdChanging(System.Guid value);
2322    partial void OnJobIdChanged();
2323    partial void OnNameChanging(string value);
2324    partial void OnNameChanged();
2325    partial void OnDescriptionChanging(string value);
2326    partial void OnDescriptionChanged();
2327    partial void OnResourceIdsChanging(string value);
2328    partial void OnResourceIdsChanged();
2329    partial void OnOwnerUserIdChanging(System.Guid value);
2330    partial void OnOwnerUserIdChanged();
2331    partial void OnDateCreatedChanging(System.DateTime value);
2332    partial void OnDateCreatedChanged();
2333    #endregion
2334   
2335    public Job()
2336    {
2337      this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs));
2338      this._HiveExperimentPermissions = new EntitySet<JobPermission>(new Action<JobPermission>(this.attach_HiveExperimentPermissions), new Action<JobPermission>(this.detach_HiveExperimentPermissions));
2339      OnCreated();
2340    }
2341   
2342    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2343    public System.Guid JobId
2344    {
2345      get
2346      {
2347        return this._HiveExperimentId;
2348      }
2349      set
2350      {
2351        if ((this._HiveExperimentId != value))
2352        {
2353          this.OnJobIdChanging(value);
2354          this.SendPropertyChanging();
2355          this._HiveExperimentId = value;
2356          this.SendPropertyChanged("JobId");
2357          this.OnJobIdChanged();
2358        }
2359      }
2360    }
2361   
2362    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
2363    public string Name
2364    {
2365      get
2366      {
2367        return this._Name;
2368      }
2369      set
2370      {
2371        if ((this._Name != value))
2372        {
2373          this.OnNameChanging(value);
2374          this.SendPropertyChanging();
2375          this._Name = value;
2376          this.SendPropertyChanged("Name");
2377          this.OnNameChanged();
2378        }
2379      }
2380    }
2381   
2382    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="VarChar(MAX)")]
2383    public string Description
2384    {
2385      get
2386      {
2387        return this._Description;
2388      }
2389      set
2390      {
2391        if ((this._Description != value))
2392        {
2393          this.OnDescriptionChanging(value);
2394          this.SendPropertyChanging();
2395          this._Description = value;
2396          this.SendPropertyChanged("Description");
2397          this.OnDescriptionChanged();
2398        }
2399      }
2400    }
2401   
2402    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceIds", DbType="VarChar(MAX)")]
2403    public string ResourceIds
2404    {
2405      get
2406      {
2407        return this._ResourceIds;
2408      }
2409      set
2410      {
2411        if ((this._ResourceIds != value))
2412        {
2413          this.OnResourceIdsChanging(value);
2414          this.SendPropertyChanging();
2415          this._ResourceIds = value;
2416          this.SendPropertyChanged("ResourceIds");
2417          this.OnResourceIdsChanged();
2418        }
2419      }
2420    }
2421   
2422    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
2423    public System.Guid OwnerUserId
2424    {
2425      get
2426      {
2427        return this._UserId;
2428      }
2429      set
2430      {
2431        if ((this._UserId != value))
2432        {
2433          this.OnOwnerUserIdChanging(value);
2434          this.SendPropertyChanging();
2435          this._UserId = value;
2436          this.SendPropertyChanged("OwnerUserId");
2437          this.OnOwnerUserIdChanged();
2438        }
2439      }
2440    }
2441   
2442    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
2443    public System.DateTime DateCreated
2444    {
2445      get
2446      {
2447        return this._DateCreated;
2448      }
2449      set
2450      {
2451        if ((this._DateCreated != value))
2452        {
2453          this.OnDateCreatedChanging(value);
2454          this.SendPropertyChanging();
2455          this._DateCreated = value;
2456          this.SendPropertyChanged("DateCreated");
2457          this.OnDateCreatedChanged();
2458        }
2459      }
2460    }
2461   
2462    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_Jobs", ThisKey="JobId", OtherKey="JobId")]
2463    public EntitySet<Task> Tasks
2464    {
2465      get
2466      {
2467        return this._Jobs;
2468      }
2469      set
2470      {
2471        this._Jobs.Assign(value);
2472      }
2473    }
2474   
2475    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperimentPermissions", ThisKey="JobId", OtherKey="JobId")]
2476    public EntitySet<JobPermission> JobPermissions
2477    {
2478      get
2479      {
2480        return this._HiveExperimentPermissions;
2481      }
2482      set
2483      {
2484        this._HiveExperimentPermissions.Assign(value);
2485      }
2486    }
2487   
2488    public event PropertyChangingEventHandler PropertyChanging;
2489   
2490    public event PropertyChangedEventHandler PropertyChanged;
2491   
2492    protected virtual void SendPropertyChanging()
2493    {
2494      if ((this.PropertyChanging != null))
2495      {
2496        this.PropertyChanging(this, emptyChangingEventArgs);
2497      }
2498    }
2499   
2500    protected virtual void SendPropertyChanged(String propertyName)
2501    {
2502      if ((this.PropertyChanged != null))
2503      {
2504        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2505      }
2506    }
2507   
2508    private void attach_Jobs(Task entity)
2509    {
2510      this.SendPropertyChanging();
2511      entity.Job = this;
2512    }
2513   
2514    private void detach_Jobs(Task entity)
2515    {
2516      this.SendPropertyChanging();
2517      entity.Job = null;
2518    }
2519   
2520    private void attach_HiveExperimentPermissions(JobPermission entity)
2521    {
2522      this.SendPropertyChanging();
2523      entity.Job = this;
2524    }
2525   
2526    private void detach_HiveExperimentPermissions(JobPermission entity)
2527    {
2528      this.SendPropertyChanging();
2529      entity.Job = null;
2530    }
2531  }
2532 
2533  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.TaskData")]
2534  public partial class TaskData : INotifyPropertyChanging, INotifyPropertyChanged
2535  {
2536   
2537    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2538   
2539    private System.Guid _JobId;
2540   
2541    private System.Data.Linq.Binary _Data;
2542   
2543    private System.DateTime _LastUpdate;
2544   
2545    private EntityRef<Task> _Job;
2546   
2547    #region Extensibility Method Definitions
2548    partial void OnLoaded();
2549    partial void OnValidate(System.Data.Linq.ChangeAction action);
2550    partial void OnCreated();
2551    partial void OnTaskIdChanging(System.Guid value);
2552    partial void OnTaskIdChanged();
2553    partial void OnDataChanging(System.Data.Linq.Binary value);
2554    partial void OnDataChanged();
2555    partial void OnLastUpdateChanging(System.DateTime value);
2556    partial void OnLastUpdateChanged();
2557    #endregion
2558   
2559    public TaskData()
2560    {
2561      this._Job = default(EntityRef<Task>);
2562      OnCreated();
2563    }
2564   
2565    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
2566    public System.Guid TaskId
2567    {
2568      get
2569      {
2570        return this._JobId;
2571      }
2572      set
2573      {
2574        if ((this._JobId != value))
2575        {
2576          if (this._Job.HasLoadedOrAssignedValue)
2577          {
2578            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2579          }
2580          this.OnTaskIdChanging(value);
2581          this.SendPropertyChanging();
2582          this._JobId = value;
2583          this.SendPropertyChanged("TaskId");
2584          this.OnTaskIdChanged();
2585        }
2586      }
2587    }
2588   
2589    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2590    public System.Data.Linq.Binary Data
2591    {
2592      get
2593      {
2594        return this._Data;
2595      }
2596      set
2597      {
2598        if ((this._Data != value))
2599        {
2600          this.OnDataChanging(value);
2601          this.SendPropertyChanging();
2602          this._Data = value;
2603          this.SendPropertyChanged("Data");
2604          this.OnDataChanged();
2605        }
2606      }
2607    }
2608   
2609    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastUpdate", DbType="DateTime")]
2610    public System.DateTime LastUpdate
2611    {
2612      get
2613      {
2614        return this._LastUpdate;
2615      }
2616      set
2617      {
2618        if ((this._LastUpdate != value))
2619        {
2620          this.OnLastUpdateChanging(value);
2621          this.SendPropertyChanging();
2622          this._LastUpdate = value;
2623          this.SendPropertyChanged("LastUpdate");
2624          this.OnLastUpdateChanged();
2625        }
2626      }
2627    }
2628   
2629    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
2630    public Task Task
2631    {
2632      get
2633      {
2634        return this._Job.Entity;
2635      }
2636      set
2637      {
2638        Task previousValue = this._Job.Entity;
2639        if (((previousValue != value)
2640              || (this._Job.HasLoadedOrAssignedValue == false)))
2641        {
2642          this.SendPropertyChanging();
2643          if ((previousValue != null))
2644          {
2645            this._Job.Entity = null;
2646            previousValue.JobData = null;
2647          }
2648          this._Job.Entity = value;
2649          if ((value != null))
2650          {
2651            value.JobData = this;
2652            this._JobId = value.TaskId;
2653          }
2654          else
2655          {
2656            this._JobId = default(System.Guid);
2657          }
2658          this.SendPropertyChanged("Task");
2659        }
2660      }
2661    }
2662   
2663    public event PropertyChangingEventHandler PropertyChanging;
2664   
2665    public event PropertyChangedEventHandler PropertyChanged;
2666   
2667    protected virtual void SendPropertyChanging()
2668    {
2669      if ((this.PropertyChanging != null))
2670      {
2671        this.PropertyChanging(this, emptyChangingEventArgs);
2672      }
2673    }
2674   
2675    protected virtual void SendPropertyChanged(String propertyName)
2676    {
2677      if ((this.PropertyChanged != null))
2678      {
2679        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2680      }
2681    }
2682  }
2683 
2684  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginData")]
2685  public partial class PluginData : INotifyPropertyChanging, INotifyPropertyChanged
2686  {
2687   
2688    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2689   
2690    private System.Guid _PluginDataId;
2691   
2692    private System.Guid _PluginId;
2693   
2694    private System.Data.Linq.Binary _Data;
2695   
2696    private string _FileName;
2697   
2698    private EntityRef<Plugin> _Plugin;
2699   
2700    #region Extensibility Method Definitions
2701    partial void OnLoaded();
2702    partial void OnValidate(System.Data.Linq.ChangeAction action);
2703    partial void OnCreated();
2704    partial void OnPluginDataIdChanging(System.Guid value);
2705    partial void OnPluginDataIdChanged();
2706    partial void OnPluginIdChanging(System.Guid value);
2707    partial void OnPluginIdChanged();
2708    partial void OnDataChanging(System.Data.Linq.Binary value);
2709    partial void OnDataChanged();
2710    partial void OnFileNameChanging(string value);
2711    partial void OnFileNameChanged();
2712    #endregion
2713   
2714    public PluginData()
2715    {
2716      this._Plugin = default(EntityRef<Plugin>);
2717      OnCreated();
2718    }
2719   
2720    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginDataId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2721    public System.Guid PluginDataId
2722    {
2723      get
2724      {
2725        return this._PluginDataId;
2726      }
2727      set
2728      {
2729        if ((this._PluginDataId != value))
2730        {
2731          this.OnPluginDataIdChanging(value);
2732          this.SendPropertyChanging();
2733          this._PluginDataId = value;
2734          this.SendPropertyChanged("PluginDataId");
2735          this.OnPluginDataIdChanged();
2736        }
2737      }
2738    }
2739   
2740    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
2741    public System.Guid PluginId
2742    {
2743      get
2744      {
2745        return this._PluginId;
2746      }
2747      set
2748      {
2749        if ((this._PluginId != value))
2750        {
2751          if (this._Plugin.HasLoadedOrAssignedValue)
2752          {
2753            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2754          }
2755          this.OnPluginIdChanging(value);
2756          this.SendPropertyChanging();
2757          this._PluginId = value;
2758          this.SendPropertyChanged("PluginId");
2759          this.OnPluginIdChanged();
2760        }
2761      }
2762    }
2763   
2764    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2765    public System.Data.Linq.Binary Data
2766    {
2767      get
2768      {
2769        return this._Data;
2770      }
2771      set
2772      {
2773        if ((this._Data != value))
2774        {
2775          this.OnDataChanging(value);
2776          this.SendPropertyChanging();
2777          this._Data = value;
2778          this.SendPropertyChanged("Data");
2779          this.OnDataChanged();
2780        }
2781      }
2782    }
2783   
2784    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="VarChar(MAX)", CanBeNull=false)]
2785    public string FileName
2786    {
2787      get
2788      {
2789        return this._FileName;
2790      }
2791      set
2792      {
2793        if ((this._FileName != value))
2794        {
2795          this.OnFileNameChanging(value);
2796          this.SendPropertyChanging();
2797          this._FileName = value;
2798          this.SendPropertyChanged("FileName");
2799          this.OnFileNameChanged();
2800        }
2801      }
2802    }
2803   
2804    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_Plugin", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true)]
2805    public Plugin Plugin
2806    {
2807      get
2808      {
2809        return this._Plugin.Entity;
2810      }
2811      set
2812      {
2813        Plugin previousValue = this._Plugin.Entity;
2814        if (((previousValue != value)
2815              || (this._Plugin.HasLoadedOrAssignedValue == false)))
2816        {
2817          this.SendPropertyChanging();
2818          if ((previousValue != null))
2819          {
2820            this._Plugin.Entity = null;
2821            previousValue.PluginData.Remove(this);
2822          }
2823          this._Plugin.Entity = value;
2824          if ((value != null))
2825          {
2826            value.PluginData.Add(this);
2827            this._PluginId = value.PluginId;
2828          }
2829          else
2830          {
2831            this._PluginId = default(System.Guid);
2832          }
2833          this.SendPropertyChanged("Plugin");
2834        }
2835      }
2836    }
2837   
2838    public event PropertyChangingEventHandler PropertyChanging;
2839   
2840    public event PropertyChangedEventHandler PropertyChanged;
2841   
2842    protected virtual void SendPropertyChanging()
2843    {
2844      if ((this.PropertyChanging != null))
2845      {
2846        this.PropertyChanging(this, emptyChangingEventArgs);
2847      }
2848    }
2849   
2850    protected virtual void SendPropertyChanged(String propertyName)
2851    {
2852      if ((this.PropertyChanged != null))
2853      {
2854        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2855      }
2856    }
2857  }
2858 
2859  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.StateLog")]
2860  public partial class StateLog : INotifyPropertyChanging, INotifyPropertyChanged
2861  {
2862   
2863    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2864   
2865    private System.Guid _StateLogId;
2866   
2867    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
2868   
2869    private System.DateTime _DateTime;
2870   
2871    private System.Guid _JobId;
2872   
2873    private System.Nullable<System.Guid> _UserId;
2874   
2875    private System.Nullable<System.Guid> _SlaveId;
2876   
2877    private string _Exception;
2878   
2879    private EntityRef<Task> _Job;
2880   
2881    private EntityRef<Resource> _Resource;
2882   
2883    #region Extensibility Method Definitions
2884    partial void OnLoaded();
2885    partial void OnValidate(System.Data.Linq.ChangeAction action);
2886    partial void OnCreated();
2887    partial void OnStateLogIdChanging(System.Guid value);
2888    partial void OnStateLogIdChanged();
2889    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value);
2890    partial void OnStateChanged();
2891    partial void OnDateTimeChanging(System.DateTime value);
2892    partial void OnDateTimeChanged();
2893    partial void OnTaskIdChanging(System.Guid value);
2894    partial void OnTaskIdChanged();
2895    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
2896    partial void OnUserIdChanged();
2897    partial void OnSlaveIdChanging(System.Nullable<System.Guid> value);
2898    partial void OnSlaveIdChanged();
2899    partial void OnExceptionChanging(string value);
2900    partial void OnExceptionChanged();
2901    #endregion
2902   
2903    public StateLog()
2904    {
2905      this._Job = default(EntityRef<Task>);
2906      this._Resource = default(EntityRef<Resource>);
2907      OnCreated();
2908    }
2909   
2910    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StateLogId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2911    public System.Guid StateLogId
2912    {
2913      get
2914      {
2915        return this._StateLogId;
2916      }
2917      set
2918      {
2919        if ((this._StateLogId != value))
2920        {
2921          this.OnStateLogIdChanging(value);
2922          this.SendPropertyChanging();
2923          this._StateLogId = value;
2924          this.SendPropertyChanged("StateLogId");
2925          this.OnStateLogIdChanged();
2926        }
2927      }
2928    }
2929   
2930    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
2931    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
2932    {
2933      get
2934      {
2935        return this._State;
2936      }
2937      set
2938      {
2939        if ((this._State != value))
2940        {
2941          this.OnStateChanging(value);
2942          this.SendPropertyChanging();
2943          this._State = value;
2944          this.SendPropertyChanged("State");
2945          this.OnStateChanged();
2946        }
2947      }
2948    }
2949   
2950    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateTime", DbType="DateTime NOT NULL")]
2951    public System.DateTime DateTime
2952    {
2953      get
2954      {
2955        return this._DateTime;
2956      }
2957      set
2958      {
2959        if ((this._DateTime != value))
2960        {
2961          this.OnDateTimeChanging(value);
2962          this.SendPropertyChanging();
2963          this._DateTime = value;
2964          this.SendPropertyChanged("DateTime");
2965          this.OnDateTimeChanged();
2966        }
2967      }
2968    }
2969   
2970    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
2971    public System.Guid TaskId
2972    {
2973      get
2974      {
2975        return this._JobId;
2976      }
2977      set
2978      {
2979        if ((this._JobId != value))
2980        {
2981          if (this._Job.HasLoadedOrAssignedValue)
2982          {
2983            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2984          }
2985          this.OnTaskIdChanging(value);
2986          this.SendPropertyChanging();
2987          this._JobId = value;
2988          this.SendPropertyChanged("TaskId");
2989          this.OnTaskIdChanged();
2990        }
2991      }
2992    }
2993   
2994    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
2995    public System.Nullable<System.Guid> UserId
2996    {
2997      get
2998      {
2999        return this._UserId;
3000      }
3001      set
3002      {
3003        if ((this._UserId != value))
3004        {
3005          this.OnUserIdChanging(value);
3006          this.SendPropertyChanging();
3007          this._UserId = value;
3008          this.SendPropertyChanged("UserId");
3009          this.OnUserIdChanged();
3010        }
3011      }
3012    }
3013   
3014    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier")]
3015    public System.Nullable<System.Guid> SlaveId
3016    {
3017      get
3018      {
3019        return this._SlaveId;
3020      }
3021      set
3022      {
3023        if ((this._SlaveId != value))
3024        {
3025          if (this._Resource.HasLoadedOrAssignedValue)
3026          {
3027            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3028          }
3029          this.OnSlaveIdChanging(value);
3030          this.SendPropertyChanging();
3031          this._SlaveId = value;
3032          this.SendPropertyChanged("SlaveId");
3033          this.OnSlaveIdChanged();
3034        }
3035      }
3036    }
3037   
3038    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)", CanBeNull=false)]
3039    public string Exception
3040    {
3041      get
3042      {
3043        return this._Exception;
3044      }
3045      set
3046      {
3047        if ((this._Exception != value))
3048        {
3049          this.OnExceptionChanging(value);
3050          this.SendPropertyChanging();
3051          this._Exception = value;
3052          this.SendPropertyChanged("Exception");
3053          this.OnExceptionChanged();
3054        }
3055      }
3056    }
3057   
3058    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
3059    public Task Task
3060    {
3061      get
3062      {
3063        return this._Job.Entity;
3064      }
3065      set
3066      {
3067        Task previousValue = this._Job.Entity;
3068        if (((previousValue != value)
3069              || (this._Job.HasLoadedOrAssignedValue == false)))
3070        {
3071          this.SendPropertyChanging();
3072          if ((previousValue != null))
3073          {
3074            this._Job.Entity = null;
3075            previousValue.StateLogs.Remove(this);
3076          }
3077          this._Job.Entity = value;
3078          if ((value != null))
3079          {
3080            value.StateLogs.Add(this);
3081            this._JobId = value.TaskId;
3082          }
3083          else
3084          {
3085            this._JobId = default(System.Guid);
3086          }
3087          this.SendPropertyChanged("Task");
3088        }
3089      }
3090    }
3091   
3092    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_Resource", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true)]
3093    public Resource Resource
3094    {
3095      get
3096      {
3097        return this._Resource.Entity;
3098      }
3099      set
3100      {
3101        Resource previousValue = this._Resource.Entity;
3102        if (((previousValue != value)
3103              || (this._Resource.HasLoadedOrAssignedValue == false)))
3104        {
3105          this.SendPropertyChanging();
3106          if ((previousValue != null))
3107          {
3108            this._Resource.Entity = null;
3109            previousValue.StateLogs.Remove(this);
3110          }
3111          this._Resource.Entity = value;
3112          if ((value != null))
3113          {
3114            value.StateLogs.Add(this);
3115            this._SlaveId = value.ResourceId;
3116          }
3117          else
3118          {
3119            this._SlaveId = default(Nullable<System.Guid>);
3120          }
3121          this.SendPropertyChanged("Resource");
3122        }
3123      }
3124    }
3125   
3126    public event PropertyChangingEventHandler PropertyChanging;
3127   
3128    public event PropertyChangedEventHandler PropertyChanged;
3129   
3130    protected virtual void SendPropertyChanging()
3131    {
3132      if ((this.PropertyChanging != null))
3133      {
3134        this.PropertyChanging(this, emptyChangingEventArgs);
3135      }
3136    }
3137   
3138    protected virtual void SendPropertyChanged(String propertyName)
3139    {
3140      if ((this.PropertyChanged != null))
3141      {
3142        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3143      }
3144    }
3145  }
3146 
3147  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JobPermission")]
3148  public partial class JobPermission : INotifyPropertyChanging, INotifyPropertyChanged
3149  {
3150   
3151    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3152   
3153    private System.Guid _HiveExperimentId;
3154   
3155    private System.Guid _GrantedUserId;
3156   
3157    private System.Guid _GrantedByUserId;
3158   
3159    private global::HeuristicLab.Services.Hive.DataAccess.Permission _Permission;
3160   
3161    private EntityRef<Job> _HiveExperiment;
3162   
3163    #region Extensibility Method Definitions
3164    partial void OnLoaded();
3165    partial void OnValidate(System.Data.Linq.ChangeAction action);
3166    partial void OnCreated();
3167    partial void OnJobIdChanging(System.Guid value);
3168    partial void OnJobIdChanged();
3169    partial void OnGrantedUserIdChanging(System.Guid value);
3170    partial void OnGrantedUserIdChanged();
3171    partial void OnGrantedByUserIdChanging(System.Guid value);
3172    partial void OnGrantedByUserIdChanged();
3173    partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.DataAccess.Permission value);
3174    partial void OnPermissionChanged();
3175    #endregion
3176   
3177    public JobPermission()
3178    {
3179      this._HiveExperiment = default(EntityRef<Job>);
3180      OnCreated();
3181    }
3182   
3183    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3184    public System.Guid JobId
3185    {
3186      get
3187      {
3188        return this._HiveExperimentId;
3189      }
3190      set
3191      {
3192        if ((this._HiveExperimentId != value))
3193        {
3194          if (this._HiveExperiment.HasLoadedOrAssignedValue)
3195          {
3196            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3197          }
3198          this.OnJobIdChanging(value);
3199          this.SendPropertyChanging();
3200          this._HiveExperimentId = value;
3201          this.SendPropertyChanged("JobId");
3202          this.OnJobIdChanged();
3203        }
3204      }
3205    }
3206   
3207    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3208    public System.Guid GrantedUserId
3209    {
3210      get
3211      {
3212        return this._GrantedUserId;
3213      }
3214      set
3215      {
3216        if ((this._GrantedUserId != value))
3217        {
3218          this.OnGrantedUserIdChanging(value);
3219          this.SendPropertyChanging();
3220          this._GrantedUserId = value;
3221          this.SendPropertyChanged("GrantedUserId");
3222          this.OnGrantedUserIdChanged();
3223        }
3224      }
3225    }
3226   
3227    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]
3228    public System.Guid GrantedByUserId
3229    {
3230      get
3231      {
3232        return this._GrantedByUserId;
3233      }
3234      set
3235      {
3236        if ((this._GrantedByUserId != value))
3237        {
3238          this.OnGrantedByUserIdChanging(value);
3239          this.SendPropertyChanging();
3240          this._GrantedByUserId = value;
3241          this.SendPropertyChanged("GrantedByUserId");
3242          this.OnGrantedByUserIdChanged();
3243        }
3244      }
3245    }
3246   
3247    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)]
3248    public global::HeuristicLab.Services.Hive.DataAccess.Permission Permission
3249    {
3250      get
3251      {
3252        return this._Permission;
3253      }
3254      set
3255      {
3256        if ((this._Permission != value))
3257        {
3258          this.OnPermissionChanging(value);
3259          this.SendPropertyChanging();
3260          this._Permission = value;
3261          this.SendPropertyChanged("Permission");
3262          this.OnPermissionChanged();
3263        }
3264      }
3265    }
3266   
3267    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
3268    public Job Job
3269    {
3270      get
3271      {
3272        return this._HiveExperiment.Entity;
3273      }
3274      set
3275      {
3276        Job previousValue = this._HiveExperiment.Entity;
3277        if (((previousValue != value)
3278              || (this._HiveExperiment.HasLoadedOrAssignedValue == false)))
3279        {
3280          this.SendPropertyChanging();
3281          if ((previousValue != null))
3282          {
3283            this._HiveExperiment.Entity = null;
3284            previousValue.JobPermissions.Remove(this);
3285          }
3286          this._HiveExperiment.Entity = value;
3287          if ((value != null))
3288          {
3289            value.JobPermissions.Add(this);
3290            this._HiveExperimentId = value.JobId;
3291          }
3292          else
3293          {
3294            this._HiveExperimentId = default(System.Guid);
3295          }
3296          this.SendPropertyChanged("Job");
3297        }
3298      }
3299    }
3300   
3301    public event PropertyChangingEventHandler PropertyChanging;
3302   
3303    public event PropertyChangedEventHandler PropertyChanged;
3304   
3305    protected virtual void SendPropertyChanging()
3306    {
3307      if ((this.PropertyChanging != null))
3308      {
3309        this.PropertyChanging(this, emptyChangingEventArgs);
3310      }
3311    }
3312   
3313    protected virtual void SendPropertyChanged(String propertyName)
3314    {
3315      if ((this.PropertyChanged != null))
3316      {
3317        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3318      }
3319    }
3320  }
3321 
3322  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3323  public partial class Lifecycle : INotifyPropertyChanging, INotifyPropertyChanged
3324  {
3325   
3326    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3327   
3328    private int _LifecycleId;
3329   
3330    private System.DateTime _LastCleanup;
3331   
3332    #region Extensibility Method Definitions
3333    partial void OnLoaded();
3334    partial void OnValidate(System.Data.Linq.ChangeAction action);
3335    partial void OnCreated();
3336    partial void OnLifecycleIdChanging(int value);
3337    partial void OnLifecycleIdChanged();
3338    partial void OnLastCleanupChanging(System.DateTime value);
3339    partial void OnLastCleanupChanged();
3340    #endregion
3341   
3342    public Lifecycle()
3343    {
3344      OnCreated();
3345    }
3346   
3347    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LifecycleId", DbType="Int", IsPrimaryKey=true)]
3348    public int LifecycleId
3349    {
3350      get
3351      {
3352        return this._LifecycleId;
3353      }
3354      set
3355      {
3356        if ((this._LifecycleId != value))
3357        {
3358          this.OnLifecycleIdChanging(value);
3359          this.SendPropertyChanging();
3360          this._LifecycleId = value;
3361          this.SendPropertyChanged("LifecycleId");
3362          this.OnLifecycleIdChanged();
3363        }
3364      }
3365    }
3366   
3367    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastCleanup", DbType="DateTime")]
3368    public System.DateTime LastCleanup
3369    {
3370      get
3371      {
3372        return this._LastCleanup;
3373      }
3374      set
3375      {
3376        if ((this._LastCleanup != value))
3377        {
3378          this.OnLastCleanupChanging(value);
3379          this.SendPropertyChanging();
3380          this._LastCleanup = value;
3381          this.SendPropertyChanged("LastCleanup");
3382          this.OnLastCleanupChanged();
3383        }
3384      }
3385    }
3386   
3387    public event PropertyChangingEventHandler PropertyChanging;
3388   
3389    public event PropertyChangedEventHandler PropertyChanged;
3390   
3391    protected virtual void SendPropertyChanging()
3392    {
3393      if ((this.PropertyChanging != null))
3394      {
3395        this.PropertyChanging(this, emptyChangingEventArgs);
3396      }
3397    }
3398   
3399    protected virtual void SendPropertyChanged(String propertyName)
3400    {
3401      if ((this.PropertyChanged != null))
3402      {
3403        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3404      }
3405    }
3406  }
3407 
3408  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3409  public partial class DeletedJobStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3410  {
3411   
3412    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3413   
3414    private System.Guid _UserId;
3415   
3416    private double _ExecutionTime;
3417   
3418    private double _ExecutionTimeFinishedJobs;
3419   
3420    private double _StartToEndTime;
3421   
3422    private System.Guid _DeletedJobStatisticsId;
3423   
3424    #region Extensibility Method Definitions
3425    partial void OnLoaded();
3426    partial void OnValidate(System.Data.Linq.ChangeAction action);
3427    partial void OnCreated();
3428    partial void OnUserIdChanging(System.Guid value);
3429    partial void OnUserIdChanged();
3430    partial void OnExecutionTimeSChanging(double value);
3431    partial void OnExecutionTimeSChanged();
3432    partial void OnExecutionTimeSFinishedJobsChanging(double value);
3433    partial void OnExecutionTimeSFinishedJobsChanged();
3434    partial void OnStartToEndTimeSChanging(double value);
3435    partial void OnStartToEndTimeSChanged();
3436    partial void OnDeletedJobStatisticsIdChanging(System.Guid value);
3437    partial void OnDeletedJobStatisticsIdChanged();
3438    #endregion
3439   
3440    public DeletedJobStatistics()
3441    {
3442      OnCreated();
3443    }
3444   
3445    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
3446    public System.Guid UserId
3447    {
3448      get
3449      {
3450        return this._UserId;
3451      }
3452      set
3453      {
3454        if ((this._UserId != value))
3455        {
3456          this.OnUserIdChanging(value);
3457          this.SendPropertyChanging();
3458          this._UserId = value;
3459          this.SendPropertyChanged("UserId");
3460          this.OnUserIdChanged();
3461        }
3462      }
3463    }
3464   
3465    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
3466    public double ExecutionTimeS
3467    {
3468      get
3469      {
3470        return this._ExecutionTime;
3471      }
3472      set
3473      {
3474        if ((this._ExecutionTime != value))
3475        {
3476          this.OnExecutionTimeSChanging(value);
3477          this.SendPropertyChanging();
3478          this._ExecutionTime = value;
3479          this.SendPropertyChanged("ExecutionTimeS");
3480          this.OnExecutionTimeSChanged();
3481        }
3482      }
3483    }
3484   
3485    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
3486    public double ExecutionTimeSFinishedJobs
3487    {
3488      get
3489      {
3490        return this._ExecutionTimeFinishedJobs;
3491      }
3492      set
3493      {
3494        if ((this._ExecutionTimeFinishedJobs != value))
3495        {
3496          this.OnExecutionTimeSFinishedJobsChanging(value);
3497          this.SendPropertyChanging();
3498          this._ExecutionTimeFinishedJobs = value;
3499          this.SendPropertyChanged("ExecutionTimeSFinishedJobs");
3500          this.OnExecutionTimeSFinishedJobsChanged();
3501        }
3502      }
3503    }
3504   
3505    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
3506    public double StartToEndTimeS
3507    {
3508      get
3509      {
3510        return this._StartToEndTime;
3511      }
3512      set
3513      {
3514        if ((this._StartToEndTime != value))
3515        {
3516          this.OnStartToEndTimeSChanging(value);
3517          this.SendPropertyChanging();
3518          this._StartToEndTime = value;
3519          this.SendPropertyChanged("StartToEndTimeS");
3520          this.OnStartToEndTimeSChanged();
3521        }
3522      }
3523    }
3524   
3525    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeletedJobStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
3526    public System.Guid DeletedJobStatisticsId
3527    {
3528      get
3529      {
3530        return this._DeletedJobStatisticsId;
3531      }
3532      set
3533      {
3534        if ((this._DeletedJobStatisticsId != value))
3535        {
3536          this.OnDeletedJobStatisticsIdChanging(value);
3537          this.SendPropertyChanging();
3538          this._DeletedJobStatisticsId = value;
3539          this.SendPropertyChanged("DeletedJobStatisticsId");
3540          this.OnDeletedJobStatisticsIdChanged();
3541        }
3542      }
3543    }
3544   
3545    public event PropertyChangingEventHandler PropertyChanging;
3546   
3547    public event PropertyChangedEventHandler PropertyChanged;
3548   
3549    protected virtual void SendPropertyChanging()
3550    {
3551      if ((this.PropertyChanging != null))
3552      {
3553        this.PropertyChanging(this, emptyChangingEventArgs);
3554      }
3555    }
3556   
3557    protected virtual void SendPropertyChanged(String propertyName)
3558    {
3559      if ((this.PropertyChanged != null))
3560      {
3561        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3562      }
3563    }
3564  }
3565 
3566  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3567  public partial class UserStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3568  {
3569   
3570    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3571   
3572    private System.Guid _StatisticsId;
3573   
3574    private System.Guid _UserId;
3575   
3576    private double _ExecutionTime;
3577   
3578    private int _CoresUsed;
3579   
3580    private double _ExecutionTimeFinishedJobs;
3581   
3582    private double _StartToEndTime;
3583   
3584    private EntityRef<Statistics> _Statistics;
3585   
3586    #region Extensibility Method Definitions
3587    partial void OnLoaded();
3588    partial void OnValidate(System.Data.Linq.ChangeAction action);
3589    partial void OnCreated();
3590    partial void OnStatisticsIdChanging(System.Guid value);
3591    partial void OnStatisticsIdChanged();
3592    partial void OnUserIdChanging(System.Guid value);
3593    partial void OnUserIdChanged();
3594    partial void OnExecutionTimeMsChanging(double value);
3595    partial void OnExecutionTimeMsChanged();
3596    partial void OnUsedCoresChanging(int value);
3597    partial void OnUsedCoresChanged();
3598    partial void OnExecutionTimeMsFinishedJobsChanging(double value);
3599    partial void OnExecutionTimeMsFinishedJobsChanged();
3600    partial void OnStartToEndTimeMsChanging(double value);
3601    partial void OnStartToEndTimeMsChanged();
3602    #endregion
3603   
3604    public UserStatistics()
3605    {
3606      this._Statistics = default(EntityRef<Statistics>);
3607      OnCreated();
3608    }
3609   
3610    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3611    public System.Guid StatisticsId
3612    {
3613      get
3614      {
3615        return this._StatisticsId;
3616      }
3617      set
3618      {
3619        if ((this._StatisticsId != value))
3620        {
3621          if (this._Statistics.HasLoadedOrAssignedValue)
3622          {
3623            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3624          }
3625          this.OnStatisticsIdChanging(value);
3626          this.SendPropertyChanging();
3627          this._StatisticsId = value;
3628          this.SendPropertyChanged("StatisticsId");
3629          this.OnStatisticsIdChanged();
3630        }
3631      }
3632    }
3633   
3634    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3635    public System.Guid UserId
3636    {
3637      get
3638      {
3639        return this._UserId;
3640      }
3641      set
3642      {
3643        if ((this._UserId != value))
3644        {
3645          this.OnUserIdChanging(value);
3646          this.SendPropertyChanging();
3647          this._UserId = value;
3648          this.SendPropertyChanged("UserId");
3649          this.OnUserIdChanged();
3650        }
3651      }
3652    }
3653   
3654    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
3655    public double ExecutionTimeMs
3656    {
3657      get
3658      {
3659        return this._ExecutionTime;
3660      }
3661      set
3662      {
3663        if ((this._ExecutionTime != value))
3664        {
3665          this.OnExecutionTimeMsChanging(value);
3666          this.SendPropertyChanging();
3667          this._ExecutionTime = value;
3668          this.SendPropertyChanged("ExecutionTimeMs");
3669          this.OnExecutionTimeMsChanged();
3670        }
3671      }
3672    }
3673   
3674    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresUsed", DbType="Int NOT NULL")]
3675    public int UsedCores
3676    {
3677      get
3678      {
3679        return this._CoresUsed;
3680      }
3681      set
3682      {
3683        if ((this._CoresUsed != value))
3684        {
3685          this.OnUsedCoresChanging(value);
3686          this.SendPropertyChanging();
3687          this._CoresUsed = value;
3688          this.SendPropertyChanged("UsedCores");
3689          this.OnUsedCoresChanged();
3690        }
3691      }
3692    }
3693   
3694    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
3695    public double ExecutionTimeMsFinishedJobs
3696    {
3697      get
3698      {
3699        return this._ExecutionTimeFinishedJobs;
3700      }
3701      set
3702      {
3703        if ((this._ExecutionTimeFinishedJobs != value))
3704        {
3705          this.OnExecutionTimeMsFinishedJobsChanging(value);
3706          this.SendPropertyChanging();
3707          this._ExecutionTimeFinishedJobs = value;
3708          this.SendPropertyChanged("ExecutionTimeMsFinishedJobs");
3709          this.OnExecutionTimeMsFinishedJobsChanged();
3710        }
3711      }
3712    }
3713   
3714    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
3715    public double StartToEndTimeMs
3716    {
3717      get
3718      {
3719        return this._StartToEndTime;
3720      }
3721      set
3722      {
3723        if ((this._StartToEndTime != value))
3724        {
3725          this.OnStartToEndTimeMsChanging(value);
3726          this.SendPropertyChanging();
3727          this._StartToEndTime = value;
3728          this.SendPropertyChanged("StartToEndTimeMs");
3729          this.OnStartToEndTimeMsChanged();
3730        }
3731      }
3732    }
3733   
3734    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_UserStatistics", Storage="_Statistics", ThisKey="StatisticsId", OtherKey="StatisticsId", IsForeignKey=true)]
3735    public Statistics Statistics
3736    {
3737      get
3738      {
3739        return this._Statistics.Entity;
3740      }
3741      set
3742      {
3743        Statistics previousValue = this._Statistics.Entity;
3744        if (((previousValue != value)
3745              || (this._Statistics.HasLoadedOrAssignedValue == false)))
3746        {
3747          this.SendPropertyChanging();
3748          if ((previousValue != null))
3749          {
3750            this._Statistics.Entity = null;
3751            previousValue.UserStatistics.Remove(this);
3752          }
3753          this._Statistics.Entity = value;
3754          if ((value != null))
3755          {
3756            value.UserStatistics.Add(this);
3757            this._StatisticsId = value.StatisticsId;
3758          }
3759          else
3760          {
3761            this._StatisticsId = default(System.Guid);
3762          }
3763          this.SendPropertyChanged("Statistics");
3764        }
3765      }
3766    }
3767   
3768    public event PropertyChangingEventHandler PropertyChanging;
3769   
3770    public event PropertyChangedEventHandler PropertyChanged;
3771   
3772    protected virtual void SendPropertyChanging()
3773    {
3774      if ((this.PropertyChanging != null))
3775      {
3776        this.PropertyChanging(this, emptyChangingEventArgs);
3777      }
3778    }
3779   
3780    protected virtual void SendPropertyChanged(String propertyName)
3781    {
3782      if ((this.PropertyChanged != null))
3783      {
3784        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3785      }
3786    }
3787  }
3788 
3789  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
3790  public partial class SlaveStatistics : INotifyPropertyChanging, INotifyPropertyChanged
3791  {
3792   
3793    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3794   
3795    private System.Guid _StatisticsId;
3796   
3797    private System.Guid _SlaveId;
3798   
3799    private int _Cores;
3800   
3801    private int _FreeCores;
3802   
3803    private double _CpuUtilization;
3804   
3805    private int _Memory;
3806   
3807    private int _FreeMemory;
3808   
3809    private EntityRef<Statistics> _Statistics;
3810   
3811    #region Extensibility Method Definitions
3812    partial void OnLoaded();
3813    partial void OnValidate(System.Data.Linq.ChangeAction action);
3814    partial void OnCreated();
3815    partial void OnStatisticsIdChanging(System.Guid value);
3816    partial void OnStatisticsIdChanged();
3817    partial void OnSlaveIdChanging(System.Guid value);
3818    partial void OnSlaveIdChanged();
3819    partial void OnCoresChanging(int value);
3820    partial void OnCoresChanged();
3821    partial void OnFreeCoresChanging(int value);
3822    partial void OnFreeCoresChanged();
3823    partial void OnCpuUtilizationChanging(double value);
3824    partial void OnCpuUtilizationChanged();
3825    partial void OnMemoryChanging(int value);
3826    partial void OnMemoryChanged();
3827    partial void OnFreeMemoryChanging(int value);
3828    partial void OnFreeMemoryChanged();
3829    #endregion
3830   
3831    public SlaveStatistics()
3832    {
3833      this._Statistics = default(EntityRef<Statistics>);
3834      OnCreated();
3835    }
3836   
3837    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3838    public System.Guid StatisticsId
3839    {
3840      get
3841      {
3842        return this._StatisticsId;
3843      }
3844      set
3845      {
3846        if ((this._StatisticsId != value))
3847        {
3848          if (this._Statistics.HasLoadedOrAssignedValue)
3849          {
3850            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3851          }
3852          this.OnStatisticsIdChanging(value);
3853          this.SendPropertyChanging();
3854          this._StatisticsId = value;
3855          this.SendPropertyChanged("StatisticsId");
3856          this.OnStatisticsIdChanged();
3857        }
3858      }
3859    }
3860   
3861    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
3862    public System.Guid SlaveId
3863    {
3864      get
3865      {
3866        return this._SlaveId;
3867      }
3868      set
3869      {
3870        if ((this._SlaveId != value))
3871        {
3872          this.OnSlaveIdChanging(value);
3873          this.SendPropertyChanging();
3874          this._SlaveId = value;
3875          this.SendPropertyChanged("SlaveId");
3876          this.OnSlaveIdChanged();
3877        }
3878      }
3879    }
3880   
3881    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cores", DbType="Int NOT NULL")]
3882    public int Cores
3883    {
3884      get
3885      {
3886        return this._Cores;
3887      }
3888      set
3889      {
3890        if ((this._Cores != value))
3891        {
3892          this.OnCoresChanging(value);
3893          this.SendPropertyChanging();
3894          this._Cores = value;
3895          this.SendPropertyChanged("Cores");
3896          this.OnCoresChanged();
3897        }
3898      }
3899    }
3900   
3901    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeCores", DbType="Int NOT NULL")]
3902    public int FreeCores
3903    {
3904      get
3905      {
3906        return this._FreeCores;
3907      }
3908      set
3909      {
3910        if ((this._FreeCores != value))
3911        {
3912          this.OnFreeCoresChanging(value);
3913          this.SendPropertyChanging();
3914          this._FreeCores = value;
3915          this.SendPropertyChanged("FreeCores");
3916          this.OnFreeCoresChanged();
3917        }
3918      }
3919    }
3920   
3921    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuUtilization", DbType="float NOT NULL")]
3922    public double CpuUtilization
3923    {
3924      get
3925      {
3926        return this._CpuUtilization;
3927      }
3928      set
3929      {
3930        if ((this._CpuUtilization != value))
3931        {
3932          this.OnCpuUtilizationChanging(value);
3933          this.SendPropertyChanging();
3934          this._CpuUtilization = value;
3935          this.SendPropertyChanged("CpuUtilization");
3936          this.OnCpuUtilizationChanged();
3937        }
3938      }
3939    }
3940   
3941    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int NOT NULL")]
3942    public int Memory
3943    {
3944      get
3945      {
3946        return this._Memory;
3947      }
3948      set
3949      {
3950        if ((this._Memory != value))
3951        {
3952          this.OnMemoryChanging(value);
3953          this.SendPropertyChanging();
3954          this._Memory = value;
3955          this.SendPropertyChanged("Memory");
3956          this.OnMemoryChanged();
3957        }
3958      }
3959    }
3960   
3961    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int NOT NULL")]
3962    public int FreeMemory
3963    {
3964      get
3965      {
3966        return this._FreeMemory;
3967      }
3968      set
3969      {
3970        if ((this._FreeMemory != value))
3971        {
3972          this.OnFreeMemoryChanging(value);
3973          this.SendPropertyChanging();
3974          this._FreeMemory = value;
3975          this.SendPropertyChanged("FreeMemory");
3976          this.OnFreeMemoryChanged();
3977        }
3978      }
3979    }
3980   
3981    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_SlaveStatistics", Storage="_Statistics", ThisKey="StatisticsId", OtherKey="StatisticsId", IsForeignKey=true)]
3982    public Statistics Statistics
3983    {
3984      get
3985      {
3986        return this._Statistics.Entity;
3987      }
3988      set
3989      {
3990        Statistics previousValue = this._Statistics.Entity;
3991        if (((previousValue != value)
3992              || (this._Statistics.HasLoadedOrAssignedValue == false)))
3993        {
3994          this.SendPropertyChanging();
3995          if ((previousValue != null))
3996          {
3997            this._Statistics.Entity = null;
3998            previousValue.SlaveStatistics.Remove(this);
3999          }
4000          this._Statistics.Entity = value;
4001          if ((value != null))
4002          {
4003            value.SlaveStatistics.Add(this);
4004            this._StatisticsId = value.StatisticsId;
4005          }
4006          else
4007          {
4008            this._StatisticsId = default(System.Guid);
4009          }
4010          this.SendPropertyChanged("Statistics");
4011        }
4012      }
4013    }
4014   
4015    public event PropertyChangingEventHandler PropertyChanging;
4016   
4017    public event PropertyChangedEventHandler PropertyChanged;
4018   
4019    protected virtual void SendPropertyChanging()
4020    {
4021      if ((this.PropertyChanging != null))
4022      {
4023        this.PropertyChanging(this, emptyChangingEventArgs);
4024      }
4025    }
4026   
4027    protected virtual void SendPropertyChanged(String propertyName)
4028    {
4029      if ((this.PropertyChanged != null))
4030      {
4031        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4032      }
4033    }
4034  }
4035 
4036  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
4037  public partial class Statistics : INotifyPropertyChanging, INotifyPropertyChanged
4038  {
4039   
4040    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
4041   
4042    private System.Guid _StatisticsId;
4043   
4044    private System.DateTime _Timestamp;
4045   
4046    private EntitySet<UserStatistics> _UserStatistics;
4047   
4048    private EntitySet<SlaveStatistics> _SlaveStatistics;
4049   
4050    #region Extensibility Method Definitions
4051    partial void OnLoaded();
4052    partial void OnValidate(System.Data.Linq.ChangeAction action);
4053    partial void OnCreated();
4054    partial void OnStatisticsIdChanging(System.Guid value);
4055    partial void OnStatisticsIdChanged();
4056    partial void OnTimestampChanging(System.DateTime value);
4057    partial void OnTimestampChanged();
4058    #endregion
4059   
4060    public Statistics()
4061    {
4062      this._UserStatistics = new EntitySet<UserStatistics>(new Action<UserStatistics>(this.attach_UserStatistics), new Action<UserStatistics>(this.detach_UserStatistics));
4063      this._SlaveStatistics = new EntitySet<SlaveStatistics>(new Action<SlaveStatistics>(this.attach_SlaveStatistics), new Action<SlaveStatistics>(this.detach_SlaveStatistics));
4064      OnCreated();
4065    }
4066   
4067    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
4068    public System.Guid StatisticsId
4069    {
4070      get
4071      {
4072        return this._StatisticsId;
4073      }
4074      set
4075      {
4076        if ((this._StatisticsId != value))
4077        {
4078          this.OnStatisticsIdChanging(value);
4079          this.SendPropertyChanging();
4080          this._StatisticsId = value;
4081          this.SendPropertyChanged("StatisticsId");
4082          this.OnStatisticsIdChanged();
4083        }
4084      }
4085    }
4086   
4087    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Timestamp")]
4088    public System.DateTime Timestamp
4089    {
4090      get
4091      {
4092        return this._Timestamp;
4093      }
4094      set
4095      {
4096        if ((this._Timestamp != value))
4097        {
4098          this.OnTimestampChanging(value);
4099          this.SendPropertyChanging();
4100          this._Timestamp = value;
4101          this.SendPropertyChanged("Timestamp");
4102          this.OnTimestampChanged();
4103        }
4104      }
4105    }
4106   
4107    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_UserStatistics", Storage="_UserStatistics", ThisKey="StatisticsId", OtherKey="StatisticsId")]
4108    public EntitySet<UserStatistics> UserStatistics
4109    {
4110      get
4111      {
4112        return this._UserStatistics;
4113      }
4114      set
4115      {
4116        this._UserStatistics.Assign(value);
4117      }
4118    }
4119   
4120    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Statistics_SlaveStatistics", Storage="_SlaveStatistics", ThisKey="StatisticsId", OtherKey="StatisticsId")]
4121    public EntitySet<SlaveStatistics> SlaveStatistics
4122    {
4123      get
4124      {
4125        return this._SlaveStatistics;
4126      }
4127      set
4128      {
4129        this._SlaveStatistics.Assign(value);
4130      }
4131    }
4132   
4133    public event PropertyChangingEventHandler PropertyChanging;
4134   
4135    public event PropertyChangedEventHandler PropertyChanged;
4136   
4137    protected virtual void SendPropertyChanging()
4138    {
4139      if ((this.PropertyChanging != null))
4140      {
4141        this.PropertyChanging(this, emptyChangingEventArgs);
4142      }
4143    }
4144   
4145    protected virtual void SendPropertyChanged(String propertyName)
4146    {
4147      if ((this.PropertyChanged != null))
4148      {
4149        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
4150      }
4151    }
4152   
4153    private void attach_UserStatistics(UserStatistics entity)
4154    {
4155      this.SendPropertyChanging();
4156      entity.Statistics = this;
4157    }
4158   
4159    private void detach_UserStatistics(UserStatistics entity)
4160    {
4161      this.SendPropertyChanging();
4162      entity.Statistics = null;
4163    }
4164   
4165    private void attach_SlaveStatistics(SlaveStatistics entity)
4166    {
4167      this.SendPropertyChanging();
4168      entity.Statistics = this;
4169    }
4170   
4171    private void detach_SlaveStatistics(SlaveStatistics entity)
4172    {
4173      this.SendPropertyChanging();
4174      entity.Statistics = null;
4175    }
4176  }
4177}
4178#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.