Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 6452 was 6452, checked in by cneumuel, 13 years ago

#1233

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