Free cookie consent management tool by TermsFeed Policy Generator

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

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

#1860:

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