Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs @ 6717

Last change on this file since 6717 was 6717, checked in by ascheibe, 13 years ago

#1233

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