Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Hive.designer.cs @ 3031

Last change on this file since 3031 was 3022, checked in by kgrading, 14 years ago

added the calendar in the dal and the server console. Works on every Resource (Group / Client) (#908)

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