#pragma warning disable 1591
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace HeuristicLab.Services.Authentication.DataAccess
{
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;
[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.ClientManagment")]
public partial class ClientManagmentDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertResource(Resource instance);
partial void UpdateResource(Resource instance);
partial void DeleteResource(Resource instance);
partial void InsertResourceResourceGroup(ResourceResourceGroup instance);
partial void UpdateResourceResourceGroup(ResourceResourceGroup instance);
partial void DeleteResourceResourceGroup(ResourceResourceGroup instance);
#endregion
public ClientManagmentDataContext() :
base(global::HeuristicLab.Services.Authentication.DataAccess.Properties.Settings.Default.ClientManagementConnectionString, mappingSource)
{
OnCreated();
}
public ClientManagmentDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public ClientManagmentDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public ClientManagmentDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public ClientManagmentDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table Resources
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table ResourceResourceGroups
{
get
{
return this.GetTable();
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="")]
[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Resource", Type=typeof(Resource))]
[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Client", Type=typeof(Client))]
[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="ResourceGroup", Type=typeof(ResourceGroup), IsDefault=true)]
public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ResourceID;
private string _Name;
private string _Description;
private string _ResourceType;
private EntitySet _ResourceResourceGroups;
private EntitySet _ResourceResourceGroups1;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnIdChanging(System.Guid value);
partial void OnIdChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
partial void OnDescriptionChanging(string value);
partial void OnDescriptionChanged();
partial void OnResourceTypeChanging(string value);
partial void OnResourceTypeChanged();
#endregion
public Resource()
{
this._ResourceResourceGroups = new EntitySet(new Action(this.attach_ResourceResourceGroups), new Action(this.detach_ResourceResourceGroups));
this._ResourceResourceGroups1 = new EntitySet(new Action(this.attach_ResourceResourceGroups1), new Action(this.detach_ResourceResourceGroups1));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceID", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true)]
public System.Guid Id
{
get
{
return this._ResourceID;
}
set
{
if ((this._ResourceID != value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._ResourceID = value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", CanBeNull=false)]
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();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description")]
public string Description
{
get
{
return this._Description;
}
set
{
if ((this._Description != value))
{
this.OnDescriptionChanging(value);
this.SendPropertyChanging();
this._Description = value;
this.SendPropertyChanged("Description");
this.OnDescriptionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", CanBeNull=false, IsDiscriminator=true)]
public string ResourceType
{
get
{
return this._ResourceType;
}
set
{
if ((this._ResourceType != value))
{
this.OnResourceTypeChanging(value);
this.SendPropertyChanging();
this._ResourceType = value;
this.SendPropertyChanged("ResourceType");
this.OnResourceTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourceResourceGroup", Storage="_ResourceResourceGroups", ThisKey="Id", OtherKey="ResourceId")]
public EntitySet Clients
{
get
{
return this._ResourceResourceGroups;
}
set
{
this._ResourceResourceGroups.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourceResourceGroup1", Storage="_ResourceResourceGroups1", ThisKey="Id", OtherKey="ResourceGroupId")]
public EntitySet ResourceGroups
{
get
{
return this._ResourceResourceGroups1;
}
set
{
this._ResourceResourceGroups1.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_ResourceResourceGroups(ResourceResourceGroup entity)
{
this.SendPropertyChanging();
entity.Client = this;
}
private void detach_ResourceResourceGroups(ResourceResourceGroup entity)
{
this.SendPropertyChanging();
entity.Client = null;
}
private void attach_ResourceResourceGroups1(ResourceResourceGroup entity)
{
this.SendPropertyChanging();
entity.ResourceGroup = this;
}
private void detach_ResourceResourceGroups1(ResourceResourceGroup entity)
{
this.SendPropertyChanging();
entity.ResourceGroup = null;
}
}
public partial class Client : Resource
{
private string _ProcessorType;
private string _NumberOfProcessors;
private string _NumberOfThreads;
private string _IPAdress;
private string _MemorySize;
private string _OperatingSystem;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnProcessorTypeChanging(string value);
partial void OnProcessorTypeChanged();
partial void OnNumberOfProcessorsChanging(string value);
partial void OnNumberOfProcessorsChanged();
partial void OnNumberOfThreadsChanging(string value);
partial void OnNumberOfThreadsChanged();
partial void OnIPAdressChanging(string value);
partial void OnIPAdressChanged();
partial void OnMemorySizeChanging(string value);
partial void OnMemorySizeChanged();
partial void OnOperatingSystemChanging(string value);
partial void OnOperatingSystemChanged();
#endregion
public Client()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProcessorType")]
public string ProcessorType
{
get
{
return this._ProcessorType;
}
set
{
if ((this._ProcessorType != value))
{
this.OnProcessorTypeChanging(value);
this.SendPropertyChanging();
this._ProcessorType = value;
this.SendPropertyChanged("ProcessorType");
this.OnProcessorTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfProcessors")]
public string NumberOfProcessors
{
get
{
return this._NumberOfProcessors;
}
set
{
if ((this._NumberOfProcessors != value))
{
this.OnNumberOfProcessorsChanging(value);
this.SendPropertyChanging();
this._NumberOfProcessors = value;
this.SendPropertyChanged("NumberOfProcessors");
this.OnNumberOfProcessorsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfThreads")]
public string NumberOfThreads
{
get
{
return this._NumberOfThreads;
}
set
{
if ((this._NumberOfThreads != value))
{
this.OnNumberOfThreadsChanging(value);
this.SendPropertyChanging();
this._NumberOfThreads = value;
this.SendPropertyChanged("NumberOfThreads");
this.OnNumberOfThreadsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IPAdress")]
public string IPAdress
{
get
{
return this._IPAdress;
}
set
{
if ((this._IPAdress != value))
{
this.OnIPAdressChanging(value);
this.SendPropertyChanging();
this._IPAdress = value;
this.SendPropertyChanged("IPAdress");
this.OnIPAdressChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemorySize")]
public string MemorySize
{
get
{
return this._MemorySize;
}
set
{
if ((this._MemorySize != value))
{
this.OnMemorySizeChanging(value);
this.SendPropertyChanging();
this._MemorySize = value;
this.SendPropertyChanged("MemorySize");
this.OnMemorySizeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingSystem")]
public string OperatingSystem
{
get
{
return this._OperatingSystem;
}
set
{
if ((this._OperatingSystem != value))
{
this.OnOperatingSystemChanging(value);
this.SendPropertyChanging();
this._OperatingSystem = value;
this.SendPropertyChanged("OperatingSystem");
this.OnOperatingSystemChanged();
}
}
}
}
public partial class ResourceGroup : Resource
{
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
#endregion
public ResourceGroup()
{
OnCreated();
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="")]
public partial class ResourceResourceGroup : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private System.Guid _ResourceID;
private System.Guid _ResourceGroupID;
private EntityRef _Resource;
private EntityRef _Resource1;
#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 OnResourceGroupIdChanging(System.Guid value);
partial void OnResourceGroupIdChanged();
#endregion
public ResourceResourceGroup()
{
this._Resource = default(EntityRef);
this._Resource1 = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceID", 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();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroupID", IsPrimaryKey=true)]
public System.Guid ResourceGroupId
{
get
{
return this._ResourceGroupID;
}
set
{
if ((this._ResourceGroupID != value))
{
if (this._Resource1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnResourceGroupIdChanging(value);
this.SendPropertyChanging();
this._ResourceGroupID = value;
this.SendPropertyChanged("ResourceGroupId");
this.OnResourceGroupIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourceResourceGroup", Storage="_Resource", ThisKey="ResourceId", OtherKey="Id", IsForeignKey=true)]
public Resource Client
{
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.Clients.Remove(this);
}
this._Resource.Entity = value;
if ((value != null))
{
value.Clients.Add(this);
this._ResourceID = value.Id;
}
else
{
this._ResourceID = default(System.Guid);
}
this.SendPropertyChanged("Client");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourceResourceGroup1", Storage="_Resource1", ThisKey="ResourceGroupId", OtherKey="Id", IsForeignKey=true)]
public Resource ResourceGroup
{
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.ResourceGroups.Remove(this);
}
this._Resource1.Entity = value;
if ((value != null))
{
value.ResourceGroups.Add(this);
this._ResourceGroupID = value.Id;
}
else
{
this._ResourceGroupID = default(System.Guid);
}
this.SendPropertyChanged("ResourceGroup");
}
}
}
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));
}
}
}
}
#pragma warning restore 1591