Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3942


Ignore:
Timestamp:
06/23/10 22:36:33 (14 years ago)
Author:
bfarka
Message:

added classes for role persisting and relation between user and role (#1046)

Location:
branches/HeuristicLab.Services.Authentication Prototype/Persistence
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml

    r3941 r3942  
    1111      <Column Name="Email" Modifier="Override" Type="System.String" CanBeNull="false" />
    1212      <Column Name="Comment" Modifier="Override" Type="System.String" CanBeNull="false" />
     13      <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabUserID" Type="HeuristicLabUserRole" />
    1314    </Type>
    1415  </Table>
    1516  <Table Name="" Member="HeuristicLabAbstractRoles">
    16     <Type Name="HeuristicLabAbstractRole" Modifier="Abstract">
     17    <Type Name="HeuristicLabAbstractRole" IsInheritanceDefault="true" Modifier="Abstract">
    1718      <Column Name="ID" Type="System.Int64" IsReadOnly="true" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    1819      <Column Name="roleName" Member="RoleName" Storage="_roleName" Type="System.String" CanBeNull="false" />
    1920      <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="false" />
    20       <Column Name="RoleType" Member="IsPermission" Storage="_RoleType" Type="System.Boolean" CanBeNull="false" IsDiscriminator="true" />
    21       <Type Name="HeuristicLabRole" InheritanceCode="false" IsInheritanceDefault="true">
    22         <Column Name="DummyField1" Type="System.String" CanBeNull="false" />
    23       </Type>
    24       <Type Name="HeuristicLabPermissionRole" InheritanceCode="true">
    25         <Column Name="DummyField2" Type="System.String" CanBeNull="false" />
    26       </Type>
     21      <Column Member="RoleType" Type="System.String" IsReadOnly="true" CanBeNull="false" UpdateCheck="Always" IsDiscriminator="true" />
     22      <Association Name="HeuristicLabAbstractRole_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" />
     23      <Association Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole" Member="HeuristicLabAbstractRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabAbstractRole" />
     24      <Association Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole" Member="HeuristicLabAbstractRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabAbstractRole" IsForeignKey="true" />
     25      <Type Name="HeuristicLabPermissionRole" InheritanceCode="permission" />
     26      <Type Name="HeuristicLabRole" InheritanceCode="role" />
     27    </Type>
     28  </Table>
     29  <Table Name="" Member="HeuristicLabUserRole">
     30    <Type Name="HeuristicLabUserRole">
     31      <Column Member="ID" Type="System.Int64" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
     32      <Column Member="HeuristicLabUserID" Type="System.Int64" CanBeNull="false" />
     33      <Column Member="HeuristicLabRoleID" Type="System.Int64" CanBeNull="false" />
     34      <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUser" ThisKey="HeuristicLabUserID" OtherKey="ID" Type="HeuristicLabUser" IsForeignKey="true" />
     35      <Association Name="HeuristicLabAbstractRole_HeuristicLabUserRole" Member="HeuristicLabAbstractRole" ThisKey="HeuristicLabRoleID" OtherKey="ID" Type="HeuristicLabAbstractRole" IsForeignKey="true" />
    2736    </Type>
    2837  </Table>
  • branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout

    r3941 r3942  
    33  <DataContextMoniker Name="/DataClassesDataContext" />
    44  <nestedChildShapes>
    5     <classShape Id="8a64982c-bf12-42de-930c-12197e5058b2" absoluteBounds="0.75, 1.125, 2, 2.3478011067708335">
     5    <classShape Id="8a64982c-bf12-42de-930c-12197e5058b2" absoluteBounds="0.5, 0.625, 2, 2.3478011067708335">
    66      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabUser" />
    77      <nestedChildShapes>
    8         <elementListCompartment Id="c2de162f-d029-4b40-9694-ef3f14c7a783" absoluteBounds="0.7649999999999999, 1.585, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     8        <elementListCompartment Id="c2de162f-d029-4b40-9694-ef3f14c7a783" absoluteBounds="0.5149999999999999, 1.085, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    99      </nestedChildShapes>
    1010    </classShape>
    11     <classShape Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" absoluteBounds="5.5, 0.75, 2, 1.5785953776041666">
     11    <classShape Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" absoluteBounds="3.5, 0.875, 2, 1.5785953776041666">
    1212      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabAbstractRole" />
    1313      <nestedChildShapes>
    14         <elementListCompartment Id="c418e826-fe22-4952-802e-047da829e949" absoluteBounds="5.5150000005960464, 1.2100000008940697, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     14        <elementListCompartment Id="c418e826-fe22-4952-802e-047da829e949" absoluteBounds="3.5150000005960464, 1.3350000008940697, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    1515      </nestedChildShapes>
    1616    </classShape>
    17     <classShape Id="b49c3eca-7de0-4ace-97ce-90212955db18" absoluteBounds="6.875, 2.75, 2, 1.0016910807291666">
     17    <classShape Id="b49c3eca-7de0-4ace-97ce-90212955db18" absoluteBounds="6.875, 0.75, 2, 0.8093896484375">
    1818      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabRole" />
    1919      <nestedChildShapes>
    20         <elementListCompartment Id="b2f6a32c-1cff-4bb5-9008-e4e430125a0a" absoluteBounds="6.89, 3.21, 1.9700000000000002, 0.44169108072916663" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     20        <elementListCompartment Id="b2f6a32c-1cff-4bb5-9008-e4e430125a0a" absoluteBounds="6.8900000000000006, 1.21, 1.9700000000000002, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2121      </nestedChildShapes>
    2222    </classShape>
    23     <classShape Id="d798095d-2715-4342-bc36-c2e6602a4fba" absoluteBounds="4.125, 2.75, 2, 1.0016910807291666">
     23    <classShape Id="d798095d-2715-4342-bc36-c2e6602a4fba" absoluteBounds="6.875, 2, 2, 0.80938964843749961">
    2424      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabPermissionRole" />
    2525      <nestedChildShapes>
    26         <elementListCompartment Id="8328fcdb-eadc-4d44-9aa5-5ae334106ddd" absoluteBounds="4.14, 3.21, 1.9700000000000002, 0.44169108072916663" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     26        <elementListCompartment Id="8328fcdb-eadc-4d44-9aa5-5ae334106ddd" absoluteBounds="6.89, 2.46, 1.9700000000000002, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2727      </nestedChildShapes>
    2828    </classShape>
    29     <inheritanceConnector edgePoints="[(6.5 : 2.32859537760417); (6.5 : 2.5); (7.875 : 2.5); (7.875 : 2.75)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     29    <inheritanceConnector edgePoints="[(5.5 : 2.22679768880208); (6.875 : 2.22679768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     30      <nodes>
     31        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
     32        <classShapeMoniker Id="d798095d-2715-4342-bc36-c2e6602a4fba" />
     33      </nodes>
     34    </inheritanceConnector>
     35    <inheritanceConnector edgePoints="[(5.5 : 1.21719482421875); (6.875 : 1.21719482421875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    3036      <nodes>
    3137        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
     
    3339      </nodes>
    3440    </inheritanceConnector>
    35     <inheritanceConnector edgePoints="[(6.5 : 2.32859537760417); (6.5 : 2.5); (5.125 : 2.5); (5.125 : 2.75)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     41    <classShape Id="032f81a1-f00c-4b0f-b4fc-8cf872ad58a6" absoluteBounds="0.625, 3.625, 2, 1.3862939453124996">
     42      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabUserRole" />
     43      <nestedChildShapes>
     44        <elementListCompartment Id="b6e006b6-2555-4d02-852a-c5bae38cd56c" absoluteBounds="0.6399999999999999, 4.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     45      </nestedChildShapes>
     46    </classShape>
     47    <associationConnector edgePoints="[(1.5625 : 2.97280110677083); (1.5625 : 3.625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     48      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabUser/HeuristicLabUser_HeuristicLabUserRole" />
     49      <nodes>
     50        <classShapeMoniker Id="8a64982c-bf12-42de-930c-12197e5058b2" />
     51        <classShapeMoniker Id="032f81a1-f00c-4b0f-b4fc-8cf872ad58a6" />
     52      </nodes>
     53    </associationConnector>
     54    <associationConnector edgePoints="[(3.9687475 : 2.45359537760417); (3.9687475 : 4.35564697265625); (2.625 : 4.35564697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     55      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabAbstractRole/HeuristicLabAbstractRole_HeuristicLabUserRole" />
    3656      <nodes>
    3757        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
    38         <classShapeMoniker Id="d798095d-2715-4342-bc36-c2e6602a4fba" />
     58        <classShapeMoniker Id="032f81a1-f00c-4b0f-b4fc-8cf872ad58a6" />
    3959      </nodes>
    40     </inheritanceConnector>
     60    </associationConnector>
     61    <associationConnector edgePoints="[(4.20242346379207 : 0.875); (4.20242346379207 : 0.625); (4.81174684745593 : 0.625); (4.81174684745593 : 0.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     62      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabAbstractRole/HeuristicLabAbstractRole_HeuristicLabAbstractRole" />
     63      <nodes>
     64        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
     65        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
     66      </nodes>
     67    </associationConnector>
    4168  </nestedChildShapes>
    4269</ordesignerObjectsDiagram>
  • branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs

    r3941 r3942  
    22//------------------------------------------------------------------------------
    33// <auto-generated>
    4 //     This code was generated by a tool.
    5 //     Runtime Version:2.0.50727.4927
     4//     Dieser Code wurde von einem Tool generiert.
     5//     Laufzeitversion:2.0.50727.4927
    66//
    7 //     Changes to this file may cause incorrect behavior and will be lost if
    8 //     the code is regenerated.
     7//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
     8//     der Code erneut generiert wird.
    99// </auto-generated>
    1010//------------------------------------------------------------------------------
     
    3636    partial void UpdateHeuristicLabAbstractRole(HeuristicLabAbstractRole instance);
    3737    partial void DeleteHeuristicLabAbstractRole(HeuristicLabAbstractRole instance);
     38    partial void InsertHeuristicLabUserRole(HeuristicLabUserRole instance);
     39    partial void UpdateHeuristicLabUserRole(HeuristicLabUserRole instance);
     40    partial void DeleteHeuristicLabUserRole(HeuristicLabUserRole instance);
    3841    #endregion
    3942   
     
    7578      {
    7679        return this.GetTable<HeuristicLabAbstractRole>();
     80      }
     81    }
     82   
     83    public System.Data.Linq.Table<HeuristicLabUserRole> HeuristicLabUserRole
     84    {
     85      get
     86      {
     87        return this.GetTable<HeuristicLabUserRole>();
    7788      }
    7889    }
     
    100111   
    101112    private string _Comment;
     113   
     114    private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole;
    102115   
    103116    #region Extensibility Method Definitions
     
    117130    public HeuristicLabUser()
    118131    {
     132      this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole));
    119133      OnCreated();
    120134    }
     
    236250    }
    237251   
     252    [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabUserID")]
     253    public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole
     254    {
     255      get
     256      {
     257        return this._HeuristicLabUserRole;
     258      }
     259      set
     260      {
     261        this._HeuristicLabUserRole.Assign(value);
     262      }
     263    }
     264   
    238265    public event PropertyChangingEventHandler PropertyChanging;
    239266   
     
    254281        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    255282      }
     283    }
     284   
     285    private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity)
     286    {
     287      this.SendPropertyChanging();
     288      entity.HeuristicLabUser = this;
     289    }
     290   
     291    private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity)
     292    {
     293      this.SendPropertyChanging();
     294      entity.HeuristicLabUser = null;
    256295    }
    257296  }
    258297 
    259298  [Table(Name="")]
    260   [InheritanceMapping(Code="false", Type=typeof(HeuristicLabRole), IsDefault=true)]
    261   [InheritanceMapping(Code="true", Type=typeof(HeuristicLabPermissionRole))]
     299  [InheritanceMapping(Code="permission", Type=typeof(HeuristicLabPermissionRole))]
     300  [InheritanceMapping(Code="role", Type=typeof(HeuristicLabRole))]
    262301  public abstract partial class HeuristicLabAbstractRole : INotifyPropertyChanging, INotifyPropertyChanged
    263302  {
     
    271310    private long _parentRoleID;
    272311   
    273     private bool _RoleType;
     312    private string _RoleType = default(string);
     313   
     314    private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole;
     315   
     316    private EntitySet<HeuristicLabAbstractRole> _HeuristicLabAbstractRole2;
     317   
     318    private EntityRef<HeuristicLabAbstractRole> _HeuristicLabAbstractRole1;
    274319   
    275320    #region Extensibility Method Definitions
     
    281326    partial void OnParentRoleIDChanging(long value);
    282327    partial void OnParentRoleIDChanged();
    283     partial void OnIsPermissionChanging(bool value);
    284     partial void OnIsPermissionChanged();
    285328    #endregion
    286329   
    287330    public HeuristicLabAbstractRole()
    288331    {
     332      this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole));
     333      this._HeuristicLabAbstractRole2 = new EntitySet<HeuristicLabAbstractRole>(new Action<HeuristicLabAbstractRole>(this.attach_HeuristicLabAbstractRole2), new Action<HeuristicLabAbstractRole>(this.detach_HeuristicLabAbstractRole2));
     334      this._HeuristicLabAbstractRole1 = default(EntityRef<HeuristicLabAbstractRole>);
    289335      OnCreated();
    290336    }
     
    339385    }
    340386   
    341     [Column(Name="RoleType", Storage="_RoleType", IsDiscriminator=true)]
    342     public bool IsPermission
     387    [Column(Storage="_RoleType", CanBeNull=false, UpdateCheck=UpdateCheck.Never, IsDiscriminator=true)]
     388    public string RoleType
    343389    {
    344390      get
     
    346392        return this._RoleType;
    347393      }
    348       set
    349       {
    350         if ((this._RoleType != value))
    351         {
    352           this.OnIsPermissionChanging(value);
    353           this.SendPropertyChanging();
    354           this._RoleType = value;
    355           this.SendPropertyChanged("IsPermission");
    356           this.OnIsPermissionChanged();
     394    }
     395   
     396    [Association(Name="HeuristicLabAbstractRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")]
     397    public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole
     398    {
     399      get
     400      {
     401        return this._HeuristicLabUserRole;
     402      }
     403      set
     404      {
     405        this._HeuristicLabUserRole.Assign(value);
     406      }
     407    }
     408   
     409    [Association(Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole", Storage="_HeuristicLabAbstractRole2", ThisKey="ID", OtherKey="ParentRoleID")]
     410    public EntitySet<HeuristicLabAbstractRole> HeuristicLabAbstractRole2
     411    {
     412      get
     413      {
     414        return this._HeuristicLabAbstractRole2;
     415      }
     416      set
     417      {
     418        this._HeuristicLabAbstractRole2.Assign(value);
     419      }
     420    }
     421   
     422    [Association(Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole", Storage="_HeuristicLabAbstractRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)]
     423    public HeuristicLabAbstractRole HeuristicLabAbstractRole1
     424    {
     425      get
     426      {
     427        return this._HeuristicLabAbstractRole1.Entity;
     428      }
     429      set
     430      {
     431        HeuristicLabAbstractRole previousValue = this._HeuristicLabAbstractRole1.Entity;
     432        if (((previousValue != value)
     433              || (this._HeuristicLabAbstractRole1.HasLoadedOrAssignedValue == false)))
     434        {
     435          this.SendPropertyChanging();
     436          if ((previousValue != null))
     437          {
     438            this._HeuristicLabAbstractRole1.Entity = null;
     439            previousValue.HeuristicLabAbstractRole2.Remove(this);
     440          }
     441          this._HeuristicLabAbstractRole1.Entity = value;
     442          if ((value != null))
     443          {
     444            value.HeuristicLabAbstractRole2.Add(this);
     445            this._parentRoleID = value.ID;
     446          }
     447          else
     448          {
     449            this._parentRoleID = default(long);
     450          }
     451          this.SendPropertyChanged("HeuristicLabAbstractRole1");
    357452        }
    358453      }
     
    377472        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    378473      }
     474    }
     475   
     476    private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity)
     477    {
     478      this.SendPropertyChanging();
     479      entity.HeuristicLabAbstractRole = this;
     480    }
     481   
     482    private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity)
     483    {
     484      this.SendPropertyChanging();
     485      entity.HeuristicLabAbstractRole = null;
     486    }
     487   
     488    private void attach_HeuristicLabAbstractRole2(HeuristicLabAbstractRole entity)
     489    {
     490      this.SendPropertyChanging();
     491      entity.HeuristicLabAbstractRole1 = this;
     492    }
     493   
     494    private void detach_HeuristicLabAbstractRole2(HeuristicLabAbstractRole entity)
     495    {
     496      this.SendPropertyChanging();
     497      entity.HeuristicLabAbstractRole1 = null;
     498    }
     499  }
     500 
     501  public partial class HeuristicLabPermissionRole : HeuristicLabAbstractRole
     502  {
     503   
     504    #region Extensibility Method Definitions
     505    partial void OnLoaded();
     506    partial void OnValidate(System.Data.Linq.ChangeAction action);
     507    partial void OnCreated();
     508    #endregion
     509   
     510    public HeuristicLabPermissionRole()
     511    {
     512      OnCreated();
    379513    }
    380514  }
     
    383517  {
    384518   
    385     private string _DummyField1;
    386    
    387519    #region Extensibility Method Definitions
    388520    partial void OnLoaded();
    389521    partial void OnValidate(System.Data.Linq.ChangeAction action);
    390522    partial void OnCreated();
    391     partial void OnDummyField1Changing(string value);
    392     partial void OnDummyField1Changed();
    393523    #endregion
    394524   
     
    396526    {
    397527      OnCreated();
    398     }
    399    
    400     [Column(Storage="_DummyField1", CanBeNull=false)]
    401     public string DummyField1
    402     {
    403       get
    404       {
    405         return this._DummyField1;
    406       }
    407       set
    408       {
    409         if ((this._DummyField1 != value))
    410         {
    411           this.OnDummyField1Changing(value);
    412           this.SendPropertyChanging();
    413           this._DummyField1 = value;
    414           this.SendPropertyChanged("DummyField1");
    415           this.OnDummyField1Changed();
    416         }
    417       }
    418528    }
    419529  }
    420530 
    421   public partial class HeuristicLabPermissionRole : HeuristicLabAbstractRole
     531  [Table(Name="")]
     532  public partial class HeuristicLabUserRole : INotifyPropertyChanging, INotifyPropertyChanged
    422533  {
    423534   
    424     private string _DummyField2;
     535    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
     536   
     537    private long _ID;
     538   
     539    private long _HeuristicLabUserID;
     540   
     541    private long _HeuristicLabRoleID;
     542   
     543    private EntityRef<HeuristicLabUser> _HeuristicLabUser;
     544   
     545    private EntityRef<HeuristicLabAbstractRole> _HeuristicLabAbstractRole;
    425546   
    426547    #region Extensibility Method Definitions
     
    428549    partial void OnValidate(System.Data.Linq.ChangeAction action);
    429550    partial void OnCreated();
    430     partial void OnDummyField2Changing(string value);
    431     partial void OnDummyField2Changed();
     551    partial void OnIDChanging(long value);
     552    partial void OnIDChanged();
     553    partial void OnHeuristicLabUserIDChanging(long value);
     554    partial void OnHeuristicLabUserIDChanged();
     555    partial void OnHeuristicLabRoleIDChanging(long value);
     556    partial void OnHeuristicLabRoleIDChanged();
    432557    #endregion
    433558   
    434     public HeuristicLabPermissionRole()
    435     {
    436       OnCreated();
    437     }
    438    
    439     [Column(Storage="_DummyField2", CanBeNull=false)]
    440     public string DummyField2
    441     {
    442       get
    443       {
    444         return this._DummyField2;
    445       }
    446       set
    447       {
    448         if ((this._DummyField2 != value))
    449         {
    450           this.OnDummyField2Changing(value);
    451           this.SendPropertyChanging();
    452           this._DummyField2 = value;
    453           this.SendPropertyChanged("DummyField2");
    454           this.OnDummyField2Changed();
    455         }
     559    public HeuristicLabUserRole()
     560    {
     561      this._HeuristicLabUser = default(EntityRef<HeuristicLabUser>);
     562      this._HeuristicLabAbstractRole = default(EntityRef<HeuristicLabAbstractRole>);
     563      OnCreated();
     564    }
     565   
     566    [Column(Storage="_ID", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true, IsDbGenerated=true)]
     567    public long ID
     568    {
     569      get
     570      {
     571        return this._ID;
     572      }
     573      set
     574      {
     575        if ((this._ID != value))
     576        {
     577          this.OnIDChanging(value);
     578          this.SendPropertyChanging();
     579          this._ID = value;
     580          this.SendPropertyChanged("ID");
     581          this.OnIDChanged();
     582        }
     583      }
     584    }
     585   
     586    [Column(Storage="_HeuristicLabUserID")]
     587    public long HeuristicLabUserID
     588    {
     589      get
     590      {
     591        return this._HeuristicLabUserID;
     592      }
     593      set
     594      {
     595        if ((this._HeuristicLabUserID != value))
     596        {
     597          if (this._HeuristicLabUser.HasLoadedOrAssignedValue)
     598          {
     599            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
     600          }
     601          this.OnHeuristicLabUserIDChanging(value);
     602          this.SendPropertyChanging();
     603          this._HeuristicLabUserID = value;
     604          this.SendPropertyChanged("HeuristicLabUserID");
     605          this.OnHeuristicLabUserIDChanged();
     606        }
     607      }
     608    }
     609   
     610    [Column(Storage="_HeuristicLabRoleID")]
     611    public long HeuristicLabRoleID
     612    {
     613      get
     614      {
     615        return this._HeuristicLabRoleID;
     616      }
     617      set
     618      {
     619        if ((this._HeuristicLabRoleID != value))
     620        {
     621          if (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue)
     622          {
     623            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
     624          }
     625          this.OnHeuristicLabRoleIDChanging(value);
     626          this.SendPropertyChanging();
     627          this._HeuristicLabRoleID = value;
     628          this.SendPropertyChanged("HeuristicLabRoleID");
     629          this.OnHeuristicLabRoleIDChanged();
     630        }
     631      }
     632    }
     633   
     634    [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUser", ThisKey="HeuristicLabUserID", OtherKey="ID", IsForeignKey=true)]
     635    public HeuristicLabUser HeuristicLabUser
     636    {
     637      get
     638      {
     639        return this._HeuristicLabUser.Entity;
     640      }
     641      set
     642      {
     643        HeuristicLabUser previousValue = this._HeuristicLabUser.Entity;
     644        if (((previousValue != value)
     645              || (this._HeuristicLabUser.HasLoadedOrAssignedValue == false)))
     646        {
     647          this.SendPropertyChanging();
     648          if ((previousValue != null))
     649          {
     650            this._HeuristicLabUser.Entity = null;
     651            previousValue.HeuristicLabUserRole.Remove(this);
     652          }
     653          this._HeuristicLabUser.Entity = value;
     654          if ((value != null))
     655          {
     656            value.HeuristicLabUserRole.Add(this);
     657            this._HeuristicLabUserID = value.ID;
     658          }
     659          else
     660          {
     661            this._HeuristicLabUserID = default(long);
     662          }
     663          this.SendPropertyChanged("HeuristicLabUser");
     664        }
     665      }
     666    }
     667   
     668    [Association(Name="HeuristicLabAbstractRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)]
     669    public HeuristicLabAbstractRole HeuristicLabAbstractRole
     670    {
     671      get
     672      {
     673        return this._HeuristicLabAbstractRole.Entity;
     674      }
     675      set
     676      {
     677        HeuristicLabAbstractRole previousValue = this._HeuristicLabAbstractRole.Entity;
     678        if (((previousValue != value)
     679              || (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue == false)))
     680        {
     681          this.SendPropertyChanging();
     682          if ((previousValue != null))
     683          {
     684            this._HeuristicLabAbstractRole.Entity = null;
     685            previousValue.HeuristicLabUserRole.Remove(this);
     686          }
     687          this._HeuristicLabAbstractRole.Entity = value;
     688          if ((value != null))
     689          {
     690            value.HeuristicLabUserRole.Add(this);
     691            this._HeuristicLabRoleID = value.ID;
     692          }
     693          else
     694          {
     695            this._HeuristicLabRoleID = default(long);
     696          }
     697          this.SendPropertyChanged("HeuristicLabAbstractRole");
     698        }
     699      }
     700    }
     701   
     702    public event PropertyChangingEventHandler PropertyChanging;
     703   
     704    public event PropertyChangedEventHandler PropertyChanged;
     705   
     706    protected virtual void SendPropertyChanging()
     707    {
     708      if ((this.PropertyChanging != null))
     709      {
     710        this.PropertyChanging(this, emptyChangingEventArgs);
     711      }
     712    }
     713   
     714    protected virtual void SendPropertyChanged(String propertyName)
     715    {
     716      if ((this.PropertyChanged != null))
     717      {
     718        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    456719      }
    457720    }
Note: See TracChangeset for help on using the changeset viewer.