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

Last change on this file since 5053 was 4905, checked in by cneumuel, 14 years ago

#1233

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