Free cookie consent management tool by TermsFeed Policy Generator

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

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

implemented the server on the client, using push & force push, added refresh buttons, added auto calender methods that traverse the tree... (#908)

File size: 78.1 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 InsertJob(Job instance);
61    partial void UpdateJob(Job instance);
62    partial void DeleteJob(Job instance);
63    partial void InsertUptimeCalendar(UptimeCalendar instance);
64    partial void UpdateUptimeCalendar(UptimeCalendar instance);
65    partial void DeleteUptimeCalendar(UptimeCalendar instance);
66    partial void InsertClient(Client instance);
67    partial void UpdateClient(Client instance);
68    partial void DeleteClient(Client 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<Job> Jobs
174    {
175      get
176      {
177        return this.GetTable<Job>();
178      }
179    }
180   
181    public System.Data.Linq.Table<UptimeCalendar> UptimeCalendars
182    {
183      get
184      {
185        return this.GetTable<UptimeCalendar>();
186      }
187    }
188   
189    public System.Data.Linq.Table<Client> Clients
190    {
191      get
192      {
193        return this.GetTable<Client>();
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 EntitySet<UptimeCalendar> _UptimeCalendars;
1511   
1512    private EntityRef<Client> _Client;
1513   
1514    private EntityRef<Client> _Client1;
1515   
1516    #region Extensibility Method Definitions
1517    partial void OnLoaded();
1518    partial void OnValidate(System.Data.Linq.ChangeAction action);
1519    partial void OnCreated();
1520    partial void OnResourceIdChanging(System.Guid value);
1521    partial void OnResourceIdChanged();
1522    partial void OnNameChanging(string value);
1523    partial void OnNameChanged();
1524    #endregion
1525   
1526    public Resource()
1527    {
1528      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
1529      this._ClientGroup = default(EntityRef<ClientGroup>);
1530      this._ClientGroup_Resources = new EntitySet<ClientGroup_Resource>(new Action<ClientGroup_Resource>(this.attach_ClientGroup_Resources), new Action<ClientGroup_Resource>(this.detach_ClientGroup_Resources));
1531      this._UptimeCalendars = new EntitySet<UptimeCalendar>(new Action<UptimeCalendar>(this.attach_UptimeCalendars), new Action<UptimeCalendar>(this.detach_UptimeCalendars));
1532      this._Client = default(EntityRef<Client>);
1533      this._Client1 = default(EntityRef<Client>);
1534      OnCreated();
1535    }
1536   
1537    [Column(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
1538    public System.Guid ResourceId
1539    {
1540      get
1541      {
1542        return this._ResourceId;
1543      }
1544      set
1545      {
1546        if ((this._ResourceId != value))
1547        {
1548          this.OnResourceIdChanging(value);
1549          this.SendPropertyChanging();
1550          this._ResourceId = value;
1551          this.SendPropertyChanged("ResourceId");
1552          this.OnResourceIdChanged();
1553        }
1554      }
1555    }
1556   
1557    [Column(Storage="_Name", DbType="VarChar(MAX)")]
1558    public string Name
1559    {
1560      get
1561      {
1562        return this._Name;
1563      }
1564      set
1565      {
1566        if ((this._Name != value))
1567        {
1568          this.OnNameChanging(value);
1569          this.SendPropertyChanging();
1570          this._Name = value;
1571          this.SendPropertyChanged("Name");
1572          this.OnNameChanged();
1573        }
1574      }
1575    }
1576   
1577    [Association(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
1578    public EntitySet<AssignedResource> AssignedResources
1579    {
1580      get
1581      {
1582        return this._AssignedResources;
1583      }
1584      set
1585      {
1586        this._AssignedResources.Assign(value);
1587      }
1588    }
1589   
1590    [Association(Name="Resource_ClientGroup", Storage="_ClientGroup", ThisKey="ResourceId", OtherKey="ResourceId", IsUnique=true, IsForeignKey=false)]
1591    public ClientGroup ClientGroup
1592    {
1593      get
1594      {
1595        return this._ClientGroup.Entity;
1596      }
1597      set
1598      {
1599        ClientGroup previousValue = this._ClientGroup.Entity;
1600        if (((previousValue != value)
1601              || (this._ClientGroup.HasLoadedOrAssignedValue == false)))
1602        {
1603          this.SendPropertyChanging();
1604          if ((previousValue != null))
1605          {
1606            this._ClientGroup.Entity = null;
1607            previousValue.Resource = null;
1608          }
1609          this._ClientGroup.Entity = value;
1610          if ((value != null))
1611          {
1612            value.Resource = this;
1613          }
1614          this.SendPropertyChanged("ClientGroup");
1615        }
1616      }
1617    }
1618   
1619    [Association(Name="Resource_ClientGroup_Resource", Storage="_ClientGroup_Resources", ThisKey="ResourceId", OtherKey="ResourceId")]
1620    public EntitySet<ClientGroup_Resource> ClientGroup_Resources
1621    {
1622      get
1623      {
1624        return this._ClientGroup_Resources;
1625      }
1626      set
1627      {
1628        this._ClientGroup_Resources.Assign(value);
1629      }
1630    }
1631   
1632    [Association(Name="Resource_UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
1633    public EntitySet<UptimeCalendar> UptimeCalendars
1634    {
1635      get
1636      {
1637        return this._UptimeCalendars;
1638      }
1639      set
1640      {
1641        this._UptimeCalendars.Assign(value);
1642      }
1643    }
1644   
1645    [Association(Name="Resource_Client", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsUnique=true, IsForeignKey=false)]
1646    public Client Client
1647    {
1648      get
1649      {
1650        return this._Client.Entity;
1651      }
1652      set
1653      {
1654        Client previousValue = this._Client.Entity;
1655        if (((previousValue != value)
1656              || (this._Client.HasLoadedOrAssignedValue == false)))
1657        {
1658          this.SendPropertyChanging();
1659          if ((previousValue != null))
1660          {
1661            this._Client.Entity = null;
1662            previousValue.Resource = null;
1663          }
1664          this._Client.Entity = value;
1665          if ((value != null))
1666          {
1667            value.Resource = this;
1668          }
1669          this.SendPropertyChanged("Client");
1670        }
1671      }
1672    }
1673   
1674    [Association(Name="Resource_Client1", Storage="_Client1", ThisKey="ResourceId", OtherKey="ResourceId", IsUnique=true, IsForeignKey=false)]
1675    public Client Client1
1676    {
1677      get
1678      {
1679        return this._Client1.Entity;
1680      }
1681      set
1682      {
1683        Client previousValue = this._Client1.Entity;
1684        if (((previousValue != value)
1685              || (this._Client1.HasLoadedOrAssignedValue == false)))
1686        {
1687          this.SendPropertyChanging();
1688          if ((previousValue != null))
1689          {
1690            this._Client1.Entity = null;
1691            previousValue.Resource1 = null;
1692          }
1693          this._Client1.Entity = value;
1694          if ((value != null))
1695          {
1696            value.Resource1 = this;
1697          }
1698          this.SendPropertyChanged("Client1");
1699        }
1700      }
1701    }
1702   
1703    public event PropertyChangingEventHandler PropertyChanging;
1704   
1705    public event PropertyChangedEventHandler PropertyChanged;
1706   
1707    protected virtual void SendPropertyChanging()
1708    {
1709      if ((this.PropertyChanging != null))
1710      {
1711        this.PropertyChanging(this, emptyChangingEventArgs);
1712      }
1713    }
1714   
1715    protected virtual void SendPropertyChanged(String propertyName)
1716    {
1717      if ((this.PropertyChanged != null))
1718      {
1719        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1720      }
1721    }
1722   
1723    private void attach_AssignedResources(AssignedResource entity)
1724    {
1725      this.SendPropertyChanging();
1726      entity.Resource = this;
1727    }
1728   
1729    private void detach_AssignedResources(AssignedResource entity)
1730    {
1731      this.SendPropertyChanging();
1732      entity.Resource = null;
1733    }
1734   
1735    private void attach_ClientGroup_Resources(ClientGroup_Resource entity)
1736    {
1737      this.SendPropertyChanging();
1738      entity.Resource = this;
1739    }
1740   
1741    private void detach_ClientGroup_Resources(ClientGroup_Resource entity)
1742    {
1743      this.SendPropertyChanging();
1744      entity.Resource = null;
1745    }
1746   
1747    private void attach_UptimeCalendars(UptimeCalendar entity)
1748    {
1749      this.SendPropertyChanging();
1750      entity.Resource = this;
1751    }
1752   
1753    private void detach_UptimeCalendars(UptimeCalendar entity)
1754    {
1755      this.SendPropertyChanging();
1756      entity.Resource = null;
1757    }
1758  }
1759 
1760  [Table(Name="dbo.Job")]
1761  public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
1762  {
1763   
1764    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1765   
1766    private System.Guid _JobId;
1767   
1768    private System.Nullable<System.Guid> _ParentJobId;
1769   
1770    private string _JobState;
1771   
1772    private System.Nullable<System.Guid> _ResourceId;
1773   
1774    private System.Nullable<double> _Percentage;
1775   
1776    private System.Data.Linq.Binary _SerializedJob;
1777   
1778    private System.Nullable<System.DateTime> _DateCreated;
1779   
1780    private System.Nullable<System.DateTime> _DateCalculated;
1781   
1782    private System.Nullable<System.DateTime> _DateFinished;
1783   
1784    private int _Priority;
1785   
1786    private System.Nullable<System.Guid> _ProjectId;
1787   
1788    private System.Nullable<System.Guid> _UserId;
1789   
1790    private int _CoresNeeded;
1791   
1792    private int _MemoryNeeded;
1793   
1794    private EntitySet<AssignedResource> _AssignedResources;
1795   
1796    private EntitySet<RequiredPlugin> _RequiredPlugins;
1797   
1798    private EntitySet<Job> _Jobs;
1799   
1800    private EntityRef<Job> _Job1;
1801   
1802    private EntityRef<Project> _Project;
1803   
1804    private EntityRef<Client> _Client;
1805   
1806    #region Extensibility Method Definitions
1807    partial void OnLoaded();
1808    partial void OnValidate(System.Data.Linq.ChangeAction action);
1809    partial void OnCreated();
1810    partial void OnJobIdChanging(System.Guid value);
1811    partial void OnJobIdChanged();
1812    partial void OnParentJobIdChanging(System.Nullable<System.Guid> value);
1813    partial void OnParentJobIdChanged();
1814    partial void OnJobStateChanging(string value);
1815    partial void OnJobStateChanged();
1816    partial void OnResourceIdChanging(System.Nullable<System.Guid> value);
1817    partial void OnResourceIdChanged();
1818    partial void OnPercentageChanging(System.Nullable<double> value);
1819    partial void OnPercentageChanged();
1820    partial void OnSerializedJobChanging(System.Data.Linq.Binary value);
1821    partial void OnSerializedJobChanged();
1822    partial void OnDateCreatedChanging(System.Nullable<System.DateTime> value);
1823    partial void OnDateCreatedChanged();
1824    partial void OnDateCalculatedChanging(System.Nullable<System.DateTime> value);
1825    partial void OnDateCalculatedChanged();
1826    partial void OnDateFinishedChanging(System.Nullable<System.DateTime> value);
1827    partial void OnDateFinishedChanged();
1828    partial void OnPriorityChanging(int value);
1829    partial void OnPriorityChanged();
1830    partial void OnProjectIdChanging(System.Nullable<System.Guid> value);
1831    partial void OnProjectIdChanged();
1832    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
1833    partial void OnUserIdChanged();
1834    partial void OnCoresNeededChanging(int value);
1835    partial void OnCoresNeededChanged();
1836    partial void OnMemoryNeededChanging(int value);
1837    partial void OnMemoryNeededChanged();
1838    #endregion
1839   
1840    public Job()
1841    {
1842      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
1843      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
1844      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
1845      this._Job1 = default(EntityRef<Job>);
1846      this._Project = default(EntityRef<Project>);
1847      this._Client = default(EntityRef<Client>);
1848      OnCreated();
1849    }
1850   
1851    [Column(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
1852    public System.Guid JobId
1853    {
1854      get
1855      {
1856        return this._JobId;
1857      }
1858      set
1859      {
1860        if ((this._JobId != value))
1861        {
1862          this.OnJobIdChanging(value);
1863          this.SendPropertyChanging();
1864          this._JobId = value;
1865          this.SendPropertyChanged("JobId");
1866          this.OnJobIdChanged();
1867        }
1868      }
1869    }
1870   
1871    [Column(Storage="_ParentJobId", DbType="UniqueIdentifier")]
1872    public System.Nullable<System.Guid> ParentJobId
1873    {
1874      get
1875      {
1876        return this._ParentJobId;
1877      }
1878      set
1879      {
1880        if ((this._ParentJobId != value))
1881        {
1882          if (this._Job1.HasLoadedOrAssignedValue)
1883          {
1884            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1885          }
1886          this.OnParentJobIdChanging(value);
1887          this.SendPropertyChanging();
1888          this._ParentJobId = value;
1889          this.SendPropertyChanged("ParentJobId");
1890          this.OnParentJobIdChanged();
1891        }
1892      }
1893    }
1894   
1895    [Column(Storage="_JobState", DbType="VarChar(MAX)")]
1896    public string JobState
1897    {
1898      get
1899      {
1900        return this._JobState;
1901      }
1902      set
1903      {
1904        if ((this._JobState != value))
1905        {
1906          this.OnJobStateChanging(value);
1907          this.SendPropertyChanging();
1908          this._JobState = value;
1909          this.SendPropertyChanged("JobState");
1910          this.OnJobStateChanged();
1911        }
1912      }
1913    }
1914   
1915    [Column(Storage="_ResourceId", DbType="UniqueIdentifier")]
1916    public System.Nullable<System.Guid> ResourceId
1917    {
1918      get
1919      {
1920        return this._ResourceId;
1921      }
1922      set
1923      {
1924        if ((this._ResourceId != value))
1925        {
1926          if (this._Client.HasLoadedOrAssignedValue)
1927          {
1928            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1929          }
1930          this.OnResourceIdChanging(value);
1931          this.SendPropertyChanging();
1932          this._ResourceId = value;
1933          this.SendPropertyChanged("ResourceId");
1934          this.OnResourceIdChanged();
1935        }
1936      }
1937    }
1938   
1939    [Column(Storage="_Percentage", DbType="Float")]
1940    public System.Nullable<double> Percentage
1941    {
1942      get
1943      {
1944        return this._Percentage;
1945      }
1946      set
1947      {
1948        if ((this._Percentage != value))
1949        {
1950          this.OnPercentageChanging(value);
1951          this.SendPropertyChanging();
1952          this._Percentage = value;
1953          this.SendPropertyChanged("Percentage");
1954          this.OnPercentageChanged();
1955        }
1956      }
1957    }
1958   
1959    [Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", CanBeNull=true, UpdateCheck=UpdateCheck.Never)]
1960    public System.Data.Linq.Binary SerializedJob
1961    {
1962      get
1963      {
1964        return this._SerializedJob;
1965      }
1966      set
1967      {
1968        if ((this._SerializedJob != value))
1969        {
1970          this.OnSerializedJobChanging(value);
1971          this.SendPropertyChanging();
1972          this._SerializedJob = value;
1973          this.SendPropertyChanged("SerializedJob");
1974          this.OnSerializedJobChanged();
1975        }
1976      }
1977    }
1978   
1979    [Column(Storage="_DateCreated", DbType="DateTime")]
1980    public System.Nullable<System.DateTime> DateCreated
1981    {
1982      get
1983      {
1984        return this._DateCreated;
1985      }
1986      set
1987      {
1988        if ((this._DateCreated != value))
1989        {
1990          this.OnDateCreatedChanging(value);
1991          this.SendPropertyChanging();
1992          this._DateCreated = value;
1993          this.SendPropertyChanged("DateCreated");
1994          this.OnDateCreatedChanged();
1995        }
1996      }
1997    }
1998   
1999    [Column(Storage="_DateCalculated", DbType="DateTime")]
2000    public System.Nullable<System.DateTime> DateCalculated
2001    {
2002      get
2003      {
2004        return this._DateCalculated;
2005      }
2006      set
2007      {
2008        if ((this._DateCalculated != value))
2009        {
2010          this.OnDateCalculatedChanging(value);
2011          this.SendPropertyChanging();
2012          this._DateCalculated = value;
2013          this.SendPropertyChanged("DateCalculated");
2014          this.OnDateCalculatedChanged();
2015        }
2016      }
2017    }
2018   
2019    [Column(Storage="_DateFinished", DbType="DateTime")]
2020    public System.Nullable<System.DateTime> DateFinished
2021    {
2022      get
2023      {
2024        return this._DateFinished;
2025      }
2026      set
2027      {
2028        if ((this._DateFinished != value))
2029        {
2030          this.OnDateFinishedChanging(value);
2031          this.SendPropertyChanging();
2032          this._DateFinished = value;
2033          this.SendPropertyChanged("DateFinished");
2034          this.OnDateFinishedChanged();
2035        }
2036      }
2037    }
2038   
2039    [Column(Storage="_Priority", DbType="Int NOT NULL")]
2040    public int Priority
2041    {
2042      get
2043      {
2044        return this._Priority;
2045      }
2046      set
2047      {
2048        if ((this._Priority != value))
2049        {
2050          this.OnPriorityChanging(value);
2051          this.SendPropertyChanging();
2052          this._Priority = value;
2053          this.SendPropertyChanged("Priority");
2054          this.OnPriorityChanged();
2055        }
2056      }
2057    }
2058   
2059    [Column(Storage="_ProjectId", DbType="UniqueIdentifier")]
2060    public System.Nullable<System.Guid> ProjectId
2061    {
2062      get
2063      {
2064        return this._ProjectId;
2065      }
2066      set
2067      {
2068        if ((this._ProjectId != value))
2069        {
2070          if (this._Project.HasLoadedOrAssignedValue)
2071          {
2072            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2073          }
2074          this.OnProjectIdChanging(value);
2075          this.SendPropertyChanging();
2076          this._ProjectId = value;
2077          this.SendPropertyChanged("ProjectId");
2078          this.OnProjectIdChanged();
2079        }
2080      }
2081    }
2082   
2083    [Column(Storage="_UserId", DbType="UniqueIdentifier")]
2084    public System.Nullable<System.Guid> UserId
2085    {
2086      get
2087      {
2088        return this._UserId;
2089      }
2090      set
2091      {
2092        if ((this._UserId != value))
2093        {
2094          this.OnUserIdChanging(value);
2095          this.SendPropertyChanging();
2096          this._UserId = value;
2097          this.SendPropertyChanged("UserId");
2098          this.OnUserIdChanged();
2099        }
2100      }
2101    }
2102   
2103    [Column(Storage="_CoresNeeded", DbType="Int NOT NULL")]
2104    public int CoresNeeded
2105    {
2106      get
2107      {
2108        return this._CoresNeeded;
2109      }
2110      set
2111      {
2112        if ((this._CoresNeeded != value))
2113        {
2114          this.OnCoresNeededChanging(value);
2115          this.SendPropertyChanging();
2116          this._CoresNeeded = value;
2117          this.SendPropertyChanged("CoresNeeded");
2118          this.OnCoresNeededChanged();
2119        }
2120      }
2121    }
2122   
2123    [Column(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
2124    public int MemoryNeeded
2125    {
2126      get
2127      {
2128        return this._MemoryNeeded;
2129      }
2130      set
2131      {
2132        if ((this._MemoryNeeded != value))
2133        {
2134          this.OnMemoryNeededChanging(value);
2135          this.SendPropertyChanging();
2136          this._MemoryNeeded = value;
2137          this.SendPropertyChanged("MemoryNeeded");
2138          this.OnMemoryNeededChanged();
2139        }
2140      }
2141    }
2142   
2143    [Association(Name="Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")]
2144    public EntitySet<AssignedResource> AssignedResources
2145    {
2146      get
2147      {
2148        return this._AssignedResources;
2149      }
2150      set
2151      {
2152        this._AssignedResources.Assign(value);
2153      }
2154    }
2155   
2156    [Association(Name="Job_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="JobId", OtherKey="JobId")]
2157    public EntitySet<RequiredPlugin> RequiredPlugins
2158    {
2159      get
2160      {
2161        return this._RequiredPlugins;
2162      }
2163      set
2164      {
2165        this._RequiredPlugins.Assign(value);
2166      }
2167    }
2168   
2169    [Association(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]
2170    public EntitySet<Job> Jobs
2171    {
2172      get
2173      {
2174        return this._Jobs;
2175      }
2176      set
2177      {
2178        this._Jobs.Assign(value);
2179      }
2180    }
2181   
2182    [Association(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]
2183    public Job Job1
2184    {
2185      get
2186      {
2187        return this._Job1.Entity;
2188      }
2189      set
2190      {
2191        Job previousValue = this._Job1.Entity;
2192        if (((previousValue != value)
2193              || (this._Job1.HasLoadedOrAssignedValue == false)))
2194        {
2195          this.SendPropertyChanging();
2196          if ((previousValue != null))
2197          {
2198            this._Job1.Entity = null;
2199            previousValue.Jobs.Remove(this);
2200          }
2201          this._Job1.Entity = value;
2202          if ((value != null))
2203          {
2204            value.Jobs.Add(this);
2205            this._ParentJobId = value.JobId;
2206          }
2207          else
2208          {
2209            this._ParentJobId = default(Nullable<System.Guid>);
2210          }
2211          this.SendPropertyChanged("Job1");
2212        }
2213      }
2214    }
2215   
2216    [Association(Name="Project_Job", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="SET NULL")]
2217    public Project Project
2218    {
2219      get
2220      {
2221        return this._Project.Entity;
2222      }
2223      set
2224      {
2225        Project previousValue = this._Project.Entity;
2226        if (((previousValue != value)
2227              || (this._Project.HasLoadedOrAssignedValue == false)))
2228        {
2229          this.SendPropertyChanging();
2230          if ((previousValue != null))
2231          {
2232            this._Project.Entity = null;
2233            previousValue.Jobs.Remove(this);
2234          }
2235          this._Project.Entity = value;
2236          if ((value != null))
2237          {
2238            value.Jobs.Add(this);
2239            this._ProjectId = value.ProjectId;
2240          }
2241          else
2242          {
2243            this._ProjectId = default(Nullable<System.Guid>);
2244          }
2245          this.SendPropertyChanged("Project");
2246        }
2247      }
2248    }
2249   
2250    [Association(Name="Client_Job", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
2251    public Client Client
2252    {
2253      get
2254      {
2255        return this._Client.Entity;
2256      }
2257      set
2258      {
2259        Client previousValue = this._Client.Entity;
2260        if (((previousValue != value)
2261              || (this._Client.HasLoadedOrAssignedValue == false)))
2262        {
2263          this.SendPropertyChanging();
2264          if ((previousValue != null))
2265          {
2266            this._Client.Entity = null;
2267            previousValue.Jobs.Remove(this);
2268          }
2269          this._Client.Entity = value;
2270          if ((value != null))
2271          {
2272            value.Jobs.Add(this);
2273            this._ResourceId = value.ResourceId;
2274          }
2275          else
2276          {
2277            this._ResourceId = default(Nullable<System.Guid>);
2278          }
2279          this.SendPropertyChanged("Client");
2280        }
2281      }
2282    }
2283   
2284    public event PropertyChangingEventHandler PropertyChanging;
2285   
2286    public event PropertyChangedEventHandler PropertyChanged;
2287   
2288    protected virtual void SendPropertyChanging()
2289    {
2290      if ((this.PropertyChanging != null))
2291      {
2292        this.PropertyChanging(this, emptyChangingEventArgs);
2293      }
2294    }
2295   
2296    protected virtual void SendPropertyChanged(String propertyName)
2297    {
2298      if ((this.PropertyChanged != null))
2299      {
2300        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2301      }
2302    }
2303   
2304    private void attach_AssignedResources(AssignedResource entity)
2305    {
2306      this.SendPropertyChanging();
2307      entity.Job = this;
2308    }
2309   
2310    private void detach_AssignedResources(AssignedResource entity)
2311    {
2312      this.SendPropertyChanging();
2313      entity.Job = null;
2314    }
2315   
2316    private void attach_RequiredPlugins(RequiredPlugin entity)
2317    {
2318      this.SendPropertyChanging();
2319      entity.Job = this;
2320    }
2321   
2322    private void detach_RequiredPlugins(RequiredPlugin entity)
2323    {
2324      this.SendPropertyChanging();
2325      entity.Job = null;
2326    }
2327   
2328    private void attach_Jobs(Job entity)
2329    {
2330      this.SendPropertyChanging();
2331      entity.Job1 = this;
2332    }
2333   
2334    private void detach_Jobs(Job entity)
2335    {
2336      this.SendPropertyChanging();
2337      entity.Job1 = null;
2338    }
2339  }
2340 
2341  [Table(Name="dbo.UptimeCalendar")]
2342  public partial class UptimeCalendar : INotifyPropertyChanging, INotifyPropertyChanged
2343  {
2344   
2345    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2346   
2347    private System.Guid _UptimeCalendarId;
2348   
2349    private System.Guid _ResourceId;
2350   
2351    private System.DateTime _StartDate;
2352   
2353    private System.DateTime _EndDate;
2354   
2355    private bool _AllDayEvent;
2356   
2357    private bool _Recurring;
2358   
2359    private System.Guid _RecurringId;
2360   
2361    private EntityRef<Resource> _Resource;
2362   
2363    #region Extensibility Method Definitions
2364    partial void OnLoaded();
2365    partial void OnValidate(System.Data.Linq.ChangeAction action);
2366    partial void OnCreated();
2367    partial void OnUptimeCalendarIdChanging(System.Guid value);
2368    partial void OnUptimeCalendarIdChanged();
2369    partial void OnResourceIdChanging(System.Guid value);
2370    partial void OnResourceIdChanged();
2371    partial void OnStartDateChanging(System.DateTime value);
2372    partial void OnStartDateChanged();
2373    partial void OnEndDateChanging(System.DateTime value);
2374    partial void OnEndDateChanged();
2375    partial void OnAllDayEventChanging(bool value);
2376    partial void OnAllDayEventChanged();
2377    partial void OnRecurringChanging(bool value);
2378    partial void OnRecurringChanged();
2379    partial void OnRecurringIdChanging(System.Guid value);
2380    partial void OnRecurringIdChanged();
2381    #endregion
2382   
2383    public UptimeCalendar()
2384    {
2385      this._Resource = default(EntityRef<Resource>);
2386      OnCreated();
2387    }
2388   
2389    [Column(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
2390    public System.Guid UptimeCalendarId
2391    {
2392      get
2393      {
2394        return this._UptimeCalendarId;
2395      }
2396      set
2397      {
2398        if ((this._UptimeCalendarId != value))
2399        {
2400          this.OnUptimeCalendarIdChanging(value);
2401          this.SendPropertyChanging();
2402          this._UptimeCalendarId = value;
2403          this.SendPropertyChanged("UptimeCalendarId");
2404          this.OnUptimeCalendarIdChanged();
2405        }
2406      }
2407    }
2408   
2409    [Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
2410    public System.Guid ResourceId
2411    {
2412      get
2413      {
2414        return this._ResourceId;
2415      }
2416      set
2417      {
2418        if ((this._ResourceId != value))
2419        {
2420          if (this._Resource.HasLoadedOrAssignedValue)
2421          {
2422            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2423          }
2424          this.OnResourceIdChanging(value);
2425          this.SendPropertyChanging();
2426          this._ResourceId = value;
2427          this.SendPropertyChanged("ResourceId");
2428          this.OnResourceIdChanged();
2429        }
2430      }
2431    }
2432   
2433    [Column(Storage="_StartDate", DbType="DateTime NOT NULL")]
2434    public System.DateTime StartDate
2435    {
2436      get
2437      {
2438        return this._StartDate;
2439      }
2440      set
2441      {
2442        if ((this._StartDate != value))
2443        {
2444          this.OnStartDateChanging(value);
2445          this.SendPropertyChanging();
2446          this._StartDate = value;
2447          this.SendPropertyChanged("StartDate");
2448          this.OnStartDateChanged();
2449        }
2450      }
2451    }
2452   
2453    [Column(Storage="_EndDate", DbType="DateTime NOT NULL")]
2454    public System.DateTime EndDate
2455    {
2456      get
2457      {
2458        return this._EndDate;
2459      }
2460      set
2461      {
2462        if ((this._EndDate != value))
2463        {
2464          this.OnEndDateChanging(value);
2465          this.SendPropertyChanging();
2466          this._EndDate = value;
2467          this.SendPropertyChanged("EndDate");
2468          this.OnEndDateChanged();
2469        }
2470      }
2471    }
2472   
2473    [Column(Storage="_AllDayEvent", DbType="Bit NOT NULL")]
2474    public bool AllDayEvent
2475    {
2476      get
2477      {
2478        return this._AllDayEvent;
2479      }
2480      set
2481      {
2482        if ((this._AllDayEvent != value))
2483        {
2484          this.OnAllDayEventChanging(value);
2485          this.SendPropertyChanging();
2486          this._AllDayEvent = value;
2487          this.SendPropertyChanged("AllDayEvent");
2488          this.OnAllDayEventChanged();
2489        }
2490      }
2491    }
2492   
2493    [Column(Storage="_Recurring", DbType="Bit NOT NULL")]
2494    public bool Recurring
2495    {
2496      get
2497      {
2498        return this._Recurring;
2499      }
2500      set
2501      {
2502        if ((this._Recurring != value))
2503        {
2504          this.OnRecurringChanging(value);
2505          this.SendPropertyChanging();
2506          this._Recurring = value;
2507          this.SendPropertyChanged("Recurring");
2508          this.OnRecurringChanged();
2509        }
2510      }
2511    }
2512   
2513    [Column(Storage="_RecurringId", DbType="UniqueIdentifier")]
2514    public System.Guid RecurringId
2515    {
2516      get
2517      {
2518        return this._RecurringId;
2519      }
2520      set
2521      {
2522        if ((this._RecurringId != value))
2523        {
2524          this.OnRecurringIdChanging(value);
2525          this.SendPropertyChanging();
2526          this._RecurringId = value;
2527          this.SendPropertyChanged("RecurringId");
2528          this.OnRecurringIdChanged();
2529        }
2530      }
2531    }
2532   
2533    [Association(Name="Resource_UptimeCalendar", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
2534    public Resource Resource
2535    {
2536      get
2537      {
2538        return this._Resource.Entity;
2539      }
2540      set
2541      {
2542        Resource previousValue = this._Resource.Entity;
2543        if (((previousValue != value)
2544              || (this._Resource.HasLoadedOrAssignedValue == false)))
2545        {
2546          this.SendPropertyChanging();
2547          if ((previousValue != null))
2548          {
2549            this._Resource.Entity = null;
2550            previousValue.UptimeCalendars.Remove(this);
2551          }
2552          this._Resource.Entity = value;
2553          if ((value != null))
2554          {
2555            value.UptimeCalendars.Add(this);
2556            this._ResourceId = value.ResourceId;
2557          }
2558          else
2559          {
2560            this._ResourceId = default(System.Guid);
2561          }
2562          this.SendPropertyChanged("Resource");
2563        }
2564      }
2565    }
2566   
2567    public event PropertyChangingEventHandler PropertyChanging;
2568   
2569    public event PropertyChangedEventHandler PropertyChanged;
2570   
2571    protected virtual void SendPropertyChanging()
2572    {
2573      if ((this.PropertyChanging != null))
2574      {
2575        this.PropertyChanging(this, emptyChangingEventArgs);
2576      }
2577    }
2578   
2579    protected virtual void SendPropertyChanged(String propertyName)
2580    {
2581      if ((this.PropertyChanged != null))
2582      {
2583        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2584      }
2585    }
2586  }
2587 
2588  [Table(Name="dbo.Client")]
2589  public partial class Client : INotifyPropertyChanging, INotifyPropertyChanged
2590  {
2591   
2592    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2593   
2594    private System.Guid _ResourceId;
2595   
2596    private int _CPUSpeed;
2597   
2598    private int _Memory;
2599   
2600    private System.DateTime _Login;
2601   
2602    private string _Status;
2603   
2604    private string _CalendarSyncStatus;
2605   
2606    private System.Nullable<System.Guid> _UseCalendarFromResourceId;
2607   
2608    private System.Nullable<System.Guid> _ClientConfigId;
2609   
2610    private int _NumberOfCores;
2611   
2612    private int _NumberOfFreeCores;
2613   
2614    private int _FreeMemory;
2615   
2616    private EntitySet<UptimeStatistic> _UptimeStatistics;
2617   
2618    private EntitySet<Job> _Jobs;
2619   
2620    private EntityRef<Resource> _Resource;
2621   
2622    private EntityRef<Resource> _Resource1;
2623   
2624    private EntityRef<ClientConfig> _ClientConfig;
2625   
2626    #region Extensibility Method Definitions
2627    partial void OnLoaded();
2628    partial void OnValidate(System.Data.Linq.ChangeAction action);
2629    partial void OnCreated();
2630    partial void OnResourceIdChanging(System.Guid value);
2631    partial void OnResourceIdChanged();
2632    partial void OnCPUSpeedChanging(int value);
2633    partial void OnCPUSpeedChanged();
2634    partial void OnMemoryChanging(int value);
2635    partial void OnMemoryChanged();
2636    partial void OnLoginChanging(System.DateTime value);
2637    partial void OnLoginChanged();
2638    partial void OnStatusChanging(string value);
2639    partial void OnStatusChanged();
2640    partial void OnCalendarSyncStatusChanging(string value);
2641    partial void OnCalendarSyncStatusChanged();
2642    partial void OnUseCalendarFromResourceIdChanging(System.Nullable<System.Guid> value);
2643    partial void OnUseCalendarFromResourceIdChanged();
2644    partial void OnClientConfigIdChanging(System.Nullable<System.Guid> value);
2645    partial void OnClientConfigIdChanged();
2646    partial void OnNumberOfCoresChanging(int value);
2647    partial void OnNumberOfCoresChanged();
2648    partial void OnNumberOfFreeCoresChanging(int value);
2649    partial void OnNumberOfFreeCoresChanged();
2650    partial void OnFreeMemoryChanging(int value);
2651    partial void OnFreeMemoryChanged();
2652    #endregion
2653   
2654    public Client()
2655    {
2656      this._UptimeStatistics = new EntitySet<UptimeStatistic>(new Action<UptimeStatistic>(this.attach_UptimeStatistics), new Action<UptimeStatistic>(this.detach_UptimeStatistics));
2657      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
2658      this._Resource = default(EntityRef<Resource>);
2659      this._Resource1 = default(EntityRef<Resource>);
2660      this._ClientConfig = default(EntityRef<ClientConfig>);
2661      OnCreated();
2662    }
2663   
2664    [Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
2665    public System.Guid ResourceId
2666    {
2667      get
2668      {
2669        return this._ResourceId;
2670      }
2671      set
2672      {
2673        if ((this._ResourceId != value))
2674        {
2675          if (this._Resource.HasLoadedOrAssignedValue)
2676          {
2677            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2678          }
2679          this.OnResourceIdChanging(value);
2680          this.SendPropertyChanging();
2681          this._ResourceId = value;
2682          this.SendPropertyChanged("ResourceId");
2683          this.OnResourceIdChanged();
2684        }
2685      }
2686    }
2687   
2688    [Column(Storage="_CPUSpeed", DbType="Int NOT NULL")]
2689    public int CPUSpeed
2690    {
2691      get
2692      {
2693        return this._CPUSpeed;
2694      }
2695      set
2696      {
2697        if ((this._CPUSpeed != value))
2698        {
2699          this.OnCPUSpeedChanging(value);
2700          this.SendPropertyChanging();
2701          this._CPUSpeed = value;
2702          this.SendPropertyChanged("CPUSpeed");
2703          this.OnCPUSpeedChanged();
2704        }
2705      }
2706    }
2707   
2708    [Column(Storage="_Memory", DbType="Int NOT NULL")]
2709    public int Memory
2710    {
2711      get
2712      {
2713        return this._Memory;
2714      }
2715      set
2716      {
2717        if ((this._Memory != value))
2718        {
2719          this.OnMemoryChanging(value);
2720          this.SendPropertyChanging();
2721          this._Memory = value;
2722          this.SendPropertyChanged("Memory");
2723          this.OnMemoryChanged();
2724        }
2725      }
2726    }
2727   
2728    [Column(Storage="_Login", DbType="DateTime NOT NULL")]
2729    public System.DateTime Login
2730    {
2731      get
2732      {
2733        return this._Login;
2734      }
2735      set
2736      {
2737        if ((this._Login != value))
2738        {
2739          this.OnLoginChanging(value);
2740          this.SendPropertyChanging();
2741          this._Login = value;
2742          this.SendPropertyChanged("Login");
2743          this.OnLoginChanged();
2744        }
2745      }
2746    }
2747   
2748    [Column(Storage="_Status", DbType="VarChar(MAX)")]
2749    public string Status
2750    {
2751      get
2752      {
2753        return this._Status;
2754      }
2755      set
2756      {
2757        if ((this._Status != value))
2758        {
2759          this.OnStatusChanging(value);
2760          this.SendPropertyChanging();
2761          this._Status = value;
2762          this.SendPropertyChanged("Status");
2763          this.OnStatusChanged();
2764        }
2765      }
2766    }
2767   
2768    [Column(Storage="_CalendarSyncStatus", DbType="VarChar(MAX)")]
2769    public string CalendarSyncStatus
2770    {
2771      get
2772      {
2773        return this._CalendarSyncStatus;
2774      }
2775      set
2776      {
2777        if ((this._CalendarSyncStatus != value))
2778        {
2779          this.OnCalendarSyncStatusChanging(value);
2780          this.SendPropertyChanging();
2781          this._CalendarSyncStatus = value;
2782          this.SendPropertyChanged("CalendarSyncStatus");
2783          this.OnCalendarSyncStatusChanged();
2784        }
2785      }
2786    }
2787   
2788    [Column(Storage="_UseCalendarFromResourceId", DbType="UniqueIdentifier")]
2789    public System.Nullable<System.Guid> UseCalendarFromResourceId
2790    {
2791      get
2792      {
2793        return this._UseCalendarFromResourceId;
2794      }
2795      set
2796      {
2797        if ((this._UseCalendarFromResourceId != value))
2798        {
2799          this.OnUseCalendarFromResourceIdChanging(value);
2800          this.SendPropertyChanging();
2801          this._UseCalendarFromResourceId = value;
2802          this.SendPropertyChanged("UseCalendarFromResourceId");
2803          this.OnUseCalendarFromResourceIdChanged();
2804        }
2805      }
2806    }
2807   
2808    [Column(Storage="_ClientConfigId", DbType="UniqueIdentifier")]
2809    public System.Nullable<System.Guid> ClientConfigId
2810    {
2811      get
2812      {
2813        return this._ClientConfigId;
2814      }
2815      set
2816      {
2817        if ((this._ClientConfigId != value))
2818        {
2819          if (this._ClientConfig.HasLoadedOrAssignedValue)
2820          {
2821            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2822          }
2823          this.OnClientConfigIdChanging(value);
2824          this.SendPropertyChanging();
2825          this._ClientConfigId = value;
2826          this.SendPropertyChanged("ClientConfigId");
2827          this.OnClientConfigIdChanged();
2828        }
2829      }
2830    }
2831   
2832    [Column(Storage="_NumberOfCores", DbType="Int NOT NULL")]
2833    public int NumberOfCores
2834    {
2835      get
2836      {
2837        return this._NumberOfCores;
2838      }
2839      set
2840      {
2841        if ((this._NumberOfCores != value))
2842        {
2843          this.OnNumberOfCoresChanging(value);
2844          this.SendPropertyChanging();
2845          this._NumberOfCores = value;
2846          this.SendPropertyChanged("NumberOfCores");
2847          this.OnNumberOfCoresChanged();
2848        }
2849      }
2850    }
2851   
2852    [Column(Storage="_NumberOfFreeCores", DbType="Int NOT NULL")]
2853    public int NumberOfFreeCores
2854    {
2855      get
2856      {
2857        return this._NumberOfFreeCores;
2858      }
2859      set
2860      {
2861        if ((this._NumberOfFreeCores != value))
2862        {
2863          this.OnNumberOfFreeCoresChanging(value);
2864          this.SendPropertyChanging();
2865          this._NumberOfFreeCores = value;
2866          this.SendPropertyChanged("NumberOfFreeCores");
2867          this.OnNumberOfFreeCoresChanged();
2868        }
2869      }
2870    }
2871   
2872    [Column(Storage="_FreeMemory", DbType="Int NOT NULL")]
2873    public int FreeMemory
2874    {
2875      get
2876      {
2877        return this._FreeMemory;
2878      }
2879      set
2880      {
2881        if ((this._FreeMemory != value))
2882        {
2883          this.OnFreeMemoryChanging(value);
2884          this.SendPropertyChanging();
2885          this._FreeMemory = value;
2886          this.SendPropertyChanged("FreeMemory");
2887          this.OnFreeMemoryChanged();
2888        }
2889      }
2890    }
2891   
2892    [Association(Name="Client_UptimeStatistic", Storage="_UptimeStatistics", ThisKey="ResourceId", OtherKey="ResourceId")]
2893    public EntitySet<UptimeStatistic> UptimeStatistics
2894    {
2895      get
2896      {
2897        return this._UptimeStatistics;
2898      }
2899      set
2900      {
2901        this._UptimeStatistics.Assign(value);
2902      }
2903    }
2904   
2905    [Association(Name="Client_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="ResourceId")]
2906    public EntitySet<Job> Jobs
2907    {
2908      get
2909      {
2910        return this._Jobs;
2911      }
2912      set
2913      {
2914        this._Jobs.Assign(value);
2915      }
2916    }
2917   
2918    [Association(Name="Resource_Client", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
2919    public Resource Resource
2920    {
2921      get
2922      {
2923        return this._Resource.Entity;
2924      }
2925      set
2926      {
2927        Resource previousValue = this._Resource.Entity;
2928        if (((previousValue != value)
2929              || (this._Resource.HasLoadedOrAssignedValue == false)))
2930        {
2931          this.SendPropertyChanging();
2932          if ((previousValue != null))
2933          {
2934            this._Resource.Entity = null;
2935            previousValue.Client = null;
2936          }
2937          this._Resource.Entity = value;
2938          if ((value != null))
2939          {
2940            value.Client = this;
2941            this._ResourceId = value.ResourceId;
2942          }
2943          else
2944          {
2945            this._ResourceId = default(System.Guid);
2946          }
2947          this.SendPropertyChanged("Resource");
2948        }
2949      }
2950    }
2951   
2952    [Association(Name="Resource_Client1", Storage="_Resource1", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]
2953    public Resource Resource1
2954    {
2955      get
2956      {
2957        return this._Resource1.Entity;
2958      }
2959      set
2960      {
2961        Resource previousValue = this._Resource1.Entity;
2962        if (((previousValue != value)
2963              || (this._Resource1.HasLoadedOrAssignedValue == false)))
2964        {
2965          this.SendPropertyChanging();
2966          if ((previousValue != null))
2967          {
2968            this._Resource1.Entity = null;
2969            previousValue.Client1 = null;
2970          }
2971          this._Resource1.Entity = value;
2972          if ((value != null))
2973          {
2974            value.Client1 = this;
2975            this._ResourceId = value.ResourceId;
2976          }
2977          else
2978          {
2979            this._ResourceId = default(System.Guid);
2980          }
2981          this.SendPropertyChanged("Resource1");
2982        }
2983      }
2984    }
2985   
2986    [Association(Name="ClientConfig_Client", Storage="_ClientConfig", ThisKey="ClientConfigId", OtherKey="ClientConfigId", IsForeignKey=true, DeleteRule="SET NULL")]
2987    public ClientConfig ClientConfig
2988    {
2989      get
2990      {
2991        return this._ClientConfig.Entity;
2992      }
2993      set
2994      {
2995        ClientConfig previousValue = this._ClientConfig.Entity;
2996        if (((previousValue != value)
2997              || (this._ClientConfig.HasLoadedOrAssignedValue == false)))
2998        {
2999          this.SendPropertyChanging();
3000          if ((previousValue != null))
3001          {
3002            this._ClientConfig.Entity = null;
3003            previousValue.Clients.Remove(this);
3004          }
3005          this._ClientConfig.Entity = value;
3006          if ((value != null))
3007          {
3008            value.Clients.Add(this);
3009            this._ClientConfigId = value.ClientConfigId;
3010          }
3011          else
3012          {
3013            this._ClientConfigId = default(Nullable<System.Guid>);
3014          }
3015          this.SendPropertyChanged("ClientConfig");
3016        }
3017      }
3018    }
3019   
3020    public event PropertyChangingEventHandler PropertyChanging;
3021   
3022    public event PropertyChangedEventHandler PropertyChanged;
3023   
3024    protected virtual void SendPropertyChanging()
3025    {
3026      if ((this.PropertyChanging != null))
3027      {
3028        this.PropertyChanging(this, emptyChangingEventArgs);
3029      }
3030    }
3031   
3032    protected virtual void SendPropertyChanged(String propertyName)
3033    {
3034      if ((this.PropertyChanged != null))
3035      {
3036        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3037      }
3038    }
3039   
3040    private void attach_UptimeStatistics(UptimeStatistic entity)
3041    {
3042      this.SendPropertyChanging();
3043      entity.Client = this;
3044    }
3045   
3046    private void detach_UptimeStatistics(UptimeStatistic entity)
3047    {
3048      this.SendPropertyChanging();
3049      entity.Client = null;
3050    }
3051   
3052    private void attach_Jobs(Job entity)
3053    {
3054      this.SendPropertyChanging();
3055      entity.Client = this;
3056    }
3057   
3058    private void detach_Jobs(Job entity)
3059    {
3060      this.SendPropertyChanging();
3061      entity.Client = null;
3062    }
3063  }
3064}
3065#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.