#pragma warning disable 1591
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace HeuristicLab.Hive.Server.LINQDataAccess
{
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Data;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Linq.Expressions;
using System.ComponentModel;
using System;
[System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.Hive.Linq")]
public partial class HiveDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertAssignedResource(AssignedResource instance);
partial void UpdateAssignedResource(AssignedResource instance);
partial void DeleteAssignedResource(AssignedResource instance);
partial void InsertUptimeStatistic(UptimeStatistic instance);
partial void UpdateUptimeStatistic(UptimeStatistic instance);
partial void DeleteUptimeStatistic(UptimeStatistic instance);
partial void InsertClientConfig(ClientConfig instance);
partial void UpdateClientConfig(ClientConfig instance);
partial void DeleteClientConfig(ClientConfig instance);
partial void InsertClientGroup(ClientGroup instance);
partial void UpdateClientGroup(ClientGroup instance);
partial void DeleteClientGroup(ClientGroup instance);
partial void InsertClientGroup_Resource(ClientGroup_Resource instance);
partial void UpdateClientGroup_Resource(ClientGroup_Resource instance);
partial void DeleteClientGroup_Resource(ClientGroup_Resource instance);
partial void InsertPluginInfo(PluginInfo instance);
partial void UpdatePluginInfo(PluginInfo instance);
partial void DeletePluginInfo(PluginInfo instance);
partial void InsertProject(Project instance);
partial void UpdateProject(Project instance);
partial void DeleteProject(Project instance);
partial void InsertRequiredPlugin(RequiredPlugin instance);
partial void UpdateRequiredPlugin(RequiredPlugin instance);
partial void DeleteRequiredPlugin(RequiredPlugin instance);
partial void InsertResource(Resource instance);
partial void UpdateResource(Resource instance);
partial void DeleteResource(Resource instance);
partial void InsertJob(Job instance);
partial void UpdateJob(Job instance);
partial void DeleteJob(Job instance);
partial void InsertUptimeCalendar(UptimeCalendar instance);
partial void UpdateUptimeCalendar(UptimeCalendar instance);
partial void DeleteUptimeCalendar(UptimeCalendar instance);
partial void InsertClient(Client instance);
partial void UpdateClient(Client instance);
partial void DeleteClient(Client instance);
#endregion
public HiveDataContext() :
base(global::HeuristicLab.Hive.Server.LINQDataAccess.Properties.Settings.Default.HeuristicLab_Hive_LinqConnectionString, mappingSource)
{
OnCreated();
}
public HiveDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public HiveDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public HiveDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public HiveDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table AssignedResources
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table UptimeStatistics
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table ClientConfigs
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table ClientGroups
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table ClientGroup_Resources
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table PluginInfos
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Projects
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table RequiredPlugins
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Resources
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Jobs
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table UptimeCalendars
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Clients
{
get
{
return this.GetTable();
}
}
}
[Table(Name="dbo.AssignedResources")]
public partial class AssignedResource : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ResourceId;
private System.Guid _JobId;
private System.Guid _AssignedRessourcesId;
private EntityRef _Resource;
private EntityRef _Job;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnResourceIdChanging(System.Guid value);
partial void OnResourceIdChanged();
partial void OnJobIdChanging(System.Guid value);
partial void OnJobIdChanged();
partial void OnAssignedRessourcesIdChanging(System.Guid value);
partial void OnAssignedRessourcesIdChanged();
#endregion
public AssignedResource()
{
this._Resource = default(EntityRef);
this._Job = default(EntityRef);
OnCreated();
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Resource.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Column(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid JobId
{
get
{
return this._JobId;
}
set
{
if ((this._JobId != value))
{
if (this._Job.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJobIdChanging(value);
this.SendPropertyChanging();
this._JobId = value;
this.SendPropertyChanged("JobId");
this.OnJobIdChanged();
}
}
}
[Column(Storage="_AssignedRessourcesId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid AssignedRessourcesId
{
get
{
return this._AssignedRessourcesId;
}
set
{
if ((this._AssignedRessourcesId != value))
{
this.OnAssignedRessourcesIdChanging(value);
this.SendPropertyChanging();
this._AssignedRessourcesId = value;
this.SendPropertyChanged("AssignedRessourcesId");
this.OnAssignedRessourcesIdChanged();
}
}
}
[Association(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Resource Resource
{
get
{
return this._Resource.Entity;
}
set
{
Resource previousValue = this._Resource.Entity;
if (((previousValue != value)
|| (this._Resource.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Resource.Entity = null;
previousValue.AssignedResources.Remove(this);
}
this._Resource.Entity = value;
if ((value != null))
{
value.AssignedResources.Add(this);
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(System.Guid);
}
this.SendPropertyChanged("Resource");
}
}
}
[Association(Name="Job_AssignedResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Job Job
{
get
{
return this._Job.Entity;
}
set
{
Job previousValue = this._Job.Entity;
if (((previousValue != value)
|| (this._Job.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Job.Entity = null;
previousValue.AssignedResources.Remove(this);
}
this._Job.Entity = value;
if ((value != null))
{
value.AssignedResources.Add(this);
this._JobId = value.JobId;
}
else
{
this._JobId = default(System.Guid);
}
this.SendPropertyChanged("Job");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.UptimeStatistics")]
public partial class UptimeStatistic : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _UptimeStatisticsId;
private System.Nullable _Login;
private System.Nullable _Logout;
private System.Nullable _ResourceId;
private EntityRef _Client;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnUptimeStatisticsIdChanging(System.Guid value);
partial void OnUptimeStatisticsIdChanged();
partial void OnLoginChanging(System.Nullable value);
partial void OnLoginChanged();
partial void OnLogoutChanging(System.Nullable value);
partial void OnLogoutChanged();
partial void OnResourceIdChanging(System.Nullable value);
partial void OnResourceIdChanged();
#endregion
public UptimeStatistic()
{
this._Client = default(EntityRef);
OnCreated();
}
[Column(Storage="_UptimeStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid UptimeStatisticsId
{
get
{
return this._UptimeStatisticsId;
}
set
{
if ((this._UptimeStatisticsId != value))
{
this.OnUptimeStatisticsIdChanging(value);
this.SendPropertyChanging();
this._UptimeStatisticsId = value;
this.SendPropertyChanged("UptimeStatisticsId");
this.OnUptimeStatisticsIdChanged();
}
}
}
[Column(Storage="_Login", DbType="DateTime")]
public System.Nullable Login
{
get
{
return this._Login;
}
set
{
if ((this._Login != value))
{
this.OnLoginChanging(value);
this.SendPropertyChanging();
this._Login = value;
this.SendPropertyChanged("Login");
this.OnLoginChanged();
}
}
}
[Column(Storage="_Logout", DbType="DateTime")]
public System.Nullable Logout
{
get
{
return this._Logout;
}
set
{
if ((this._Logout != value))
{
this.OnLogoutChanging(value);
this.SendPropertyChanging();
this._Logout = value;
this.SendPropertyChanged("Logout");
this.OnLogoutChanged();
}
}
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier")]
public System.Nullable ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Client.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Association(Name="Client_UptimeStatistic", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
public Client Client
{
get
{
return this._Client.Entity;
}
set
{
Client previousValue = this._Client.Entity;
if (((previousValue != value)
|| (this._Client.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Client.Entity = null;
previousValue.UptimeStatistics.Remove(this);
}
this._Client.Entity = value;
if ((value != null))
{
value.UptimeStatistics.Add(this);
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(Nullable);
}
this.SendPropertyChanged("Client");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.ClientConfig")]
public partial class ClientConfig : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ClientConfigId;
private System.Xml.Linq.XElement _UpDownTimeCalendar;
private System.Nullable _HeartBeatIntervall;
private EntitySet _Clients;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnClientConfigIdChanging(System.Guid value);
partial void OnClientConfigIdChanged();
partial void OnUpDownTimeCalendarChanging(System.Xml.Linq.XElement value);
partial void OnUpDownTimeCalendarChanged();
partial void OnHeartBeatIntervallChanging(System.Nullable value);
partial void OnHeartBeatIntervallChanged();
#endregion
public ClientConfig()
{
this._Clients = new EntitySet(new Action(this.attach_Clients), new Action(this.detach_Clients));
OnCreated();
}
[Column(Storage="_ClientConfigId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid ClientConfigId
{
get
{
return this._ClientConfigId;
}
set
{
if ((this._ClientConfigId != value))
{
this.OnClientConfigIdChanging(value);
this.SendPropertyChanging();
this._ClientConfigId = value;
this.SendPropertyChanged("ClientConfigId");
this.OnClientConfigIdChanged();
}
}
}
[Column(Storage="_UpDownTimeCalendar", DbType="Xml", UpdateCheck=UpdateCheck.Never)]
public System.Xml.Linq.XElement UpDownTimeCalendar
{
get
{
return this._UpDownTimeCalendar;
}
set
{
if ((this._UpDownTimeCalendar != value))
{
this.OnUpDownTimeCalendarChanging(value);
this.SendPropertyChanging();
this._UpDownTimeCalendar = value;
this.SendPropertyChanged("UpDownTimeCalendar");
this.OnUpDownTimeCalendarChanged();
}
}
}
[Column(Storage="_HeartBeatIntervall", DbType="Int")]
public System.Nullable HeartBeatIntervall
{
get
{
return this._HeartBeatIntervall;
}
set
{
if ((this._HeartBeatIntervall != value))
{
this.OnHeartBeatIntervallChanging(value);
this.SendPropertyChanging();
this._HeartBeatIntervall = value;
this.SendPropertyChanged("HeartBeatIntervall");
this.OnHeartBeatIntervallChanged();
}
}
}
[Association(Name="ClientConfig_Client", Storage="_Clients", ThisKey="ClientConfigId", OtherKey="ClientConfigId")]
public EntitySet Clients
{
get
{
return this._Clients;
}
set
{
this._Clients.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_Clients(Client entity)
{
this.SendPropertyChanging();
entity.ClientConfig = this;
}
private void detach_Clients(Client entity)
{
this.SendPropertyChanging();
entity.ClientConfig = null;
}
}
[Table(Name="dbo.ClientGroup")]
public partial class ClientGroup : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ResourceId;
private EntitySet _ClientGroup_Resources;
private EntityRef _Resource;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnResourceIdChanging(System.Guid value);
partial void OnResourceIdChanged();
#endregion
public ClientGroup()
{
this._ClientGroup_Resources = new EntitySet(new Action(this.attach_ClientGroup_Resources), new Action(this.detach_ClientGroup_Resources));
this._Resource = default(EntityRef);
OnCreated();
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
public System.Guid ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Resource.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Association(Name="ClientGroup_ClientGroup_Resource", Storage="_ClientGroup_Resources", ThisKey="ResourceId", OtherKey="ClientGroupId")]
public EntitySet ClientGroup_Resources
{
get
{
return this._ClientGroup_Resources;
}
set
{
this._ClientGroup_Resources.Assign(value);
}
}
[Association(Name="Resource_ClientGroup", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Resource Resource
{
get
{
return this._Resource.Entity;
}
set
{
Resource previousValue = this._Resource.Entity;
if (((previousValue != value)
|| (this._Resource.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Resource.Entity = null;
previousValue.ClientGroup = null;
}
this._Resource.Entity = value;
if ((value != null))
{
value.ClientGroup = this;
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(System.Guid);
}
this.SendPropertyChanged("Resource");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_ClientGroup_Resources(ClientGroup_Resource entity)
{
this.SendPropertyChanging();
entity.ClientGroup = this;
}
private void detach_ClientGroup_Resources(ClientGroup_Resource entity)
{
this.SendPropertyChanging();
entity.ClientGroup = null;
}
}
[Table(Name="dbo.ClientGroup_Resource")]
public partial class ClientGroup_Resource : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ClientGroupId;
private System.Guid _ResourceId;
private System.Guid _ClientGroup_RessourceId;
private EntityRef _ClientGroup;
private EntityRef _Resource;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnClientGroupIdChanging(System.Guid value);
partial void OnClientGroupIdChanged();
partial void OnResourceIdChanging(System.Guid value);
partial void OnResourceIdChanged();
partial void OnClientGroup_RessourceIdChanging(System.Guid value);
partial void OnClientGroup_RessourceIdChanged();
#endregion
public ClientGroup_Resource()
{
this._ClientGroup = default(EntityRef);
this._Resource = default(EntityRef);
OnCreated();
}
[Column(Storage="_ClientGroupId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid ClientGroupId
{
get
{
return this._ClientGroupId;
}
set
{
if ((this._ClientGroupId != value))
{
if (this._ClientGroup.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnClientGroupIdChanging(value);
this.SendPropertyChanging();
this._ClientGroupId = value;
this.SendPropertyChanged("ClientGroupId");
this.OnClientGroupIdChanged();
}
}
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Resource.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Column(Storage="_ClientGroup_RessourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid ClientGroup_RessourceId
{
get
{
return this._ClientGroup_RessourceId;
}
set
{
if ((this._ClientGroup_RessourceId != value))
{
this.OnClientGroup_RessourceIdChanging(value);
this.SendPropertyChanging();
this._ClientGroup_RessourceId = value;
this.SendPropertyChanged("ClientGroup_RessourceId");
this.OnClientGroup_RessourceIdChanged();
}
}
}
[Association(Name="ClientGroup_ClientGroup_Resource", Storage="_ClientGroup", ThisKey="ClientGroupId", OtherKey="ResourceId", IsForeignKey=true)]
public ClientGroup ClientGroup
{
get
{
return this._ClientGroup.Entity;
}
set
{
ClientGroup previousValue = this._ClientGroup.Entity;
if (((previousValue != value)
|| (this._ClientGroup.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._ClientGroup.Entity = null;
previousValue.ClientGroup_Resources.Remove(this);
}
this._ClientGroup.Entity = value;
if ((value != null))
{
value.ClientGroup_Resources.Add(this);
this._ClientGroupId = value.ResourceId;
}
else
{
this._ClientGroupId = default(System.Guid);
}
this.SendPropertyChanged("ClientGroup");
}
}
}
[Association(Name="Resource_ClientGroup_Resource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Resource Resource
{
get
{
return this._Resource.Entity;
}
set
{
Resource previousValue = this._Resource.Entity;
if (((previousValue != value)
|| (this._Resource.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Resource.Entity = null;
previousValue.ClientGroup_Resources.Remove(this);
}
this._Resource.Entity = value;
if ((value != null))
{
value.ClientGroup_Resources.Add(this);
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(System.Guid);
}
this.SendPropertyChanged("Resource");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.PluginInfo")]
public partial class PluginInfo : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _PluginId;
private string _Name;
private string _Version;
private string _BuildDate;
private EntitySet _RequiredPlugins;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnPluginIdChanging(System.Guid value);
partial void OnPluginIdChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
partial void OnVersionChanging(string value);
partial void OnVersionChanged();
partial void OnBuildDateChanging(string value);
partial void OnBuildDateChanged();
#endregion
public PluginInfo()
{
this._RequiredPlugins = new EntitySet(new Action(this.attach_RequiredPlugins), new Action(this.detach_RequiredPlugins));
OnCreated();
}
[Column(Storage="_PluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid PluginId
{
get
{
return this._PluginId;
}
set
{
if ((this._PluginId != value))
{
this.OnPluginIdChanging(value);
this.SendPropertyChanging();
this._PluginId = value;
this.SendPropertyChanged("PluginId");
this.OnPluginIdChanged();
}
}
}
[Column(Storage="_Name", DbType="VarChar(MAX)")]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnNameChanged();
}
}
}
[Column(Storage="_Version", DbType="VarChar(MAX)")]
public string Version
{
get
{
return this._Version;
}
set
{
if ((this._Version != value))
{
this.OnVersionChanging(value);
this.SendPropertyChanging();
this._Version = value;
this.SendPropertyChanged("Version");
this.OnVersionChanged();
}
}
}
[Column(Storage="_BuildDate", DbType="VarChar(20)")]
public string BuildDate
{
get
{
return this._BuildDate;
}
set
{
if ((this._BuildDate != value))
{
this.OnBuildDateChanging(value);
this.SendPropertyChanging();
this._BuildDate = value;
this.SendPropertyChanged("BuildDate");
this.OnBuildDateChanged();
}
}
}
[Association(Name="PluginInfo_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
public EntitySet RequiredPlugins
{
get
{
return this._RequiredPlugins;
}
set
{
this._RequiredPlugins.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_RequiredPlugins(RequiredPlugin entity)
{
this.SendPropertyChanging();
entity.PluginInfo = this;
}
private void detach_RequiredPlugins(RequiredPlugin entity)
{
this.SendPropertyChanging();
entity.PluginInfo = null;
}
}
[Table(Name="dbo.Project")]
public partial class Project : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ProjectId;
private string _Name;
private EntitySet _Jobs;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnProjectIdChanging(System.Guid value);
partial void OnProjectIdChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
#endregion
public Project()
{
this._Jobs = new EntitySet(new Action(this.attach_Jobs), new Action(this.detach_Jobs));
OnCreated();
}
[Column(Storage="_ProjectId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
this.OnProjectIdChanging(value);
this.SendPropertyChanging();
this._ProjectId = value;
this.SendPropertyChanged("ProjectId");
this.OnProjectIdChanged();
}
}
}
[Column(Storage="_Name", DbType="VarChar(MAX)")]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnNameChanged();
}
}
}
[Association(Name="Project_Job", Storage="_Jobs", ThisKey="ProjectId", OtherKey="ProjectId")]
public EntitySet Jobs
{
get
{
return this._Jobs;
}
set
{
this._Jobs.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_Jobs(Job entity)
{
this.SendPropertyChanging();
entity.Project = this;
}
private void detach_Jobs(Job entity)
{
this.SendPropertyChanging();
entity.Project = null;
}
}
[Table(Name="dbo.RequiredPlugins")]
public partial class RequiredPlugin : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _JobId;
private System.Guid _PluginId;
private System.Guid _RequiredPluginId;
private EntityRef _PluginInfo;
private EntityRef _Job;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnJobIdChanging(System.Guid value);
partial void OnJobIdChanged();
partial void OnPluginIdChanging(System.Guid value);
partial void OnPluginIdChanged();
partial void OnRequiredPluginIdChanging(System.Guid value);
partial void OnRequiredPluginIdChanged();
#endregion
public RequiredPlugin()
{
this._PluginInfo = default(EntityRef);
this._Job = default(EntityRef);
OnCreated();
}
[Column(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid JobId
{
get
{
return this._JobId;
}
set
{
if ((this._JobId != value))
{
if (this._Job.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJobIdChanging(value);
this.SendPropertyChanging();
this._JobId = value;
this.SendPropertyChanged("JobId");
this.OnJobIdChanged();
}
}
}
[Column(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid PluginId
{
get
{
return this._PluginId;
}
set
{
if ((this._PluginId != value))
{
if (this._PluginInfo.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnPluginIdChanging(value);
this.SendPropertyChanging();
this._PluginId = value;
this.SendPropertyChanged("PluginId");
this.OnPluginIdChanged();
}
}
}
[Column(Storage="_RequiredPluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
public System.Guid RequiredPluginId
{
get
{
return this._RequiredPluginId;
}
set
{
if ((this._RequiredPluginId != value))
{
this.OnRequiredPluginIdChanging(value);
this.SendPropertyChanging();
this._RequiredPluginId = value;
this.SendPropertyChanged("RequiredPluginId");
this.OnRequiredPluginIdChanged();
}
}
}
[Association(Name="PluginInfo_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public PluginInfo PluginInfo
{
get
{
return this._PluginInfo.Entity;
}
set
{
PluginInfo previousValue = this._PluginInfo.Entity;
if (((previousValue != value)
|| (this._PluginInfo.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PluginInfo.Entity = null;
previousValue.RequiredPlugins.Remove(this);
}
this._PluginInfo.Entity = value;
if ((value != null))
{
value.RequiredPlugins.Add(this);
this._PluginId = value.PluginId;
}
else
{
this._PluginId = default(System.Guid);
}
this.SendPropertyChanged("PluginInfo");
}
}
}
[Association(Name="Job_RequiredPlugin", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
public Job Job
{
get
{
return this._Job.Entity;
}
set
{
Job previousValue = this._Job.Entity;
if (((previousValue != value)
|| (this._Job.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Job.Entity = null;
previousValue.RequiredPlugins.Remove(this);
}
this._Job.Entity = value;
if ((value != null))
{
value.RequiredPlugins.Add(this);
this._JobId = value.JobId;
}
else
{
this._JobId = default(System.Guid);
}
this.SendPropertyChanged("Job");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.Resource")]
public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ResourceId;
private string _Name;
private EntitySet _AssignedResources;
private EntityRef _ClientGroup;
private EntitySet _ClientGroup_Resources;
private EntitySet _UptimeCalendars;
private EntityRef _Client;
private EntityRef _Client1;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnResourceIdChanging(System.Guid value);
partial void OnResourceIdChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
#endregion
public Resource()
{
this._AssignedResources = new EntitySet(new Action(this.attach_AssignedResources), new Action(this.detach_AssignedResources));
this._ClientGroup = default(EntityRef);
this._ClientGroup_Resources = new EntitySet(new Action(this.attach_ClientGroup_Resources), new Action(this.detach_ClientGroup_Resources));
this._UptimeCalendars = new EntitySet(new Action(this.attach_UptimeCalendars), new Action(this.detach_UptimeCalendars));
this._Client = default(EntityRef);
this._Client1 = default(EntityRef);
OnCreated();
}
[Column(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
public System.Guid ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Column(Storage="_Name", DbType="VarChar(MAX)")]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnNameChanged();
}
}
}
[Association(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
public EntitySet AssignedResources
{
get
{
return this._AssignedResources;
}
set
{
this._AssignedResources.Assign(value);
}
}
[Association(Name="Resource_ClientGroup", Storage="_ClientGroup", ThisKey="ResourceId", OtherKey="ResourceId", IsUnique=true, IsForeignKey=false)]
public ClientGroup ClientGroup
{
get
{
return this._ClientGroup.Entity;
}
set
{
ClientGroup previousValue = this._ClientGroup.Entity;
if (((previousValue != value)
|| (this._ClientGroup.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._ClientGroup.Entity = null;
previousValue.Resource = null;
}
this._ClientGroup.Entity = value;
if ((value != null))
{
value.Resource = this;
}
this.SendPropertyChanged("ClientGroup");
}
}
}
[Association(Name="Resource_ClientGroup_Resource", Storage="_ClientGroup_Resources", ThisKey="ResourceId", OtherKey="ResourceId")]
public EntitySet ClientGroup_Resources
{
get
{
return this._ClientGroup_Resources;
}
set
{
this._ClientGroup_Resources.Assign(value);
}
}
[Association(Name="Resource_UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
public EntitySet UptimeCalendars
{
get
{
return this._UptimeCalendars;
}
set
{
this._UptimeCalendars.Assign(value);
}
}
[Association(Name="Resource_Client", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsUnique=true, IsForeignKey=false)]
public Client Client
{
get
{
return this._Client.Entity;
}
set
{
Client previousValue = this._Client.Entity;
if (((previousValue != value)
|| (this._Client.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Client.Entity = null;
previousValue.Resource = null;
}
this._Client.Entity = value;
if ((value != null))
{
value.Resource = this;
}
this.SendPropertyChanged("Client");
}
}
}
[Association(Name="Resource_Client1", Storage="_Client1", ThisKey="ResourceId", OtherKey="ResourceId", IsUnique=true, IsForeignKey=false)]
public Client Client1
{
get
{
return this._Client1.Entity;
}
set
{
Client previousValue = this._Client1.Entity;
if (((previousValue != value)
|| (this._Client1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Client1.Entity = null;
previousValue.Resource1 = null;
}
this._Client1.Entity = value;
if ((value != null))
{
value.Resource1 = this;
}
this.SendPropertyChanged("Client1");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_AssignedResources(AssignedResource entity)
{
this.SendPropertyChanging();
entity.Resource = this;
}
private void detach_AssignedResources(AssignedResource entity)
{
this.SendPropertyChanging();
entity.Resource = null;
}
private void attach_ClientGroup_Resources(ClientGroup_Resource entity)
{
this.SendPropertyChanging();
entity.Resource = this;
}
private void detach_ClientGroup_Resources(ClientGroup_Resource entity)
{
this.SendPropertyChanging();
entity.Resource = null;
}
private void attach_UptimeCalendars(UptimeCalendar entity)
{
this.SendPropertyChanging();
entity.Resource = this;
}
private void detach_UptimeCalendars(UptimeCalendar entity)
{
this.SendPropertyChanging();
entity.Resource = null;
}
}
[Table(Name="dbo.Job")]
public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _JobId;
private System.Nullable _ParentJobId;
private string _JobState;
private System.Nullable _ResourceId;
private System.Nullable _Percentage;
private System.Data.Linq.Binary _SerializedJob;
private System.Nullable _DateCreated;
private System.Nullable _DateCalculated;
private System.Nullable _DateFinished;
private int _Priority;
private System.Nullable _ProjectId;
private System.Nullable _UserId;
private int _CoresNeeded;
private int _MemoryNeeded;
private EntitySet _AssignedResources;
private EntitySet _RequiredPlugins;
private EntitySet _Jobs;
private EntityRef _Job1;
private EntityRef _Project;
private EntityRef _Client;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnJobIdChanging(System.Guid value);
partial void OnJobIdChanged();
partial void OnParentJobIdChanging(System.Nullable value);
partial void OnParentJobIdChanged();
partial void OnJobStateChanging(string value);
partial void OnJobStateChanged();
partial void OnResourceIdChanging(System.Nullable value);
partial void OnResourceIdChanged();
partial void OnPercentageChanging(System.Nullable value);
partial void OnPercentageChanged();
partial void OnSerializedJobChanging(System.Data.Linq.Binary value);
partial void OnSerializedJobChanged();
partial void OnDateCreatedChanging(System.Nullable value);
partial void OnDateCreatedChanged();
partial void OnDateCalculatedChanging(System.Nullable value);
partial void OnDateCalculatedChanged();
partial void OnDateFinishedChanging(System.Nullable value);
partial void OnDateFinishedChanged();
partial void OnPriorityChanging(int value);
partial void OnPriorityChanged();
partial void OnProjectIdChanging(System.Nullable value);
partial void OnProjectIdChanged();
partial void OnUserIdChanging(System.Nullable value);
partial void OnUserIdChanged();
partial void OnCoresNeededChanging(int value);
partial void OnCoresNeededChanged();
partial void OnMemoryNeededChanging(int value);
partial void OnMemoryNeededChanged();
#endregion
public Job()
{
this._AssignedResources = new EntitySet(new Action(this.attach_AssignedResources), new Action(this.detach_AssignedResources));
this._RequiredPlugins = new EntitySet(new Action(this.attach_RequiredPlugins), new Action(this.detach_RequiredPlugins));
this._Jobs = new EntitySet(new Action(this.attach_Jobs), new Action(this.detach_Jobs));
this._Job1 = default(EntityRef);
this._Project = default(EntityRef);
this._Client = default(EntityRef);
OnCreated();
}
[Column(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid JobId
{
get
{
return this._JobId;
}
set
{
if ((this._JobId != value))
{
this.OnJobIdChanging(value);
this.SendPropertyChanging();
this._JobId = value;
this.SendPropertyChanged("JobId");
this.OnJobIdChanged();
}
}
}
[Column(Storage="_ParentJobId", DbType="UniqueIdentifier")]
public System.Nullable ParentJobId
{
get
{
return this._ParentJobId;
}
set
{
if ((this._ParentJobId != value))
{
if (this._Job1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnParentJobIdChanging(value);
this.SendPropertyChanging();
this._ParentJobId = value;
this.SendPropertyChanged("ParentJobId");
this.OnParentJobIdChanged();
}
}
}
[Column(Storage="_JobState", DbType="VarChar(MAX)")]
public string JobState
{
get
{
return this._JobState;
}
set
{
if ((this._JobState != value))
{
this.OnJobStateChanging(value);
this.SendPropertyChanging();
this._JobState = value;
this.SendPropertyChanged("JobState");
this.OnJobStateChanged();
}
}
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier")]
public System.Nullable ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Client.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Column(Storage="_Percentage", DbType="Float")]
public System.Nullable Percentage
{
get
{
return this._Percentage;
}
set
{
if ((this._Percentage != value))
{
this.OnPercentageChanging(value);
this.SendPropertyChanging();
this._Percentage = value;
this.SendPropertyChanged("Percentage");
this.OnPercentageChanged();
}
}
}
[Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", CanBeNull=true, UpdateCheck=UpdateCheck.Never)]
public System.Data.Linq.Binary SerializedJob
{
get
{
return this._SerializedJob;
}
set
{
if ((this._SerializedJob != value))
{
this.OnSerializedJobChanging(value);
this.SendPropertyChanging();
this._SerializedJob = value;
this.SendPropertyChanged("SerializedJob");
this.OnSerializedJobChanged();
}
}
}
[Column(Storage="_DateCreated", DbType="DateTime")]
public System.Nullable DateCreated
{
get
{
return this._DateCreated;
}
set
{
if ((this._DateCreated != value))
{
this.OnDateCreatedChanging(value);
this.SendPropertyChanging();
this._DateCreated = value;
this.SendPropertyChanged("DateCreated");
this.OnDateCreatedChanged();
}
}
}
[Column(Storage="_DateCalculated", DbType="DateTime")]
public System.Nullable DateCalculated
{
get
{
return this._DateCalculated;
}
set
{
if ((this._DateCalculated != value))
{
this.OnDateCalculatedChanging(value);
this.SendPropertyChanging();
this._DateCalculated = value;
this.SendPropertyChanged("DateCalculated");
this.OnDateCalculatedChanged();
}
}
}
[Column(Storage="_DateFinished", DbType="DateTime")]
public System.Nullable DateFinished
{
get
{
return this._DateFinished;
}
set
{
if ((this._DateFinished != value))
{
this.OnDateFinishedChanging(value);
this.SendPropertyChanging();
this._DateFinished = value;
this.SendPropertyChanged("DateFinished");
this.OnDateFinishedChanged();
}
}
}
[Column(Storage="_Priority", DbType="Int NOT NULL")]
public int Priority
{
get
{
return this._Priority;
}
set
{
if ((this._Priority != value))
{
this.OnPriorityChanging(value);
this.SendPropertyChanging();
this._Priority = value;
this.SendPropertyChanged("Priority");
this.OnPriorityChanged();
}
}
}
[Column(Storage="_ProjectId", DbType="UniqueIdentifier")]
public System.Nullable ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
if (this._Project.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnProjectIdChanging(value);
this.SendPropertyChanging();
this._ProjectId = value;
this.SendPropertyChanged("ProjectId");
this.OnProjectIdChanged();
}
}
}
[Column(Storage="_UserId", DbType="UniqueIdentifier")]
public System.Nullable UserId
{
get
{
return this._UserId;
}
set
{
if ((this._UserId != value))
{
this.OnUserIdChanging(value);
this.SendPropertyChanging();
this._UserId = value;
this.SendPropertyChanged("UserId");
this.OnUserIdChanged();
}
}
}
[Column(Storage="_CoresNeeded", DbType="Int NOT NULL")]
public int CoresNeeded
{
get
{
return this._CoresNeeded;
}
set
{
if ((this._CoresNeeded != value))
{
this.OnCoresNeededChanging(value);
this.SendPropertyChanging();
this._CoresNeeded = value;
this.SendPropertyChanged("CoresNeeded");
this.OnCoresNeededChanged();
}
}
}
[Column(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
public int MemoryNeeded
{
get
{
return this._MemoryNeeded;
}
set
{
if ((this._MemoryNeeded != value))
{
this.OnMemoryNeededChanging(value);
this.SendPropertyChanging();
this._MemoryNeeded = value;
this.SendPropertyChanged("MemoryNeeded");
this.OnMemoryNeededChanged();
}
}
}
[Association(Name="Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")]
public EntitySet AssignedResources
{
get
{
return this._AssignedResources;
}
set
{
this._AssignedResources.Assign(value);
}
}
[Association(Name="Job_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="JobId", OtherKey="JobId")]
public EntitySet RequiredPlugins
{
get
{
return this._RequiredPlugins;
}
set
{
this._RequiredPlugins.Assign(value);
}
}
[Association(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]
public EntitySet Jobs
{
get
{
return this._Jobs;
}
set
{
this._Jobs.Assign(value);
}
}
[Association(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]
public Job Job1
{
get
{
return this._Job1.Entity;
}
set
{
Job previousValue = this._Job1.Entity;
if (((previousValue != value)
|| (this._Job1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Job1.Entity = null;
previousValue.Jobs.Remove(this);
}
this._Job1.Entity = value;
if ((value != null))
{
value.Jobs.Add(this);
this._ParentJobId = value.JobId;
}
else
{
this._ParentJobId = default(Nullable);
}
this.SendPropertyChanged("Job1");
}
}
}
[Association(Name="Project_Job", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="SET NULL")]
public Project Project
{
get
{
return this._Project.Entity;
}
set
{
Project previousValue = this._Project.Entity;
if (((previousValue != value)
|| (this._Project.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Project.Entity = null;
previousValue.Jobs.Remove(this);
}
this._Project.Entity = value;
if ((value != null))
{
value.Jobs.Add(this);
this._ProjectId = value.ProjectId;
}
else
{
this._ProjectId = default(Nullable);
}
this.SendPropertyChanged("Project");
}
}
}
[Association(Name="Client_Job", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
public Client Client
{
get
{
return this._Client.Entity;
}
set
{
Client previousValue = this._Client.Entity;
if (((previousValue != value)
|| (this._Client.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Client.Entity = null;
previousValue.Jobs.Remove(this);
}
this._Client.Entity = value;
if ((value != null))
{
value.Jobs.Add(this);
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(Nullable);
}
this.SendPropertyChanged("Client");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_AssignedResources(AssignedResource entity)
{
this.SendPropertyChanging();
entity.Job = this;
}
private void detach_AssignedResources(AssignedResource entity)
{
this.SendPropertyChanging();
entity.Job = null;
}
private void attach_RequiredPlugins(RequiredPlugin entity)
{
this.SendPropertyChanging();
entity.Job = this;
}
private void detach_RequiredPlugins(RequiredPlugin entity)
{
this.SendPropertyChanging();
entity.Job = null;
}
private void attach_Jobs(Job entity)
{
this.SendPropertyChanging();
entity.Job1 = this;
}
private void detach_Jobs(Job entity)
{
this.SendPropertyChanging();
entity.Job1 = null;
}
}
[Table(Name="dbo.UptimeCalendar")]
public partial class UptimeCalendar : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _UptimeCalendarId;
private System.Guid _ResourceId;
private System.DateTime _StartDate;
private System.DateTime _EndDate;
private bool _AllDayEvent;
private bool _Recurring;
private System.Guid _RecurringId;
private EntityRef _Resource;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnUptimeCalendarIdChanging(System.Guid value);
partial void OnUptimeCalendarIdChanged();
partial void OnResourceIdChanging(System.Guid value);
partial void OnResourceIdChanged();
partial void OnStartDateChanging(System.DateTime value);
partial void OnStartDateChanged();
partial void OnEndDateChanging(System.DateTime value);
partial void OnEndDateChanged();
partial void OnAllDayEventChanging(bool value);
partial void OnAllDayEventChanged();
partial void OnRecurringChanging(bool value);
partial void OnRecurringChanged();
partial void OnRecurringIdChanging(System.Guid value);
partial void OnRecurringIdChanged();
#endregion
public UptimeCalendar()
{
this._Resource = default(EntityRef);
OnCreated();
}
[Column(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
public System.Guid UptimeCalendarId
{
get
{
return this._UptimeCalendarId;
}
set
{
if ((this._UptimeCalendarId != value))
{
this.OnUptimeCalendarIdChanging(value);
this.SendPropertyChanging();
this._UptimeCalendarId = value;
this.SendPropertyChanged("UptimeCalendarId");
this.OnUptimeCalendarIdChanged();
}
}
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
public System.Guid ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Resource.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Column(Storage="_StartDate", DbType="DateTime NOT NULL")]
public System.DateTime StartDate
{
get
{
return this._StartDate;
}
set
{
if ((this._StartDate != value))
{
this.OnStartDateChanging(value);
this.SendPropertyChanging();
this._StartDate = value;
this.SendPropertyChanged("StartDate");
this.OnStartDateChanged();
}
}
}
[Column(Storage="_EndDate", DbType="DateTime NOT NULL")]
public System.DateTime EndDate
{
get
{
return this._EndDate;
}
set
{
if ((this._EndDate != value))
{
this.OnEndDateChanging(value);
this.SendPropertyChanging();
this._EndDate = value;
this.SendPropertyChanged("EndDate");
this.OnEndDateChanged();
}
}
}
[Column(Storage="_AllDayEvent", DbType="Bit NOT NULL")]
public bool AllDayEvent
{
get
{
return this._AllDayEvent;
}
set
{
if ((this._AllDayEvent != value))
{
this.OnAllDayEventChanging(value);
this.SendPropertyChanging();
this._AllDayEvent = value;
this.SendPropertyChanged("AllDayEvent");
this.OnAllDayEventChanged();
}
}
}
[Column(Storage="_Recurring", DbType="Bit NOT NULL")]
public bool Recurring
{
get
{
return this._Recurring;
}
set
{
if ((this._Recurring != value))
{
this.OnRecurringChanging(value);
this.SendPropertyChanging();
this._Recurring = value;
this.SendPropertyChanged("Recurring");
this.OnRecurringChanged();
}
}
}
[Column(Storage="_RecurringId", DbType="UniqueIdentifier")]
public System.Guid RecurringId
{
get
{
return this._RecurringId;
}
set
{
if ((this._RecurringId != value))
{
this.OnRecurringIdChanging(value);
this.SendPropertyChanging();
this._RecurringId = value;
this.SendPropertyChanged("RecurringId");
this.OnRecurringIdChanged();
}
}
}
[Association(Name="Resource_UptimeCalendar", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Resource Resource
{
get
{
return this._Resource.Entity;
}
set
{
Resource previousValue = this._Resource.Entity;
if (((previousValue != value)
|| (this._Resource.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Resource.Entity = null;
previousValue.UptimeCalendars.Remove(this);
}
this._Resource.Entity = value;
if ((value != null))
{
value.UptimeCalendars.Add(this);
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(System.Guid);
}
this.SendPropertyChanged("Resource");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.Client")]
public partial class Client : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ResourceId;
private int _CPUSpeed;
private int _Memory;
private System.DateTime _Login;
private string _Status;
private string _CalendarSyncStatus;
private System.Nullable _UseCalendarFromResourceId;
private System.Nullable _ClientConfigId;
private int _NumberOfCores;
private int _NumberOfFreeCores;
private int _FreeMemory;
private EntitySet _UptimeStatistics;
private EntitySet _Jobs;
private EntityRef _Resource;
private EntityRef _Resource1;
private EntityRef _ClientConfig;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnResourceIdChanging(System.Guid value);
partial void OnResourceIdChanged();
partial void OnCPUSpeedChanging(int value);
partial void OnCPUSpeedChanged();
partial void OnMemoryChanging(int value);
partial void OnMemoryChanged();
partial void OnLoginChanging(System.DateTime value);
partial void OnLoginChanged();
partial void OnStatusChanging(string value);
partial void OnStatusChanged();
partial void OnCalendarSyncStatusChanging(string value);
partial void OnCalendarSyncStatusChanged();
partial void OnUseCalendarFromResourceIdChanging(System.Nullable value);
partial void OnUseCalendarFromResourceIdChanged();
partial void OnClientConfigIdChanging(System.Nullable value);
partial void OnClientConfigIdChanged();
partial void OnNumberOfCoresChanging(int value);
partial void OnNumberOfCoresChanged();
partial void OnNumberOfFreeCoresChanging(int value);
partial void OnNumberOfFreeCoresChanged();
partial void OnFreeMemoryChanging(int value);
partial void OnFreeMemoryChanged();
#endregion
public Client()
{
this._UptimeStatistics = new EntitySet(new Action(this.attach_UptimeStatistics), new Action(this.detach_UptimeStatistics));
this._Jobs = new EntitySet(new Action(this.attach_Jobs), new Action(this.detach_Jobs));
this._Resource = default(EntityRef);
this._Resource1 = default(EntityRef);
this._ClientConfig = default(EntityRef);
OnCreated();
}
[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
public System.Guid ResourceId
{
get
{
return this._ResourceId;
}
set
{
if ((this._ResourceId != value))
{
if (this._Resource.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceIdChanging(value);
this.SendPropertyChanging();
this._ResourceId = value;
this.SendPropertyChanged("ResourceId");
this.OnResourceIdChanged();
}
}
}
[Column(Storage="_CPUSpeed", DbType="Int NOT NULL")]
public int CPUSpeed
{
get
{
return this._CPUSpeed;
}
set
{
if ((this._CPUSpeed != value))
{
this.OnCPUSpeedChanging(value);
this.SendPropertyChanging();
this._CPUSpeed = value;
this.SendPropertyChanged("CPUSpeed");
this.OnCPUSpeedChanged();
}
}
}
[Column(Storage="_Memory", DbType="Int NOT NULL")]
public int Memory
{
get
{
return this._Memory;
}
set
{
if ((this._Memory != value))
{
this.OnMemoryChanging(value);
this.SendPropertyChanging();
this._Memory = value;
this.SendPropertyChanged("Memory");
this.OnMemoryChanged();
}
}
}
[Column(Storage="_Login", DbType="DateTime NOT NULL")]
public System.DateTime Login
{
get
{
return this._Login;
}
set
{
if ((this._Login != value))
{
this.OnLoginChanging(value);
this.SendPropertyChanging();
this._Login = value;
this.SendPropertyChanged("Login");
this.OnLoginChanged();
}
}
}
[Column(Storage="_Status", DbType="VarChar(MAX)")]
public string Status
{
get
{
return this._Status;
}
set
{
if ((this._Status != value))
{
this.OnStatusChanging(value);
this.SendPropertyChanging();
this._Status = value;
this.SendPropertyChanged("Status");
this.OnStatusChanged();
}
}
}
[Column(Storage="_CalendarSyncStatus", DbType="VarChar(MAX)")]
public string CalendarSyncStatus
{
get
{
return this._CalendarSyncStatus;
}
set
{
if ((this._CalendarSyncStatus != value))
{
this.OnCalendarSyncStatusChanging(value);
this.SendPropertyChanging();
this._CalendarSyncStatus = value;
this.SendPropertyChanged("CalendarSyncStatus");
this.OnCalendarSyncStatusChanged();
}
}
}
[Column(Storage="_UseCalendarFromResourceId", DbType="UniqueIdentifier")]
public System.Nullable UseCalendarFromResourceId
{
get
{
return this._UseCalendarFromResourceId;
}
set
{
if ((this._UseCalendarFromResourceId != value))
{
this.OnUseCalendarFromResourceIdChanging(value);
this.SendPropertyChanging();
this._UseCalendarFromResourceId = value;
this.SendPropertyChanged("UseCalendarFromResourceId");
this.OnUseCalendarFromResourceIdChanged();
}
}
}
[Column(Storage="_ClientConfigId", DbType="UniqueIdentifier")]
public System.Nullable ClientConfigId
{
get
{
return this._ClientConfigId;
}
set
{
if ((this._ClientConfigId != value))
{
if (this._ClientConfig.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnClientConfigIdChanging(value);
this.SendPropertyChanging();
this._ClientConfigId = value;
this.SendPropertyChanged("ClientConfigId");
this.OnClientConfigIdChanged();
}
}
}
[Column(Storage="_NumberOfCores", DbType="Int NOT NULL")]
public int NumberOfCores
{
get
{
return this._NumberOfCores;
}
set
{
if ((this._NumberOfCores != value))
{
this.OnNumberOfCoresChanging(value);
this.SendPropertyChanging();
this._NumberOfCores = value;
this.SendPropertyChanged("NumberOfCores");
this.OnNumberOfCoresChanged();
}
}
}
[Column(Storage="_NumberOfFreeCores", DbType="Int NOT NULL")]
public int NumberOfFreeCores
{
get
{
return this._NumberOfFreeCores;
}
set
{
if ((this._NumberOfFreeCores != value))
{
this.OnNumberOfFreeCoresChanging(value);
this.SendPropertyChanging();
this._NumberOfFreeCores = value;
this.SendPropertyChanged("NumberOfFreeCores");
this.OnNumberOfFreeCoresChanged();
}
}
}
[Column(Storage="_FreeMemory", DbType="Int NOT NULL")]
public int FreeMemory
{
get
{
return this._FreeMemory;
}
set
{
if ((this._FreeMemory != value))
{
this.OnFreeMemoryChanging(value);
this.SendPropertyChanging();
this._FreeMemory = value;
this.SendPropertyChanged("FreeMemory");
this.OnFreeMemoryChanged();
}
}
}
[Association(Name="Client_UptimeStatistic", Storage="_UptimeStatistics", ThisKey="ResourceId", OtherKey="ResourceId")]
public EntitySet UptimeStatistics
{
get
{
return this._UptimeStatistics;
}
set
{
this._UptimeStatistics.Assign(value);
}
}
[Association(Name="Client_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="ResourceId")]
public EntitySet Jobs
{
get
{
return this._Jobs;
}
set
{
this._Jobs.Assign(value);
}
}
[Association(Name="Resource_Client", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Resource Resource
{
get
{
return this._Resource.Entity;
}
set
{
Resource previousValue = this._Resource.Entity;
if (((previousValue != value)
|| (this._Resource.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Resource.Entity = null;
previousValue.Client = null;
}
this._Resource.Entity = value;
if ((value != null))
{
value.Client = this;
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(System.Guid);
}
this.SendPropertyChanged("Resource");
}
}
}
[Association(Name="Resource_Client1", Storage="_Resource1", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]
public Resource Resource1
{
get
{
return this._Resource1.Entity;
}
set
{
Resource previousValue = this._Resource1.Entity;
if (((previousValue != value)
|| (this._Resource1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Resource1.Entity = null;
previousValue.Client1 = null;
}
this._Resource1.Entity = value;
if ((value != null))
{
value.Client1 = this;
this._ResourceId = value.ResourceId;
}
else
{
this._ResourceId = default(System.Guid);
}
this.SendPropertyChanged("Resource1");
}
}
}
[Association(Name="ClientConfig_Client", Storage="_ClientConfig", ThisKey="ClientConfigId", OtherKey="ClientConfigId", IsForeignKey=true, DeleteRule="SET NULL")]
public ClientConfig ClientConfig
{
get
{
return this._ClientConfig.Entity;
}
set
{
ClientConfig previousValue = this._ClientConfig.Entity;
if (((previousValue != value)
|| (this._ClientConfig.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._ClientConfig.Entity = null;
previousValue.Clients.Remove(this);
}
this._ClientConfig.Entity = value;
if ((value != null))
{
value.Clients.Add(this);
this._ClientConfigId = value.ClientConfigId;
}
else
{
this._ClientConfigId = default(Nullable);
}
this.SendPropertyChanged("ClientConfig");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_UptimeStatistics(UptimeStatistic entity)
{
this.SendPropertyChanging();
entity.Client = this;
}
private void detach_UptimeStatistics(UptimeStatistic entity)
{
this.SendPropertyChanging();
entity.Client = null;
}
private void attach_Jobs(Job entity)
{
this.SendPropertyChanging();
entity.Client = this;
}
private void detach_Jobs(Job entity)
{
this.SendPropertyChanging();
entity.Client = null;
}
}
}
#pragma warning restore 1591