Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs @ 4333

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

added authorizationManager which checks for permission to specific jobs (#1168)

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