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 @ 5404

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

#1233

  • changed the workflow of aquireing a new job from server.
    • if a job is available for calculation, the slave receives the jobId already with the heartbeats. The job is then exclusively assigned to this slave.
  • extended the metainfo for a slave by OperatingSystem and CpuArchitecture
  • enhanced the way plugin-dependencies are discovered by using the types used by XmlGenerator. Now only mimimum amount of plugins are transferred.
  • selection of waiting jobs now consideres assigned slave-group
  • more unit tests for service
  • added unit tests for experiment manager
File size: 70.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.208
6//
7//     Changes to this file may cause incorrect behavior and will be lost if
8//     the code is regenerated.
9// </auto-generated>
10//------------------------------------------------------------------------------
11
12namespace HeuristicLab.Services.Hive.DataAccess
13{
14  using System.Data.Linq;
15  using System.Data.Linq.Mapping;
16  using System.Data;
17  using System.Collections.Generic;
18  using System.Reflection;
19  using System.Linq;
20  using System.Linq.Expressions;
21  using System.ComponentModel;
22  using System;
23 
24 
25  [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.Hive")]
26  public partial class HiveDataContext : System.Data.Linq.DataContext
27  {
28   
29    private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
30   
31    #region Extensibility Method Definitions
32    partial void OnCreated();
33    partial void InsertAssignedResource(AssignedResource instance);
34    partial void UpdateAssignedResource(AssignedResource instance);
35    partial void DeleteAssignedResource(AssignedResource instance);
36    partial void InsertPlugin(Plugin instance);
37    partial void UpdatePlugin(Plugin instance);
38    partial void DeletePlugin(Plugin instance);
39    partial void InsertRequiredPlugin(RequiredPlugin instance);
40    partial void UpdateRequiredPlugin(RequiredPlugin instance);
41    partial void DeleteRequiredPlugin(RequiredPlugin instance);
42    partial void InsertResource(Resource instance);
43    partial void UpdateResource(Resource instance);
44    partial void DeleteResource(Resource instance);
45    partial void InsertJob(Job instance);
46    partial void UpdateJob(Job instance);
47    partial void DeleteJob(Job instance);
48    partial void InsertUptimeCalendar(UptimeCalendar instance);
49    partial void UpdateUptimeCalendar(UptimeCalendar instance);
50    partial void DeleteUptimeCalendar(UptimeCalendar instance);
51    partial void InsertHiveExperiment(HiveExperiment instance);
52    partial void UpdateHiveExperiment(HiveExperiment instance);
53    partial void DeleteHiveExperiment(HiveExperiment instance);
54    partial void InsertJobData(JobData instance);
55    partial void UpdateJobData(JobData instance);
56    partial void DeleteJobData(JobData instance);
57    partial void InsertPluginData(PluginData instance);
58    partial void UpdatePluginData(PluginData instance);
59    partial void DeletePluginData(PluginData instance);
60    #endregion
61   
62    public HiveDataContext(string connection) :
63        base(connection, mappingSource)
64    {
65      OnCreated();
66    }
67   
68    public HiveDataContext(System.Data.IDbConnection connection) :
69        base(connection, mappingSource)
70    {
71      OnCreated();
72    }
73   
74    public HiveDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
75        base(connection, mappingSource)
76    {
77      OnCreated();
78    }
79   
80    public HiveDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
81        base(connection, mappingSource)
82    {
83      OnCreated();
84    }
85   
86    public System.Data.Linq.Table<AssignedResource> AssignedResources
87    {
88      get
89      {
90        return this.GetTable<AssignedResource>();
91      }
92    }
93   
94    public System.Data.Linq.Table<Plugin> Plugins
95    {
96      get
97      {
98        return this.GetTable<Plugin>();
99      }
100    }
101   
102    public System.Data.Linq.Table<RequiredPlugin> RequiredPlugins
103    {
104      get
105      {
106        return this.GetTable<RequiredPlugin>();
107      }
108    }
109   
110    public System.Data.Linq.Table<Resource> Resources
111    {
112      get
113      {
114        return this.GetTable<Resource>();
115      }
116    }
117   
118    public System.Data.Linq.Table<Job> Jobs
119    {
120      get
121      {
122        return this.GetTable<Job>();
123      }
124    }
125   
126    public System.Data.Linq.Table<UptimeCalendar> UptimeCalendars
127    {
128      get
129      {
130        return this.GetTable<UptimeCalendar>();
131      }
132    }
133   
134    public System.Data.Linq.Table<HiveExperiment> HiveExperiments
135    {
136      get
137      {
138        return this.GetTable<HiveExperiment>();
139      }
140    }
141   
142    public System.Data.Linq.Table<JobData> JobDatas
143    {
144      get
145      {
146        return this.GetTable<JobData>();
147      }
148    }
149   
150    public System.Data.Linq.Table<PluginData> PluginDatas
151    {
152      get
153      {
154        return this.GetTable<PluginData>();
155      }
156    }
157  }
158 
159  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedResources")]
160  public partial class AssignedResource : INotifyPropertyChanging, INotifyPropertyChanged
161  {
162   
163    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
164   
165    private System.Guid _ResourceId;
166   
167    private System.Guid _JobId;
168   
169    private System.Guid _AssignedRessourcesId;
170   
171    private EntityRef<Resource> _Resource;
172   
173    private EntityRef<Job> _Job;
174   
175    #region Extensibility Method Definitions
176    partial void OnLoaded();
177    partial void OnValidate(System.Data.Linq.ChangeAction action);
178    partial void OnCreated();
179    partial void OnResourceIdChanging(System.Guid value);
180    partial void OnResourceIdChanged();
181    partial void OnJobIdChanging(System.Guid value);
182    partial void OnJobIdChanged();
183    partial void OnAssignedRessourcesIdChanging(System.Guid value);
184    partial void OnAssignedRessourcesIdChanged();
185    #endregion
186   
187    public AssignedResource()
188    {
189      this._Resource = default(EntityRef<Resource>);
190      this._Job = default(EntityRef<Job>);
191      OnCreated();
192    }
193   
194    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
195    public System.Guid ResourceId
196    {
197      get
198      {
199        return this._ResourceId;
200      }
201      set
202      {
203        if ((this._ResourceId != value))
204        {
205          if (this._Resource.HasLoadedOrAssignedValue)
206          {
207            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
208          }
209          this.OnResourceIdChanging(value);
210          this.SendPropertyChanging();
211          this._ResourceId = value;
212          this.SendPropertyChanged("ResourceId");
213          this.OnResourceIdChanged();
214        }
215      }
216    }
217   
218    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
219    public System.Guid JobId
220    {
221      get
222      {
223        return this._JobId;
224      }
225      set
226      {
227        if ((this._JobId != value))
228        {
229          if (this._Job.HasLoadedOrAssignedValue)
230          {
231            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
232          }
233          this.OnJobIdChanging(value);
234          this.SendPropertyChanging();
235          this._JobId = value;
236          this.SendPropertyChanged("JobId");
237          this.OnJobIdChanged();
238        }
239      }
240    }
241   
242    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AssignedRessourcesId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
243    public System.Guid AssignedRessourcesId
244    {
245      get
246      {
247        return this._AssignedRessourcesId;
248      }
249      set
250      {
251        if ((this._AssignedRessourcesId != value))
252        {
253          this.OnAssignedRessourcesIdChanging(value);
254          this.SendPropertyChanging();
255          this._AssignedRessourcesId = value;
256          this.SendPropertyChanged("AssignedRessourcesId");
257          this.OnAssignedRessourcesIdChanged();
258        }
259      }
260    }
261   
262    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
263    public Resource Resource
264    {
265      get
266      {
267        return this._Resource.Entity;
268      }
269      set
270      {
271        Resource previousValue = this._Resource.Entity;
272        if (((previousValue != value)
273              || (this._Resource.HasLoadedOrAssignedValue == false)))
274        {
275          this.SendPropertyChanging();
276          if ((previousValue != null))
277          {
278            this._Resource.Entity = null;
279            previousValue.AssignedResources.Remove(this);
280          }
281          this._Resource.Entity = value;
282          if ((value != null))
283          {
284            value.AssignedResources.Add(this);
285            this._ResourceId = value.ResourceId;
286          }
287          else
288          {
289            this._ResourceId = default(System.Guid);
290          }
291          this.SendPropertyChanged("Resource");
292        }
293      }
294    }
295   
296    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")]
297    public Job Job
298    {
299      get
300      {
301        return this._Job.Entity;
302      }
303      set
304      {
305        Job previousValue = this._Job.Entity;
306        if (((previousValue != value)
307              || (this._Job.HasLoadedOrAssignedValue == false)))
308        {
309          this.SendPropertyChanging();
310          if ((previousValue != null))
311          {
312            this._Job.Entity = null;
313            previousValue.AssignedResources.Remove(this);
314          }
315          this._Job.Entity = value;
316          if ((value != null))
317          {
318            value.AssignedResources.Add(this);
319            this._JobId = value.JobId;
320          }
321          else
322          {
323            this._JobId = default(System.Guid);
324          }
325          this.SendPropertyChanged("Job");
326        }
327      }
328    }
329   
330    public event PropertyChangingEventHandler PropertyChanging;
331   
332    public event PropertyChangedEventHandler PropertyChanged;
333   
334    protected virtual void SendPropertyChanging()
335    {
336      if ((this.PropertyChanging != null))
337      {
338        this.PropertyChanging(this, emptyChangingEventArgs);
339      }
340    }
341   
342    protected virtual void SendPropertyChanged(String propertyName)
343    {
344      if ((this.PropertyChanged != null))
345      {
346        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
347      }
348    }
349  }
350 
351  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Plugin")]
352  public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged
353  {
354   
355    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
356   
357    private System.Guid _PluginId;
358   
359    private string _Name;
360   
361    private string _Version;
362   
363    private bool _IsLocal;
364   
365    private System.Guid _UserId;
366   
367    private System.DateTime _DateCreated;
368   
369    private EntitySet<RequiredPlugin> _RequiredPlugins;
370   
371    private EntitySet<PluginData> _PluginData;
372   
373    #region Extensibility Method Definitions
374    partial void OnLoaded();
375    partial void OnValidate(System.Data.Linq.ChangeAction action);
376    partial void OnCreated();
377    partial void OnPluginIdChanging(System.Guid value);
378    partial void OnPluginIdChanged();
379    partial void OnNameChanging(string value);
380    partial void OnNameChanged();
381    partial void OnVersionChanging(string value);
382    partial void OnVersionChanged();
383    partial void OnIsLocalChanging(bool value);
384    partial void OnIsLocalChanged();
385    partial void OnUserIdChanging(System.Guid value);
386    partial void OnUserIdChanged();
387    partial void OnDateCreatedChanging(System.DateTime value);
388    partial void OnDateCreatedChanged();
389    #endregion
390   
391    public Plugin()
392    {
393      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
394      this._PluginData = new EntitySet<PluginData>(new Action<PluginData>(this.attach_PluginData), new Action<PluginData>(this.detach_PluginData));
395      OnCreated();
396    }
397   
398    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
399    public System.Guid PluginId
400    {
401      get
402      {
403        return this._PluginId;
404      }
405      set
406      {
407        if ((this._PluginId != value))
408        {
409          this.OnPluginIdChanging(value);
410          this.SendPropertyChanging();
411          this._PluginId = value;
412          this.SendPropertyChanged("PluginId");
413          this.OnPluginIdChanged();
414        }
415      }
416    }
417   
418    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
419    public string Name
420    {
421      get
422      {
423        return this._Name;
424      }
425      set
426      {
427        if ((this._Name != value))
428        {
429          this.OnNameChanging(value);
430          this.SendPropertyChanging();
431          this._Name = value;
432          this.SendPropertyChanged("Name");
433          this.OnNameChanged();
434        }
435      }
436    }
437   
438    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Version", DbType="VarChar(MAX)", CanBeNull=false)]
439    public string Version
440    {
441      get
442      {
443        return this._Version;
444      }
445      set
446      {
447        if ((this._Version != value))
448        {
449          this.OnVersionChanging(value);
450          this.SendPropertyChanging();
451          this._Version = value;
452          this.SendPropertyChanged("Version");
453          this.OnVersionChanged();
454        }
455      }
456    }
457   
458    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsLocal", DbType="Bit")]
459    public bool IsLocal
460    {
461      get
462      {
463        return this._IsLocal;
464      }
465      set
466      {
467        if ((this._IsLocal != value))
468        {
469          this.OnIsLocalChanging(value);
470          this.SendPropertyChanging();
471          this._IsLocal = value;
472          this.SendPropertyChanged("IsLocal");
473          this.OnIsLocalChanged();
474        }
475      }
476    }
477   
478    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
479    public System.Guid UserId
480    {
481      get
482      {
483        return this._UserId;
484      }
485      set
486      {
487        if ((this._UserId != value))
488        {
489          this.OnUserIdChanging(value);
490          this.SendPropertyChanging();
491          this._UserId = value;
492          this.SendPropertyChanged("UserId");
493          this.OnUserIdChanged();
494        }
495      }
496    }
497   
498    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
499    public System.DateTime DateCreated
500    {
501      get
502      {
503        return this._DateCreated;
504      }
505      set
506      {
507        if ((this._DateCreated != value))
508        {
509          this.OnDateCreatedChanging(value);
510          this.SendPropertyChanging();
511          this._DateCreated = value;
512          this.SendPropertyChanged("DateCreated");
513          this.OnDateCreatedChanged();
514        }
515      }
516    }
517   
518    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
519    public EntitySet<RequiredPlugin> RequiredPlugins
520    {
521      get
522      {
523        return this._RequiredPlugins;
524      }
525      set
526      {
527        this._RequiredPlugins.Assign(value);
528      }
529    }
530   
531    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_PluginData", ThisKey="PluginId", OtherKey="PluginId")]
532    public EntitySet<PluginData> PluginData
533    {
534      get
535      {
536        return this._PluginData;
537      }
538      set
539      {
540        this._PluginData.Assign(value);
541      }
542    }
543   
544    public event PropertyChangingEventHandler PropertyChanging;
545   
546    public event PropertyChangedEventHandler PropertyChanged;
547   
548    protected virtual void SendPropertyChanging()
549    {
550      if ((this.PropertyChanging != null))
551      {
552        this.PropertyChanging(this, emptyChangingEventArgs);
553      }
554    }
555   
556    protected virtual void SendPropertyChanged(String propertyName)
557    {
558      if ((this.PropertyChanged != null))
559      {
560        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
561      }
562    }
563   
564    private void attach_RequiredPlugins(RequiredPlugin entity)
565    {
566      this.SendPropertyChanging();
567      entity.Plugin = this;
568    }
569   
570    private void detach_RequiredPlugins(RequiredPlugin entity)
571    {
572      this.SendPropertyChanging();
573      entity.Plugin = null;
574    }
575   
576    private void attach_PluginData(PluginData entity)
577    {
578      this.SendPropertyChanging();
579      entity.Plugin = this;
580    }
581   
582    private void detach_PluginData(PluginData entity)
583    {
584      this.SendPropertyChanging();
585      entity.Plugin = null;
586    }
587  }
588 
589  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RequiredPlugins")]
590  public partial class RequiredPlugin : INotifyPropertyChanging, INotifyPropertyChanged
591  {
592   
593    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
594   
595    private System.Guid _RequiredPluginId;
596   
597    private System.Guid _JobId;
598   
599    private System.Guid _PluginId;
600   
601    private EntityRef<Plugin> _PluginInfo;
602   
603    private EntityRef<Job> _Job;
604   
605    #region Extensibility Method Definitions
606    partial void OnLoaded();
607    partial void OnValidate(System.Data.Linq.ChangeAction action);
608    partial void OnCreated();
609    partial void OnRequiredPluginIdChanging(System.Guid value);
610    partial void OnRequiredPluginIdChanged();
611    partial void OnJobIdChanging(System.Guid value);
612    partial void OnJobIdChanged();
613    partial void OnPluginIdChanging(System.Guid value);
614    partial void OnPluginIdChanged();
615    #endregion
616   
617    public RequiredPlugin()
618    {
619      this._PluginInfo = default(EntityRef<Plugin>);
620      this._Job = default(EntityRef<Job>);
621      OnCreated();
622    }
623   
624    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequiredPluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
625    public System.Guid RequiredPluginId
626    {
627      get
628      {
629        return this._RequiredPluginId;
630      }
631      set
632      {
633        if ((this._RequiredPluginId != value))
634        {
635          this.OnRequiredPluginIdChanging(value);
636          this.SendPropertyChanging();
637          this._RequiredPluginId = value;
638          this.SendPropertyChanged("RequiredPluginId");
639          this.OnRequiredPluginIdChanged();
640        }
641      }
642    }
643   
644    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
645    public System.Guid JobId
646    {
647      get
648      {
649        return this._JobId;
650      }
651      set
652      {
653        if ((this._JobId != value))
654        {
655          if (this._Job.HasLoadedOrAssignedValue)
656          {
657            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
658          }
659          this.OnJobIdChanging(value);
660          this.SendPropertyChanging();
661          this._JobId = value;
662          this.SendPropertyChanged("JobId");
663          this.OnJobIdChanged();
664        }
665      }
666    }
667   
668    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
669    public System.Guid PluginId
670    {
671      get
672      {
673        return this._PluginId;
674      }
675      set
676      {
677        if ((this._PluginId != value))
678        {
679          if (this._PluginInfo.HasLoadedOrAssignedValue)
680          {
681            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
682          }
683          this.OnPluginIdChanging(value);
684          this.SendPropertyChanging();
685          this._PluginId = value;
686          this.SendPropertyChanged("PluginId");
687          this.OnPluginIdChanged();
688        }
689      }
690    }
691   
692    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
693    public Plugin Plugin
694    {
695      get
696      {
697        return this._PluginInfo.Entity;
698      }
699      set
700      {
701        Plugin previousValue = this._PluginInfo.Entity;
702        if (((previousValue != value)
703              || (this._PluginInfo.HasLoadedOrAssignedValue == false)))
704        {
705          this.SendPropertyChanging();
706          if ((previousValue != null))
707          {
708            this._PluginInfo.Entity = null;
709            previousValue.RequiredPlugins.Remove(this);
710          }
711          this._PluginInfo.Entity = value;
712          if ((value != null))
713          {
714            value.RequiredPlugins.Add(this);
715            this._PluginId = value.PluginId;
716          }
717          else
718          {
719            this._PluginId = default(System.Guid);
720          }
721          this.SendPropertyChanged("Plugin");
722        }
723      }
724    }
725   
726    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_RequiredPlugin", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
727    public Job Job
728    {
729      get
730      {
731        return this._Job.Entity;
732      }
733      set
734      {
735        Job previousValue = this._Job.Entity;
736        if (((previousValue != value)
737              || (this._Job.HasLoadedOrAssignedValue == false)))
738        {
739          this.SendPropertyChanging();
740          if ((previousValue != null))
741          {
742            this._Job.Entity = null;
743            previousValue.RequiredPlugins.Remove(this);
744          }
745          this._Job.Entity = value;
746          if ((value != null))
747          {
748            value.RequiredPlugins.Add(this);
749            this._JobId = value.JobId;
750          }
751          else
752          {
753            this._JobId = default(System.Guid);
754          }
755          this.SendPropertyChanged("Job");
756        }
757      }
758    }
759   
760    public event PropertyChangingEventHandler PropertyChanging;
761   
762    public event PropertyChangedEventHandler PropertyChanged;
763   
764    protected virtual void SendPropertyChanging()
765    {
766      if ((this.PropertyChanging != null))
767      {
768        this.PropertyChanging(this, emptyChangingEventArgs);
769      }
770    }
771   
772    protected virtual void SendPropertyChanged(String propertyName)
773    {
774      if ((this.PropertyChanged != null))
775      {
776        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
777      }
778    }
779  }
780 
781  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Resource")]
782  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="RESOURCE", Type=typeof(Resource))]
783  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Slave", Type=typeof(Slave), IsDefault=true)]
784  [global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="GROUP", Type=typeof(SlaveGroup))]
785  public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
786  {
787   
788    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
789   
790    protected System.Guid _ResourceId;
791   
792    private string _Name;
793   
794    private string _ResourceType;
795   
796    private System.Nullable<System.Guid> _ParentResourceId;
797   
798    private EntitySet<AssignedResource> _AssignedResources;
799   
800    private EntitySet<Resource> _ChildResources;
801   
802    private EntitySet<UptimeCalendar> _UptimeCalendars;
803   
804    private EntityRef<Resource> _ParentResource;
805   
806    #region Extensibility Method Definitions
807    partial void OnLoaded();
808    partial void OnValidate(System.Data.Linq.ChangeAction action);
809    partial void OnCreated();
810    partial void OnResourceIdChanging(System.Guid value);
811    partial void OnResourceIdChanged();
812    partial void OnNameChanging(string value);
813    partial void OnNameChanged();
814    partial void OnResourceTypeChanging(string value);
815    partial void OnResourceTypeChanged();
816    partial void OnParentResourceIdChanging(System.Nullable<System.Guid> value);
817    partial void OnParentResourceIdChanged();
818    #endregion
819   
820    public Resource()
821    {
822      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
823      this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources));
824      this._UptimeCalendars = new EntitySet<UptimeCalendar>(new Action<UptimeCalendar>(this.attach_UptimeCalendars), new Action<UptimeCalendar>(this.detach_UptimeCalendars));
825      this._ParentResource = default(EntityRef<Resource>);
826      OnCreated();
827    }
828   
829    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
830    public System.Guid ResourceId
831    {
832      get
833      {
834        return this._ResourceId;
835      }
836      set
837      {
838        if ((this._ResourceId != value))
839        {
840          this.OnResourceIdChanging(value);
841          this.SendPropertyChanging();
842          this._ResourceId = value;
843          this.SendPropertyChanged("ResourceId");
844          this.OnResourceIdChanged();
845        }
846      }
847    }
848   
849    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
850    public string Name
851    {
852      get
853      {
854        return this._Name;
855      }
856      set
857      {
858        if ((this._Name != value))
859        {
860          this.OnNameChanging(value);
861          this.SendPropertyChanging();
862          this._Name = value;
863          this.SendPropertyChanged("Name");
864          this.OnNameChanged();
865        }
866      }
867    }
868   
869    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", CanBeNull=false, IsDiscriminator=true)]
870    public string ResourceType
871    {
872      get
873      {
874        return this._ResourceType;
875      }
876      set
877      {
878        if ((this._ResourceType != value))
879        {
880          this.OnResourceTypeChanging(value);
881          this.SendPropertyChanging();
882          this._ResourceType = value;
883          this.SendPropertyChanged("ResourceType");
884          this.OnResourceTypeChanged();
885        }
886      }
887    }
888   
889    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentResourceId", DbType="UniqueIdentifier")]
890    public System.Nullable<System.Guid> ParentResourceId
891    {
892      get
893      {
894        return this._ParentResourceId;
895      }
896      set
897      {
898        if ((this._ParentResourceId != value))
899        {
900          if (this._ParentResource.HasLoadedOrAssignedValue)
901          {
902            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
903          }
904          this.OnParentResourceIdChanging(value);
905          this.SendPropertyChanging();
906          this._ParentResourceId = value;
907          this.SendPropertyChanged("ParentResourceId");
908          this.OnParentResourceIdChanged();
909        }
910      }
911    }
912   
913    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
914    public EntitySet<AssignedResource> AssignedResources
915    {
916      get
917      {
918        return this._AssignedResources;
919      }
920      set
921      {
922        this._AssignedResources.Assign(value);
923      }
924    }
925   
926    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ChildResources", ThisKey="ResourceId", OtherKey="ParentResourceId")]
927    public EntitySet<Resource> ChildResources
928    {
929      get
930      {
931        return this._ChildResources;
932      }
933      set
934      {
935        this._ChildResources.Assign(value);
936      }
937    }
938   
939    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
940    public EntitySet<UptimeCalendar> UptimeCalendars
941    {
942      get
943      {
944        return this._UptimeCalendars;
945      }
946      set
947      {
948        this._UptimeCalendars.Assign(value);
949      }
950    }
951   
952    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ParentResource", ThisKey="ParentResourceId", OtherKey="ResourceId", IsForeignKey=true)]
953    public Resource ParentResource
954    {
955      get
956      {
957        return this._ParentResource.Entity;
958      }
959      set
960      {
961        Resource previousValue = this._ParentResource.Entity;
962        if (((previousValue != value)
963              || (this._ParentResource.HasLoadedOrAssignedValue == false)))
964        {
965          this.SendPropertyChanging();
966          if ((previousValue != null))
967          {
968            this._ParentResource.Entity = null;
969            previousValue.ChildResources.Remove(this);
970          }
971          this._ParentResource.Entity = value;
972          if ((value != null))
973          {
974            value.ChildResources.Add(this);
975            this._ParentResourceId = value.ResourceId;
976          }
977          else
978          {
979            this._ParentResourceId = default(Nullable<System.Guid>);
980          }
981          this.SendPropertyChanged("ParentResource");
982        }
983      }
984    }
985   
986    public event PropertyChangingEventHandler PropertyChanging;
987   
988    public event PropertyChangedEventHandler PropertyChanged;
989   
990    protected virtual void SendPropertyChanging()
991    {
992      if ((this.PropertyChanging != null))
993      {
994        this.PropertyChanging(this, emptyChangingEventArgs);
995      }
996    }
997   
998    protected virtual void SendPropertyChanged(String propertyName)
999    {
1000      if ((this.PropertyChanged != null))
1001      {
1002        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1003      }
1004    }
1005   
1006    private void attach_AssignedResources(AssignedResource entity)
1007    {
1008      this.SendPropertyChanging();
1009      entity.Resource = this;
1010    }
1011   
1012    private void detach_AssignedResources(AssignedResource entity)
1013    {
1014      this.SendPropertyChanging();
1015      entity.Resource = null;
1016    }
1017   
1018    private void attach_ChildResources(Resource entity)
1019    {
1020      this.SendPropertyChanging();
1021      entity.ParentResource = this;
1022    }
1023   
1024    private void detach_ChildResources(Resource entity)
1025    {
1026      this.SendPropertyChanging();
1027      entity.ParentResource = null;
1028    }
1029   
1030    private void attach_UptimeCalendars(UptimeCalendar entity)
1031    {
1032      this.SendPropertyChanging();
1033      entity.Resource = this;
1034    }
1035   
1036    private void detach_UptimeCalendars(UptimeCalendar entity)
1037    {
1038      this.SendPropertyChanging();
1039      entity.Resource = null;
1040    }
1041  }
1042 
1043  public partial class Slave : Resource
1044  {
1045   
1046    private System.Nullable<int> _CPUSpeed;
1047   
1048    private System.Nullable<int> _Memory;
1049   
1050    private System.Nullable<System.DateTime> _Login;
1051   
1052    private global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState _Status;
1053   
1054    private System.Nullable<int> _NumberOfCores;
1055   
1056    private System.Nullable<int> _NumberOfFreeCores;
1057   
1058    private System.Nullable<int> _FreeMemory;
1059   
1060    private bool _IsAllowedToCalculate;
1061   
1062    private global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture _CpuArchitecture;
1063   
1064    private string _OperatingSystem;
1065   
1066    private EntitySet<Job> _Jobs;
1067   
1068    #region Extensibility Method Definitions
1069    partial void OnLoaded();
1070    partial void OnValidate(System.Data.Linq.ChangeAction action);
1071    partial void OnCreated();
1072    partial void OnCpuSpeedChanging(System.Nullable<int> value);
1073    partial void OnCpuSpeedChanged();
1074    partial void OnMemoryChanging(System.Nullable<int> value);
1075    partial void OnMemoryChanged();
1076    partial void OnLoginChanging(System.Nullable<System.DateTime> value);
1077    partial void OnLoginChanged();
1078    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState value);
1079    partial void OnSlaveStateChanged();
1080    partial void OnCoresChanging(System.Nullable<int> value);
1081    partial void OnCoresChanged();
1082    partial void OnFreeCoresChanging(System.Nullable<int> value);
1083    partial void OnFreeCoresChanged();
1084    partial void OnFreeMemoryChanging(System.Nullable<int> value);
1085    partial void OnFreeMemoryChanged();
1086    partial void OnIsAllowedToCalculateChanging(bool value);
1087    partial void OnIsAllowedToCalculateChanged();
1088    partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture value);
1089    partial void OnCpuArchitectureChanged();
1090    partial void OnOperatingSystemChanging(string value);
1091    partial void OnOperatingSystemChanged();
1092    #endregion
1093   
1094    public Slave()
1095    {
1096      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
1097      OnCreated();
1098    }
1099   
1100    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPUSpeed", DbType="Int")]
1101    public System.Nullable<int> CpuSpeed
1102    {
1103      get
1104      {
1105        return this._CPUSpeed;
1106      }
1107      set
1108      {
1109        if ((this._CPUSpeed != value))
1110        {
1111          this.OnCpuSpeedChanging(value);
1112          this.SendPropertyChanging();
1113          this._CPUSpeed = value;
1114          this.SendPropertyChanged("CpuSpeed");
1115          this.OnCpuSpeedChanged();
1116        }
1117      }
1118    }
1119   
1120    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int")]
1121    public System.Nullable<int> Memory
1122    {
1123      get
1124      {
1125        return this._Memory;
1126      }
1127      set
1128      {
1129        if ((this._Memory != value))
1130        {
1131          this.OnMemoryChanging(value);
1132          this.SendPropertyChanging();
1133          this._Memory = value;
1134          this.SendPropertyChanged("Memory");
1135          this.OnMemoryChanged();
1136        }
1137      }
1138    }
1139   
1140    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]
1141    public System.Nullable<System.DateTime> Login
1142    {
1143      get
1144      {
1145        return this._Login;
1146      }
1147      set
1148      {
1149        if ((this._Login != value))
1150        {
1151          this.OnLoginChanging(value);
1152          this.SendPropertyChanging();
1153          this._Login = value;
1154          this.SendPropertyChanged("Login");
1155          this.OnLoginChanged();
1156        }
1157      }
1158    }
1159   
1160    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(15)", CanBeNull=true)]
1161    public global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState SlaveState
1162    {
1163      get
1164      {
1165        return this._Status;
1166      }
1167      set
1168      {
1169        if ((this._Status != value))
1170        {
1171          this.OnSlaveStateChanging(value);
1172          this.SendPropertyChanging();
1173          this._Status = value;
1174          this.SendPropertyChanged("SlaveState");
1175          this.OnSlaveStateChanged();
1176        }
1177      }
1178    }
1179   
1180    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfCores", DbType="Int")]
1181    public System.Nullable<int> Cores
1182    {
1183      get
1184      {
1185        return this._NumberOfCores;
1186      }
1187      set
1188      {
1189        if ((this._NumberOfCores != value))
1190        {
1191          this.OnCoresChanging(value);
1192          this.SendPropertyChanging();
1193          this._NumberOfCores = value;
1194          this.SendPropertyChanged("Cores");
1195          this.OnCoresChanged();
1196        }
1197      }
1198    }
1199   
1200    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfFreeCores", DbType="Int")]
1201    public System.Nullable<int> FreeCores
1202    {
1203      get
1204      {
1205        return this._NumberOfFreeCores;
1206      }
1207      set
1208      {
1209        if ((this._NumberOfFreeCores != value))
1210        {
1211          this.OnFreeCoresChanging(value);
1212          this.SendPropertyChanging();
1213          this._NumberOfFreeCores = value;
1214          this.SendPropertyChanged("FreeCores");
1215          this.OnFreeCoresChanged();
1216        }
1217      }
1218    }
1219   
1220    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int")]
1221    public System.Nullable<int> FreeMemory
1222    {
1223      get
1224      {
1225        return this._FreeMemory;
1226      }
1227      set
1228      {
1229        if ((this._FreeMemory != value))
1230        {
1231          this.OnFreeMemoryChanging(value);
1232          this.SendPropertyChanging();
1233          this._FreeMemory = value;
1234          this.SendPropertyChanged("FreeMemory");
1235          this.OnFreeMemoryChanged();
1236        }
1237      }
1238    }
1239   
1240    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAllowedToCalculate", DbType="Bit")]
1241    public bool IsAllowedToCalculate
1242    {
1243      get
1244      {
1245        return this._IsAllowedToCalculate;
1246      }
1247      set
1248      {
1249        if ((this._IsAllowedToCalculate != value))
1250        {
1251          this.OnIsAllowedToCalculateChanging(value);
1252          this.SendPropertyChanging();
1253          this._IsAllowedToCalculate = value;
1254          this.SendPropertyChanged("IsAllowedToCalculate");
1255          this.OnIsAllowedToCalculateChanged();
1256        }
1257      }
1258    }
1259   
1260    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuArchitecture", DbType="VarChar(3)", CanBeNull=false)]
1261    public global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture CpuArchitecture
1262    {
1263      get
1264      {
1265        return this._CpuArchitecture;
1266      }
1267      set
1268      {
1269        if ((this._CpuArchitecture != value))
1270        {
1271          this.OnCpuArchitectureChanging(value);
1272          this.SendPropertyChanging();
1273          this._CpuArchitecture = value;
1274          this.SendPropertyChanged("CpuArchitecture");
1275          this.OnCpuArchitectureChanged();
1276        }
1277      }
1278    }
1279   
1280    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingSystem", DbType="VarChar(MAX)", CanBeNull=false)]
1281    public string OperatingSystem
1282    {
1283      get
1284      {
1285        return this._OperatingSystem;
1286      }
1287      set
1288      {
1289        if ((this._OperatingSystem != value))
1290        {
1291          this.OnOperatingSystemChanging(value);
1292          this.SendPropertyChanging();
1293          this._OperatingSystem = value;
1294          this.SendPropertyChanged("OperatingSystem");
1295          this.OnOperatingSystemChanged();
1296        }
1297      }
1298    }
1299   
1300    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="SlaveId")]
1301    public EntitySet<Job> Jobs
1302    {
1303      get
1304      {
1305        return this._Jobs;
1306      }
1307      set
1308      {
1309        this._Jobs.Assign(value);
1310      }
1311    }
1312   
1313    private void attach_Jobs(Job entity)
1314    {
1315      this.SendPropertyChanging();
1316      entity.Slave = this;
1317    }
1318   
1319    private void detach_Jobs(Job entity)
1320    {
1321      this.SendPropertyChanging();
1322      entity.Slave = null;
1323    }
1324  }
1325 
1326  public partial class SlaveGroup : Resource
1327  {
1328   
1329    #region Extensibility Method Definitions
1330    partial void OnLoaded();
1331    partial void OnValidate(System.Data.Linq.ChangeAction action);
1332    partial void OnCreated();
1333    #endregion
1334   
1335    public SlaveGroup()
1336    {
1337      OnCreated();
1338    }
1339  }
1340 
1341  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Job")]
1342  public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
1343  {
1344   
1345    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1346   
1347    private System.Guid _JobId;
1348   
1349    private System.Nullable<System.Guid> _ParentJobId;
1350   
1351    private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _JobState;
1352   
1353    private System.Nullable<System.Guid> _ResourceId;
1354   
1355    private System.Nullable<System.TimeSpan> _ExecutionTime;
1356   
1357    private string _Exception;
1358   
1359    private System.DateTime _DateCreated;
1360   
1361    private System.Nullable<System.DateTime> _DateCalculated;
1362   
1363    private System.Nullable<System.DateTime> _DateFinished;
1364   
1365    private int _Priority;
1366   
1367    private System.Nullable<System.Guid> _ProjectId;
1368   
1369    private System.Guid _UserId;
1370   
1371    private int _CoresNeeded;
1372   
1373    private int _MemoryNeeded;
1374   
1375    private EntitySet<AssignedResource> _AssignedResources;
1376   
1377    private EntitySet<RequiredPlugin> _RequiredPlugins;
1378   
1379    private EntitySet<Job> _Jobs;
1380   
1381    private EntityRef<JobData> _JobData;
1382   
1383    private EntityRef<Job> _Job1;
1384   
1385    private EntityRef<Slave> _Slave;
1386   
1387    #region Extensibility Method Definitions
1388    partial void OnLoaded();
1389    partial void OnValidate(System.Data.Linq.ChangeAction action);
1390    partial void OnCreated();
1391    partial void OnJobIdChanging(System.Guid value);
1392    partial void OnJobIdChanged();
1393    partial void OnParentJobIdChanging(System.Nullable<System.Guid> value);
1394    partial void OnParentJobIdChanged();
1395    partial void OnJobStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value);
1396    partial void OnJobStateChanged();
1397    partial void OnSlaveIdChanging(System.Nullable<System.Guid> value);
1398    partial void OnSlaveIdChanged();
1399    partial void OnExecutionTimeChanging(System.Nullable<System.TimeSpan> value);
1400    partial void OnExecutionTimeChanged();
1401    partial void OnExceptionChanging(string value);
1402    partial void OnExceptionChanged();
1403    partial void OnDateCreatedChanging(System.DateTime value);
1404    partial void OnDateCreatedChanged();
1405    partial void OnDateCalculatedChanging(System.Nullable<System.DateTime> value);
1406    partial void OnDateCalculatedChanged();
1407    partial void OnDateFinishedChanging(System.Nullable<System.DateTime> value);
1408    partial void OnDateFinishedChanged();
1409    partial void OnPriorityChanging(int value);
1410    partial void OnPriorityChanged();
1411    partial void OnProjectIdChanging(System.Nullable<System.Guid> value);
1412    partial void OnProjectIdChanged();
1413    partial void OnUserIdChanging(System.Guid value);
1414    partial void OnUserIdChanged();
1415    partial void OnCoresNeededChanging(int value);
1416    partial void OnCoresNeededChanged();
1417    partial void OnMemoryNeededChanging(int value);
1418    partial void OnMemoryNeededChanged();
1419    #endregion
1420   
1421    public Job()
1422    {
1423      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
1424      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
1425      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
1426      this._JobData = default(EntityRef<JobData>);
1427      this._Job1 = default(EntityRef<Job>);
1428      this._Slave = default(EntityRef<Slave>);
1429      OnCreated();
1430    }
1431   
1432    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
1433    public System.Guid JobId
1434    {
1435      get
1436      {
1437        return this._JobId;
1438      }
1439      set
1440      {
1441        if ((this._JobId != value))
1442        {
1443          this.OnJobIdChanging(value);
1444          this.SendPropertyChanging();
1445          this._JobId = value;
1446          this.SendPropertyChanged("JobId");
1447          this.OnJobIdChanged();
1448        }
1449      }
1450    }
1451   
1452    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")]
1453    public System.Nullable<System.Guid> ParentJobId
1454    {
1455      get
1456      {
1457        return this._ParentJobId;
1458      }
1459      set
1460      {
1461        if ((this._ParentJobId != value))
1462        {
1463          if (this._Job1.HasLoadedOrAssignedValue)
1464          {
1465            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1466          }
1467          this.OnParentJobIdChanging(value);
1468          this.SendPropertyChanging();
1469          this._ParentJobId = value;
1470          this.SendPropertyChanged("ParentJobId");
1471          this.OnParentJobIdChanged();
1472        }
1473      }
1474    }
1475   
1476    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobState", DbType="VarChar(15)", CanBeNull=false)]
1477    public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState JobState
1478    {
1479      get
1480      {
1481        return this._JobState;
1482      }
1483      set
1484      {
1485        if ((this._JobState != value))
1486        {
1487          this.OnJobStateChanging(value);
1488          this.SendPropertyChanging();
1489          this._JobState = value;
1490          this.SendPropertyChanged("JobState");
1491          this.OnJobStateChanged();
1492        }
1493      }
1494    }
1495   
1496    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="ResourceId", Storage="_ResourceId", DbType="UniqueIdentifier")]
1497    public System.Nullable<System.Guid> SlaveId
1498    {
1499      get
1500      {
1501        return this._ResourceId;
1502      }
1503      set
1504      {
1505        if ((this._ResourceId != value))
1506        {
1507          this.OnSlaveIdChanging(value);
1508          this.SendPropertyChanging();
1509          this._ResourceId = value;
1510          this.SendPropertyChanged("SlaveId");
1511          this.OnSlaveIdChanged();
1512        }
1513      }
1514    }
1515   
1516    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="Time")]
1517    public System.Nullable<System.TimeSpan> ExecutionTime
1518    {
1519      get
1520      {
1521        return this._ExecutionTime;
1522      }
1523      set
1524      {
1525        if ((this._ExecutionTime != value))
1526        {
1527          this.OnExecutionTimeChanging(value);
1528          this.SendPropertyChanging();
1529          this._ExecutionTime = value;
1530          this.SendPropertyChanged("ExecutionTime");
1531          this.OnExecutionTimeChanged();
1532        }
1533      }
1534    }
1535   
1536    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)")]
1537    public string Exception
1538    {
1539      get
1540      {
1541        return this._Exception;
1542      }
1543      set
1544      {
1545        if ((this._Exception != value))
1546        {
1547          this.OnExceptionChanging(value);
1548          this.SendPropertyChanging();
1549          this._Exception = value;
1550          this.SendPropertyChanged("Exception");
1551          this.OnExceptionChanged();
1552        }
1553      }
1554    }
1555   
1556    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
1557    public System.DateTime DateCreated
1558    {
1559      get
1560      {
1561        return this._DateCreated;
1562      }
1563      set
1564      {
1565        if ((this._DateCreated != value))
1566        {
1567          this.OnDateCreatedChanging(value);
1568          this.SendPropertyChanging();
1569          this._DateCreated = value;
1570          this.SendPropertyChanged("DateCreated");
1571          this.OnDateCreatedChanged();
1572        }
1573      }
1574    }
1575   
1576    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCalculated", DbType="DateTime")]
1577    public System.Nullable<System.DateTime> DateCalculated
1578    {
1579      get
1580      {
1581        return this._DateCalculated;
1582      }
1583      set
1584      {
1585        if ((this._DateCalculated != value))
1586        {
1587          this.OnDateCalculatedChanging(value);
1588          this.SendPropertyChanging();
1589          this._DateCalculated = value;
1590          this.SendPropertyChanged("DateCalculated");
1591          this.OnDateCalculatedChanged();
1592        }
1593      }
1594    }
1595   
1596    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateFinished", DbType="DateTime")]
1597    public System.Nullable<System.DateTime> DateFinished
1598    {
1599      get
1600      {
1601        return this._DateFinished;
1602      }
1603      set
1604      {
1605        if ((this._DateFinished != value))
1606        {
1607          this.OnDateFinishedChanging(value);
1608          this.SendPropertyChanging();
1609          this._DateFinished = value;
1610          this.SendPropertyChanged("DateFinished");
1611          this.OnDateFinishedChanged();
1612        }
1613      }
1614    }
1615   
1616    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
1617    public int Priority
1618    {
1619      get
1620      {
1621        return this._Priority;
1622      }
1623      set
1624      {
1625        if ((this._Priority != value))
1626        {
1627          this.OnPriorityChanging(value);
1628          this.SendPropertyChanging();
1629          this._Priority = value;
1630          this.SendPropertyChanged("Priority");
1631          this.OnPriorityChanged();
1632        }
1633      }
1634    }
1635   
1636    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="UniqueIdentifier")]
1637    public System.Nullable<System.Guid> ProjectId
1638    {
1639      get
1640      {
1641        return this._ProjectId;
1642      }
1643      set
1644      {
1645        if ((this._ProjectId != value))
1646        {
1647          this.OnProjectIdChanging(value);
1648          this.SendPropertyChanging();
1649          this._ProjectId = value;
1650          this.SendPropertyChanged("ProjectId");
1651          this.OnProjectIdChanged();
1652        }
1653      }
1654    }
1655   
1656    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
1657    public System.Guid UserId
1658    {
1659      get
1660      {
1661        return this._UserId;
1662      }
1663      set
1664      {
1665        if ((this._UserId != value))
1666        {
1667          this.OnUserIdChanging(value);
1668          this.SendPropertyChanging();
1669          this._UserId = value;
1670          this.SendPropertyChanged("UserId");
1671          this.OnUserIdChanged();
1672        }
1673      }
1674    }
1675   
1676    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresNeeded", DbType="Int NOT NULL")]
1677    public int CoresNeeded
1678    {
1679      get
1680      {
1681        return this._CoresNeeded;
1682      }
1683      set
1684      {
1685        if ((this._CoresNeeded != value))
1686        {
1687          this.OnCoresNeededChanging(value);
1688          this.SendPropertyChanging();
1689          this._CoresNeeded = value;
1690          this.SendPropertyChanged("CoresNeeded");
1691          this.OnCoresNeededChanged();
1692        }
1693      }
1694    }
1695   
1696    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
1697    public int MemoryNeeded
1698    {
1699      get
1700      {
1701        return this._MemoryNeeded;
1702      }
1703      set
1704      {
1705        if ((this._MemoryNeeded != value))
1706        {
1707          this.OnMemoryNeededChanging(value);
1708          this.SendPropertyChanging();
1709          this._MemoryNeeded = value;
1710          this.SendPropertyChanged("MemoryNeeded");
1711          this.OnMemoryNeededChanged();
1712        }
1713      }
1714    }
1715   
1716    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")]
1717    public EntitySet<AssignedResource> AssignedResources
1718    {
1719      get
1720      {
1721        return this._AssignedResources;
1722      }
1723      set
1724      {
1725        this._AssignedResources.Assign(value);
1726      }
1727    }
1728   
1729    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="JobId", OtherKey="JobId")]
1730    public EntitySet<RequiredPlugin> RequiredPlugins
1731    {
1732      get
1733      {
1734        return this._RequiredPlugins;
1735      }
1736      set
1737      {
1738        this._RequiredPlugins.Assign(value);
1739      }
1740    }
1741   
1742    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]
1743    public EntitySet<Job> ChildJobs
1744    {
1745      get
1746      {
1747        return this._Jobs;
1748      }
1749      set
1750      {
1751        this._Jobs.Assign(value);
1752      }
1753    }
1754   
1755    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobData", Storage="_JobData", ThisKey="JobId", OtherKey="JobId", IsUnique=true, IsForeignKey=false)]
1756    public JobData JobData
1757    {
1758      get
1759      {
1760        return this._JobData.Entity;
1761      }
1762      set
1763      {
1764        JobData previousValue = this._JobData.Entity;
1765        if (((previousValue != value)
1766              || (this._JobData.HasLoadedOrAssignedValue == false)))
1767        {
1768          this.SendPropertyChanging();
1769          if ((previousValue != null))
1770          {
1771            this._JobData.Entity = null;
1772            previousValue.Job = null;
1773          }
1774          this._JobData.Entity = value;
1775          if ((value != null))
1776          {
1777            value.Job = this;
1778          }
1779          this.SendPropertyChanged("JobData");
1780        }
1781      }
1782    }
1783   
1784    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]
1785    public Job ParentJob
1786    {
1787      get
1788      {
1789        return this._Job1.Entity;
1790      }
1791      set
1792      {
1793        Job previousValue = this._Job1.Entity;
1794        if (((previousValue != value)
1795              || (this._Job1.HasLoadedOrAssignedValue == false)))
1796        {
1797          this.SendPropertyChanging();
1798          if ((previousValue != null))
1799          {
1800            this._Job1.Entity = null;
1801            previousValue.ChildJobs.Remove(this);
1802          }
1803          this._Job1.Entity = value;
1804          if ((value != null))
1805          {
1806            value.ChildJobs.Add(this);
1807            this._ParentJobId = value.JobId;
1808          }
1809          else
1810          {
1811            this._ParentJobId = default(Nullable<System.Guid>);
1812          }
1813          this.SendPropertyChanged("ParentJob");
1814        }
1815      }
1816    }
1817   
1818    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Slave", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
1819    public Slave Slave
1820    {
1821      get
1822      {
1823        return this._Slave.Entity;
1824      }
1825      set
1826      {
1827        Slave previousValue = this._Slave.Entity;
1828        if (((previousValue != value)
1829              || (this._Slave.HasLoadedOrAssignedValue == false)))
1830        {
1831          this.SendPropertyChanging();
1832          if ((previousValue != null))
1833          {
1834            this._Slave.Entity = null;
1835            previousValue.Jobs.Remove(this);
1836          }
1837          this._Slave.Entity = value;
1838          if ((value != null))
1839          {
1840            value.Jobs.Add(this);
1841            this._ResourceId = value.ResourceId;
1842          }
1843          else
1844          {
1845            this._ResourceId = default(Nullable<System.Guid>);
1846          }
1847          this.SendPropertyChanged("Slave");
1848        }
1849      }
1850    }
1851   
1852    public event PropertyChangingEventHandler PropertyChanging;
1853   
1854    public event PropertyChangedEventHandler PropertyChanged;
1855   
1856    protected virtual void SendPropertyChanging()
1857    {
1858      if ((this.PropertyChanging != null))
1859      {
1860        this.PropertyChanging(this, emptyChangingEventArgs);
1861      }
1862    }
1863   
1864    protected virtual void SendPropertyChanged(String propertyName)
1865    {
1866      if ((this.PropertyChanged != null))
1867      {
1868        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1869      }
1870    }
1871   
1872    private void attach_AssignedResources(AssignedResource entity)
1873    {
1874      this.SendPropertyChanging();
1875      entity.Job = this;
1876    }
1877   
1878    private void detach_AssignedResources(AssignedResource entity)
1879    {
1880      this.SendPropertyChanging();
1881      entity.Job = null;
1882    }
1883   
1884    private void attach_RequiredPlugins(RequiredPlugin entity)
1885    {
1886      this.SendPropertyChanging();
1887      entity.Job = this;
1888    }
1889   
1890    private void detach_RequiredPlugins(RequiredPlugin entity)
1891    {
1892      this.SendPropertyChanging();
1893      entity.Job = null;
1894    }
1895   
1896    private void attach_Jobs(Job entity)
1897    {
1898      this.SendPropertyChanging();
1899      entity.ParentJob = this;
1900    }
1901   
1902    private void detach_Jobs(Job entity)
1903    {
1904      this.SendPropertyChanging();
1905      entity.ParentJob = null;
1906    }
1907  }
1908 
1909  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.UptimeCalendar")]
1910  public partial class UptimeCalendar : INotifyPropertyChanging, INotifyPropertyChanged
1911  {
1912   
1913    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1914   
1915    private System.Guid _UptimeCalendarId;
1916   
1917    private System.Guid _ResourceId;
1918   
1919    private System.DateTime _StartDate;
1920   
1921    private System.DateTime _EndDate;
1922   
1923    private bool _AllDayEvent;
1924   
1925    private bool _Recurring;
1926   
1927    private System.Guid _RecurringId;
1928   
1929    private EntityRef<Resource> _Resource;
1930   
1931    #region Extensibility Method Definitions
1932    partial void OnLoaded();
1933    partial void OnValidate(System.Data.Linq.ChangeAction action);
1934    partial void OnCreated();
1935    partial void OnUptimeCalendarIdChanging(System.Guid value);
1936    partial void OnUptimeCalendarIdChanged();
1937    partial void OnResourceIdChanging(System.Guid value);
1938    partial void OnResourceIdChanged();
1939    partial void OnStartDateChanging(System.DateTime value);
1940    partial void OnStartDateChanged();
1941    partial void OnEndDateChanging(System.DateTime value);
1942    partial void OnEndDateChanged();
1943    partial void OnAllDayEventChanging(bool value);
1944    partial void OnAllDayEventChanged();
1945    partial void OnRecurringChanging(bool value);
1946    partial void OnRecurringChanged();
1947    partial void OnRecurringIdChanging(System.Guid value);
1948    partial void OnRecurringIdChanged();
1949    #endregion
1950   
1951    public UptimeCalendar()
1952    {
1953      this._Resource = default(EntityRef<Resource>);
1954      OnCreated();
1955    }
1956   
1957    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier", IsPrimaryKey=true, IsDbGenerated=true)]
1958    public System.Guid UptimeCalendarId
1959    {
1960      get
1961      {
1962        return this._UptimeCalendarId;
1963      }
1964      set
1965      {
1966        if ((this._UptimeCalendarId != value))
1967        {
1968          this.OnUptimeCalendarIdChanging(value);
1969          this.SendPropertyChanging();
1970          this._UptimeCalendarId = value;
1971          this.SendPropertyChanged("UptimeCalendarId");
1972          this.OnUptimeCalendarIdChanged();
1973        }
1974      }
1975    }
1976   
1977    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
1978    public System.Guid ResourceId
1979    {
1980      get
1981      {
1982        return this._ResourceId;
1983      }
1984      set
1985      {
1986        if ((this._ResourceId != value))
1987        {
1988          if (this._Resource.HasLoadedOrAssignedValue)
1989          {
1990            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1991          }
1992          this.OnResourceIdChanging(value);
1993          this.SendPropertyChanging();
1994          this._ResourceId = value;
1995          this.SendPropertyChanged("ResourceId");
1996          this.OnResourceIdChanged();
1997        }
1998      }
1999    }
2000   
2001    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")]
2002    public System.DateTime StartDate
2003    {
2004      get
2005      {
2006        return this._StartDate;
2007      }
2008      set
2009      {
2010        if ((this._StartDate != value))
2011        {
2012          this.OnStartDateChanging(value);
2013          this.SendPropertyChanging();
2014          this._StartDate = value;
2015          this.SendPropertyChanged("StartDate");
2016          this.OnStartDateChanged();
2017        }
2018      }
2019    }
2020   
2021    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")]
2022    public System.DateTime EndDate
2023    {
2024      get
2025      {
2026        return this._EndDate;
2027      }
2028      set
2029      {
2030        if ((this._EndDate != value))
2031        {
2032          this.OnEndDateChanging(value);
2033          this.SendPropertyChanging();
2034          this._EndDate = value;
2035          this.SendPropertyChanged("EndDate");
2036          this.OnEndDateChanged();
2037        }
2038      }
2039    }
2040   
2041    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AllDayEvent", DbType="Bit")]
2042    public bool AllDayEvent
2043    {
2044      get
2045      {
2046        return this._AllDayEvent;
2047      }
2048      set
2049      {
2050        if ((this._AllDayEvent != value))
2051        {
2052          this.OnAllDayEventChanging(value);
2053          this.SendPropertyChanging();
2054          this._AllDayEvent = value;
2055          this.SendPropertyChanged("AllDayEvent");
2056          this.OnAllDayEventChanged();
2057        }
2058      }
2059    }
2060   
2061    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Recurring", DbType="Bit")]
2062    public bool Recurring
2063    {
2064      get
2065      {
2066        return this._Recurring;
2067      }
2068      set
2069      {
2070        if ((this._Recurring != value))
2071        {
2072          this.OnRecurringChanging(value);
2073          this.SendPropertyChanging();
2074          this._Recurring = value;
2075          this.SendPropertyChanged("Recurring");
2076          this.OnRecurringChanged();
2077        }
2078      }
2079    }
2080   
2081    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecurringId", DbType="UniqueIdentifier")]
2082    public System.Guid RecurringId
2083    {
2084      get
2085      {
2086        return this._RecurringId;
2087      }
2088      set
2089      {
2090        if ((this._RecurringId != value))
2091        {
2092          this.OnRecurringIdChanging(value);
2093          this.SendPropertyChanging();
2094          this._RecurringId = value;
2095          this.SendPropertyChanged("RecurringId");
2096          this.OnRecurringIdChanged();
2097        }
2098      }
2099    }
2100   
2101    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_UptimeCalendar", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
2102    public Resource Resource
2103    {
2104      get
2105      {
2106        return this._Resource.Entity;
2107      }
2108      set
2109      {
2110        Resource previousValue = this._Resource.Entity;
2111        if (((previousValue != value)
2112              || (this._Resource.HasLoadedOrAssignedValue == false)))
2113        {
2114          this.SendPropertyChanging();
2115          if ((previousValue != null))
2116          {
2117            this._Resource.Entity = null;
2118            previousValue.UptimeCalendars.Remove(this);
2119          }
2120          this._Resource.Entity = value;
2121          if ((value != null))
2122          {
2123            value.UptimeCalendars.Add(this);
2124            this._ResourceId = value.ResourceId;
2125          }
2126          else
2127          {
2128            this._ResourceId = default(System.Guid);
2129          }
2130          this.SendPropertyChanged("Resource");
2131        }
2132      }
2133    }
2134   
2135    public event PropertyChangingEventHandler PropertyChanging;
2136   
2137    public event PropertyChangedEventHandler PropertyChanged;
2138   
2139    protected virtual void SendPropertyChanging()
2140    {
2141      if ((this.PropertyChanging != null))
2142      {
2143        this.PropertyChanging(this, emptyChangingEventArgs);
2144      }
2145    }
2146   
2147    protected virtual void SendPropertyChanged(String propertyName)
2148    {
2149      if ((this.PropertyChanged != null))
2150      {
2151        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2152      }
2153    }
2154  }
2155 
2156  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HiveExperiment")]
2157  public partial class HiveExperiment : INotifyPropertyChanging, INotifyPropertyChanged
2158  {
2159   
2160    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2161   
2162    private System.Guid _HiveExperimentId;
2163   
2164    private string _Name;
2165   
2166    private string _Description;
2167   
2168    private string _ResourceIds;
2169   
2170    private System.Guid _UserId;
2171   
2172    private System.Guid _RootJobId;
2173   
2174    private System.DateTime _DateCreated;
2175   
2176    private EntityRef<Job> _Job;
2177   
2178    #region Extensibility Method Definitions
2179    partial void OnLoaded();
2180    partial void OnValidate(System.Data.Linq.ChangeAction action);
2181    partial void OnCreated();
2182    partial void OnHiveExperimentIdChanging(System.Guid value);
2183    partial void OnHiveExperimentIdChanged();
2184    partial void OnNameChanging(string value);
2185    partial void OnNameChanged();
2186    partial void OnDescriptionChanging(string value);
2187    partial void OnDescriptionChanged();
2188    partial void OnResourceIdsChanging(string value);
2189    partial void OnResourceIdsChanged();
2190    partial void OnUserIdChanging(System.Guid value);
2191    partial void OnUserIdChanged();
2192    partial void OnRootJobIdChanging(System.Guid value);
2193    partial void OnRootJobIdChanged();
2194    partial void OnDateCreatedChanging(System.DateTime value);
2195    partial void OnDateCreatedChanged();
2196    #endregion
2197   
2198    public HiveExperiment()
2199    {
2200      this._Job = default(EntityRef<Job>);
2201      OnCreated();
2202    }
2203   
2204    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2205    public System.Guid HiveExperimentId
2206    {
2207      get
2208      {
2209        return this._HiveExperimentId;
2210      }
2211      set
2212      {
2213        if ((this._HiveExperimentId != value))
2214        {
2215          this.OnHiveExperimentIdChanging(value);
2216          this.SendPropertyChanging();
2217          this._HiveExperimentId = value;
2218          this.SendPropertyChanged("HiveExperimentId");
2219          this.OnHiveExperimentIdChanged();
2220        }
2221      }
2222    }
2223   
2224    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]
2225    public string Name
2226    {
2227      get
2228      {
2229        return this._Name;
2230      }
2231      set
2232      {
2233        if ((this._Name != value))
2234        {
2235          this.OnNameChanging(value);
2236          this.SendPropertyChanging();
2237          this._Name = value;
2238          this.SendPropertyChanged("Name");
2239          this.OnNameChanged();
2240        }
2241      }
2242    }
2243   
2244    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="VarChar(MAX)")]
2245    public string Description
2246    {
2247      get
2248      {
2249        return this._Description;
2250      }
2251      set
2252      {
2253        if ((this._Description != value))
2254        {
2255          this.OnDescriptionChanging(value);
2256          this.SendPropertyChanging();
2257          this._Description = value;
2258          this.SendPropertyChanged("Description");
2259          this.OnDescriptionChanged();
2260        }
2261      }
2262    }
2263   
2264    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceIds", DbType="VarChar(MAX)")]
2265    public string ResourceIds
2266    {
2267      get
2268      {
2269        return this._ResourceIds;
2270      }
2271      set
2272      {
2273        if ((this._ResourceIds != value))
2274        {
2275          this.OnResourceIdsChanging(value);
2276          this.SendPropertyChanging();
2277          this._ResourceIds = value;
2278          this.SendPropertyChanged("ResourceIds");
2279          this.OnResourceIdsChanged();
2280        }
2281      }
2282    }
2283   
2284    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
2285    public System.Guid UserId
2286    {
2287      get
2288      {
2289        return this._UserId;
2290      }
2291      set
2292      {
2293        if ((this._UserId != value))
2294        {
2295          this.OnUserIdChanging(value);
2296          this.SendPropertyChanging();
2297          this._UserId = value;
2298          this.SendPropertyChanged("UserId");
2299          this.OnUserIdChanged();
2300        }
2301      }
2302    }
2303   
2304    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RootJobId", DbType="UniqueIdentifier")]
2305    public System.Guid RootJobId
2306    {
2307      get
2308      {
2309        return this._RootJobId;
2310      }
2311      set
2312      {
2313        if ((this._RootJobId != value))
2314        {
2315          if (this._Job.HasLoadedOrAssignedValue)
2316          {
2317            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2318          }
2319          this.OnRootJobIdChanging(value);
2320          this.SendPropertyChanging();
2321          this._RootJobId = value;
2322          this.SendPropertyChanged("RootJobId");
2323          this.OnRootJobIdChanged();
2324        }
2325      }
2326    }
2327   
2328    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
2329    public System.DateTime DateCreated
2330    {
2331      get
2332      {
2333        return this._DateCreated;
2334      }
2335      set
2336      {
2337        if ((this._DateCreated != value))
2338        {
2339          this.OnDateCreatedChanging(value);
2340          this.SendPropertyChanging();
2341          this._DateCreated = value;
2342          this.SendPropertyChanged("DateCreated");
2343          this.OnDateCreatedChanged();
2344        }
2345      }
2346    }
2347   
2348    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_HiveExperiment", Storage="_Job", ThisKey="RootJobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")]
2349    public Job RootJob
2350    {
2351      get
2352      {
2353        return this._Job.Entity;
2354      }
2355      set
2356      {
2357        if ((this._Job.Entity != value))
2358        {
2359          this.SendPropertyChanging();
2360          this._Job.Entity = value;
2361          this.SendPropertyChanged("RootJob");
2362        }
2363      }
2364    }
2365   
2366    public event PropertyChangingEventHandler PropertyChanging;
2367   
2368    public event PropertyChangedEventHandler PropertyChanged;
2369   
2370    protected virtual void SendPropertyChanging()
2371    {
2372      if ((this.PropertyChanging != null))
2373      {
2374        this.PropertyChanging(this, emptyChangingEventArgs);
2375      }
2376    }
2377   
2378    protected virtual void SendPropertyChanged(String propertyName)
2379    {
2380      if ((this.PropertyChanged != null))
2381      {
2382        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2383      }
2384    }
2385  }
2386 
2387  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
2388  public partial class JobData : INotifyPropertyChanging, INotifyPropertyChanged
2389  {
2390   
2391    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2392   
2393    private System.Guid _JobId;
2394   
2395    private System.Data.Linq.Binary _Data;
2396   
2397    private System.DateTime _LastUpdate;
2398   
2399    private EntityRef<Job> _Job;
2400   
2401    #region Extensibility Method Definitions
2402    partial void OnLoaded();
2403    partial void OnValidate(System.Data.Linq.ChangeAction action);
2404    partial void OnCreated();
2405    partial void OnJobIdChanging(System.Guid value);
2406    partial void OnJobIdChanged();
2407    partial void OnDataChanging(System.Data.Linq.Binary value);
2408    partial void OnDataChanged();
2409    partial void OnLastUpdateChanging(System.DateTime value);
2410    partial void OnLastUpdateChanged();
2411    #endregion
2412   
2413    public JobData()
2414    {
2415      this._Job = default(EntityRef<Job>);
2416      OnCreated();
2417    }
2418   
2419    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
2420    public System.Guid JobId
2421    {
2422      get
2423      {
2424        return this._JobId;
2425      }
2426      set
2427      {
2428        if ((this._JobId != value))
2429        {
2430          if (this._Job.HasLoadedOrAssignedValue)
2431          {
2432            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2433          }
2434          this.OnJobIdChanging(value);
2435          this.SendPropertyChanging();
2436          this._JobId = value;
2437          this.SendPropertyChanged("JobId");
2438          this.OnJobIdChanged();
2439        }
2440      }
2441    }
2442   
2443    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2444    public System.Data.Linq.Binary Data
2445    {
2446      get
2447      {
2448        return this._Data;
2449      }
2450      set
2451      {
2452        if ((this._Data != value))
2453        {
2454          this.OnDataChanging(value);
2455          this.SendPropertyChanging();
2456          this._Data = value;
2457          this.SendPropertyChanged("Data");
2458          this.OnDataChanged();
2459        }
2460      }
2461    }
2462   
2463    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastUpdate", DbType="DateTime")]
2464    public System.DateTime LastUpdate
2465    {
2466      get
2467      {
2468        return this._LastUpdate;
2469      }
2470      set
2471      {
2472        if ((this._LastUpdate != value))
2473        {
2474          this.OnLastUpdateChanging(value);
2475          this.SendPropertyChanging();
2476          this._LastUpdate = value;
2477          this.SendPropertyChanged("LastUpdate");
2478          this.OnLastUpdateChanged();
2479        }
2480      }
2481    }
2482   
2483    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobData", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
2484    public Job Job
2485    {
2486      get
2487      {
2488        return this._Job.Entity;
2489      }
2490      set
2491      {
2492        Job previousValue = this._Job.Entity;
2493        if (((previousValue != value)
2494              || (this._Job.HasLoadedOrAssignedValue == false)))
2495        {
2496          this.SendPropertyChanging();
2497          if ((previousValue != null))
2498          {
2499            this._Job.Entity = null;
2500            previousValue.JobData = null;
2501          }
2502          this._Job.Entity = value;
2503          if ((value != null))
2504          {
2505            value.JobData = this;
2506            this._JobId = value.JobId;
2507          }
2508          else
2509          {
2510            this._JobId = default(System.Guid);
2511          }
2512          this.SendPropertyChanged("Job");
2513        }
2514      }
2515    }
2516   
2517    public event PropertyChangingEventHandler PropertyChanging;
2518   
2519    public event PropertyChangedEventHandler PropertyChanged;
2520   
2521    protected virtual void SendPropertyChanging()
2522    {
2523      if ((this.PropertyChanging != null))
2524      {
2525        this.PropertyChanging(this, emptyChangingEventArgs);
2526      }
2527    }
2528   
2529    protected virtual void SendPropertyChanged(String propertyName)
2530    {
2531      if ((this.PropertyChanged != null))
2532      {
2533        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2534      }
2535    }
2536  }
2537 
2538  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
2539  public partial class PluginData : INotifyPropertyChanging, INotifyPropertyChanged
2540  {
2541   
2542    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2543   
2544    private System.Guid _PluginDataId;
2545   
2546    private System.Guid _PluginId;
2547   
2548    private System.Data.Linq.Binary _Data;
2549   
2550    private string _FileName;
2551   
2552    private EntityRef<Plugin> _Plugin;
2553   
2554    #region Extensibility Method Definitions
2555    partial void OnLoaded();
2556    partial void OnValidate(System.Data.Linq.ChangeAction action);
2557    partial void OnCreated();
2558    partial void OnPluginDataIdChanging(System.Guid value);
2559    partial void OnPluginDataIdChanged();
2560    partial void OnPluginIdChanging(System.Guid value);
2561    partial void OnPluginIdChanged();
2562    partial void OnDataChanging(System.Data.Linq.Binary value);
2563    partial void OnDataChanged();
2564    partial void OnFileNameChanging(string value);
2565    partial void OnFileNameChanged();
2566    #endregion
2567   
2568    public PluginData()
2569    {
2570      this._Plugin = default(EntityRef<Plugin>);
2571      OnCreated();
2572    }
2573   
2574    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginDataId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2575    public System.Guid PluginDataId
2576    {
2577      get
2578      {
2579        return this._PluginDataId;
2580      }
2581      set
2582      {
2583        if ((this._PluginDataId != value))
2584        {
2585          this.OnPluginDataIdChanging(value);
2586          this.SendPropertyChanging();
2587          this._PluginDataId = value;
2588          this.SendPropertyChanged("PluginDataId");
2589          this.OnPluginDataIdChanged();
2590        }
2591      }
2592    }
2593   
2594    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
2595    public System.Guid PluginId
2596    {
2597      get
2598      {
2599        return this._PluginId;
2600      }
2601      set
2602      {
2603        if ((this._PluginId != value))
2604        {
2605          if (this._Plugin.HasLoadedOrAssignedValue)
2606          {
2607            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2608          }
2609          this.OnPluginIdChanging(value);
2610          this.SendPropertyChanging();
2611          this._PluginId = value;
2612          this.SendPropertyChanged("PluginId");
2613          this.OnPluginIdChanged();
2614        }
2615      }
2616    }
2617   
2618    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2619    public System.Data.Linq.Binary Data
2620    {
2621      get
2622      {
2623        return this._Data;
2624      }
2625      set
2626      {
2627        if ((this._Data != value))
2628        {
2629          this.OnDataChanging(value);
2630          this.SendPropertyChanging();
2631          this._Data = value;
2632          this.SendPropertyChanged("Data");
2633          this.OnDataChanged();
2634        }
2635      }
2636    }
2637   
2638    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="VarChar(MAX)", CanBeNull=false)]
2639    public string FileName
2640    {
2641      get
2642      {
2643        return this._FileName;
2644      }
2645      set
2646      {
2647        if ((this._FileName != value))
2648        {
2649          this.OnFileNameChanging(value);
2650          this.SendPropertyChanging();
2651          this._FileName = value;
2652          this.SendPropertyChanged("FileName");
2653          this.OnFileNameChanged();
2654        }
2655      }
2656    }
2657   
2658    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginData", Storage="_Plugin", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true)]
2659    public Plugin Plugin
2660    {
2661      get
2662      {
2663        return this._Plugin.Entity;
2664      }
2665      set
2666      {
2667        Plugin previousValue = this._Plugin.Entity;
2668        if (((previousValue != value)
2669              || (this._Plugin.HasLoadedOrAssignedValue == false)))
2670        {
2671          this.SendPropertyChanging();
2672          if ((previousValue != null))
2673          {
2674            this._Plugin.Entity = null;
2675            previousValue.PluginData.Remove(this);
2676          }
2677          this._Plugin.Entity = value;
2678          if ((value != null))
2679          {
2680            value.PluginData.Add(this);
2681            this._PluginId = value.PluginId;
2682          }
2683          else
2684          {
2685            this._PluginId = default(System.Guid);
2686          }
2687          this.SendPropertyChanged("Plugin");
2688        }
2689      }
2690    }
2691   
2692    public event PropertyChangingEventHandler PropertyChanging;
2693   
2694    public event PropertyChangedEventHandler PropertyChanged;
2695   
2696    protected virtual void SendPropertyChanging()
2697    {
2698      if ((this.PropertyChanging != null))
2699      {
2700        this.PropertyChanging(this, emptyChangingEventArgs);
2701      }
2702    }
2703   
2704    protected virtual void SendPropertyChanged(String propertyName)
2705    {
2706      if ((this.PropertyChanged != null))
2707      {
2708        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2709      }
2710    }
2711  }
2712}
2713#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.