Free cookie consent management tool by TermsFeed Policy Generator

Changeset 936


Ignore:
Timestamp:
12/10/08 11:55:47 (15 years ago)
Author:
svonolfe
Message:

Implemented UserGroupAdapter (#372)

Location:
trunk/sources
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs

    r925 r936  
    133133      ClientInfo client = new ClientInfo();
    134134
    135       dsHiveServer.ClientRow row =
    136         data.Single<dsHiveServer.ClientRow>(
    137           r => !r.IsGUIDNull() && r.GUID == clientId);
     135      dsHiveServer.ClientRow row = null;
     136      IEnumerable<dsHiveServer.ClientRow> clients =
     137            from c in
     138              data.AsEnumerable<dsHiveServer.ClientRow>()
     139            where !c.IsGUIDNull() && c.GUID == clientId
     140            select c;
     141      if (clients.Count<dsHiveServer.ClientRow>() == 1)
     142        row = clients.First<dsHiveServer.ClientRow>();
    138143
    139144      if (row != null) {
     
    162167    public bool DeleteClient(ClientInfo client) {
    163168      if (client != null) {
    164         dsHiveServer.ClientRow row =
    165           data.Single<dsHiveServer.ClientRow>(
    166             r => r.GUID == client.ClientId);
     169        dsHiveServer.ClientRow row = null;
     170        IEnumerable<dsHiveServer.ClientRow> clients =
     171              from c in
     172                data.AsEnumerable<dsHiveServer.ClientRow>()
     173              where !c.IsGUIDNull() && c.GUID == client.ClientId
     174              select c;
     175        if (clients.Count<dsHiveServer.ClientRow>() == 1)
     176          row = clients.First<dsHiveServer.ClientRow>();
    167177
    168178        if (row != null) {
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs

    r910 r936  
    2727using HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess;
    2828using HeuristicLab.Hive.Contracts.BusinessObjects;
     29using System.Runtime.CompilerServices;
    2930
    3031namespace HeuristicLab.Hive.Server.ADODataAccess {
    31   class UserGroupAdapter: IUserGroupAdapter {
     32  class UserGroupAdapter: DataAdapterBase, IUserGroupAdapter {
     33    private dsHiveServerTableAdapters.UserGroupTableAdapter adapter =
     34        new dsHiveServerTableAdapters.UserGroupTableAdapter();
     35
     36    private dsHiveServer.UserGroupDataTable data =
     37      new dsHiveServer.UserGroupDataTable();
     38
     39    private dsHiveServerTableAdapters.PermissionOwner_UserGroupTableAdapter permOwnerUserGroupAdapter =
     40      new dsHiveServerTableAdapters.PermissionOwner_UserGroupTableAdapter();
     41
     42    private dsHiveServer.PermissionOwner_UserGroupDataTable permOwnerUserGroupData =
     43      new dsHiveServer.PermissionOwner_UserGroupDataTable();
     44
     45    private IPermissionOwnerAdapter permOwnerAdapter =
     46      ServiceLocator.GetPermissionOwnerAdapter();
     47
     48    private IUserAdapter userAdapter =
     49      ServiceLocator.GetUserAdapter();
     50
     51    public UserGroupAdapter() {
     52      adapter.Fill(data);
     53      permOwnerUserGroupAdapter.Fill(permOwnerUserGroupData);
     54    }
     55
     56    protected override void Update() {
     57      this.adapter.Update(this.data);
     58      this.permOwnerUserGroupAdapter.Update(permOwnerUserGroupData);
     59    }
     60
     61    private UserGroup Convert(dsHiveServer.UserGroupRow row,
     62      UserGroup userGroup) {
     63      if (row != null && userGroup != null) {
     64        /*Parent - Permission Owner*/
     65        userGroup.PermissionOwnerId = row.PermissionOwnerId;
     66        permOwnerAdapter.GetPermissionOwnerById(userGroup);
     67
     68        //first check for created references
     69        IEnumerable<dsHiveServer.PermissionOwner_UserGroupRow> userGroupRows =
     70          from permOwner in
     71            permOwnerUserGroupData.AsEnumerable<dsHiveServer.PermissionOwner_UserGroupRow>()
     72          where permOwner.UserGroupId == userGroup.PermissionOwnerId
     73          select permOwner;
     74
     75        foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
     76          userGroupRows) {
     77          PermissionOwner permOwner = null;
     78         
     79          IEnumerable<PermissionOwner> permOwners =
     80            from p in
     81              userGroup.Members
     82            where p.PermissionOwnerId == permOwnerUserGroupRow.PermissionOwnerId
     83            select p;
     84          if (permOwners.Count<PermissionOwner>() == 1)
     85            permOwner = permOwners.First<PermissionOwner>();
     86
     87          if (permOwner == null) {
     88            PermissionOwner permissionOwner =
     89              userAdapter.GetUserById(permOwnerUserGroupRow.PermissionOwnerId);
     90
     91            if (permissionOwner == null) {
     92              //is a user group
     93              permissionOwner =
     94                GetUserGroupById(permOwnerUserGroupRow.PermissionOwnerId);
     95            }
     96
     97            userGroup.Members.Add(permissionOwner);
     98          }
     99        }
     100
     101        //secondly check for deleted references
     102        ICollection<PermissionOwner> deleted =
     103          new List<PermissionOwner>();
     104
     105        foreach (PermissionOwner permOwner in userGroup.Members) {
     106          dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow =
     107            permOwnerUserGroupData.FindByPermissionOwnerIdUserGroupId(
     108              permOwner.PermissionOwnerId,
     109              userGroup.PermissionOwnerId);
     110
     111          if (permOwnerUserGroupRow == null) {
     112            deleted.Add(permOwner);
     113          }
     114        }
     115
     116        foreach (PermissionOwner permOwner in deleted) {
     117          userGroup.Members.Remove(permOwner);
     118        }
     119
     120        return userGroup;
     121      } else
     122        return null;
     123    }
     124
     125    private dsHiveServer.UserGroupRow Convert(UserGroup userGroup,
     126      dsHiveServer.UserGroupRow row) {
     127      if (userGroup != null && row != null) {
     128        row.PermissionOwnerId = userGroup.PermissionOwnerId;
     129     
     130        //update references
     131        foreach (PermissionOwner permOwner in userGroup.Members) {         
     132          //first update the member to make sure it exists in the DB
     133          if (permOwner is User) {
     134            userAdapter.UpdateUser(permOwner as User);
     135          } else if (permOwner is UserGroup) {
     136            UpdateUserGroup(permOwner as UserGroup);
     137          }
     138
     139          //secondly check for created references
     140          dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow =
     141            permOwnerUserGroupData.FindByPermissionOwnerIdUserGroupId(
     142              permOwner.PermissionOwnerId,
     143              userGroup.PermissionOwnerId);
     144
     145          if (permOwnerUserGroupRow == null) {
     146            permOwnerUserGroupRow =
     147              permOwnerUserGroupData.NewPermissionOwner_UserGroupRow();
     148
     149            permOwnerUserGroupRow.PermissionOwnerId =
     150              permOwner.PermissionOwnerId;
     151            permOwnerUserGroupRow.UserGroupId =
     152              userGroup.PermissionOwnerId;
     153
     154            permOwnerUserGroupData.AddPermissionOwner_UserGroupRow(
     155              permOwnerUserGroupRow);
     156          }
     157        }
     158
     159        //thirdly check for deleted references
     160        IEnumerable<dsHiveServer.PermissionOwner_UserGroupRow> userGroupRows =
     161          from permOwner in
     162            permOwnerUserGroupData.AsEnumerable<dsHiveServer.PermissionOwner_UserGroupRow>()
     163          where permOwner.UserGroupId == userGroup.PermissionOwnerId 
     164          select permOwner;
     165
     166        ICollection<dsHiveServer.PermissionOwner_UserGroupRow> deleted =
     167          new List<dsHiveServer.PermissionOwner_UserGroupRow>();
     168
     169        foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
     170          userGroupRows) {
     171          PermissionOwner permOwner = userGroup.Members.Single<PermissionOwner>(
     172            p => p.PermissionOwnerId == permOwnerUserGroupRow.PermissionOwnerId);
     173
     174          if (permOwner == null) {
     175            deleted.Add(permOwnerUserGroupRow);
     176          }
     177        }
     178
     179        foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
     180          deleted) {
     181          permOwnerUserGroupData.RemovePermissionOwner_UserGroupRow(
     182            permOwnerUserGroupRow);
     183        }
     184
     185      }
     186
     187      return row;
     188    }
     189
    32190    #region IUserGroupAdapter Members
    33 
     191    [MethodImpl(MethodImplOptions.Synchronized)]
    34192    public void UpdateUserGroup(UserGroup group) {
    35       throw new NotImplementedException();
     193      if (group != null) {
     194        permOwnerAdapter.UpdatePermissionOwner(group);
     195
     196        dsHiveServer.UserGroupRow row =
     197          data.FindByPermissionOwnerId(group.PermissionOwnerId);
     198
     199        if (row == null) {
     200          row = data.NewUserGroupRow();
     201          row.PermissionOwnerId = group.PermissionOwnerId;
     202          data.AddUserGroupRow(row);
     203        }
     204
     205        Convert(group, row);
     206      }
    36207    }
    37208
    38209    public UserGroup GetUserGroupById(long userGroupId) {
    39       throw new NotImplementedException();
     210      UserGroup userGroup = new UserGroup();
     211
     212      dsHiveServer.UserGroupRow row =
     213        data.FindByPermissionOwnerId(userGroupId);
     214
     215      if (row != null) {
     216        Convert(row, userGroup);
     217
     218        return userGroup;
     219      } else {
     220        return null;
     221      }
    40222    }
    41223
    42224    public ICollection<UserGroup> GetAllUserGroups() {
    43       throw new NotImplementedException();
    44     }
    45 
     225      ICollection<UserGroup> allUserGroups =
     226        new List<UserGroup>();
     227
     228      foreach (dsHiveServer.UserGroupRow row in data) {
     229        UserGroup userGroup = new UserGroup();
     230
     231        Convert(row, userGroup);
     232        allUserGroups.Add(userGroup);
     233      }
     234
     235      return allUserGroups;
     236    }
     237
     238    [MethodImpl(MethodImplOptions.Synchronized)]
    46239    public bool DeleteUserGroup(UserGroup group) {
    47       throw new NotImplementedException();
     240      if (group != null) {
     241        dsHiveServer.UserGroupRow row =
     242          data.FindByPermissionOwnerId(group.PermissionOwnerId);
     243
     244        if (row != null) {
     245          ICollection<dsHiveServer.PermissionOwner_UserGroupRow> deleted =
     246            new List<dsHiveServer.PermissionOwner_UserGroupRow>();
     247         
     248          foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
     249            permOwnerUserGroupData) {
     250            if (permOwnerUserGroupRow.UserGroupId == group.PermissionOwnerId ||
     251                permOwnerUserGroupRow.PermissionOwnerId == group.PermissionOwnerId) {
     252              deleted.Add(permOwnerUserGroupRow);
     253            }
     254          }
     255
     256          foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
     257            deleted) {
     258            permOwnerUserGroupData.RemovePermissionOwner_UserGroupRow(
     259              permOwnerUserGroupRow);
     260          }
     261         
     262          data.RemoveUserGroupRow(row);
     263          return permOwnerAdapter.DeletePermissionOwner(group);
     264        }
     265      }
     266
     267      return false;
    48268    }
    49269
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs

    r925 r936  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:2.0.50727.1433
     4//     Runtime Version:2.0.50727.3053
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    3434        private PermissionOwnerDataTable tablePermissionOwner;
    3535       
     36        private UserGroupDataTable tableUserGroup;
     37       
     38        private PermissionOwner_UserGroupDataTable tablePermissionOwner_UserGroup;
     39       
    3640        private global::System.Data.DataRelation relationClient_is_a_Resource;
    3741       
    3842        private global::System.Data.DataRelation relationUser_is_a_PermissionOwner;
     43       
     44        private global::System.Data.DataRelation relationUserGroup_is_a_PermissionOwner;
     45       
     46        private global::System.Data.DataRelation relationR_44;
     47       
     48        private global::System.Data.DataRelation relationR_57;
    3949       
    4050        private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     
    7686                    base.Tables.Add(new PermissionOwnerDataTable(ds.Tables["PermissionOwner"]));
    7787                }
     88                if ((ds.Tables["UserGroup"] != null)) {
     89                    base.Tables.Add(new UserGroupDataTable(ds.Tables["UserGroup"]));
     90                }
     91                if ((ds.Tables["PermissionOwner_UserGroup"] != null)) {
     92                    base.Tables.Add(new PermissionOwner_UserGroupDataTable(ds.Tables["PermissionOwner_UserGroup"]));
     93                }
    7894                this.DataSetName = ds.DataSetName;
    7995                this.Prefix = ds.Prefix;
     
    131147       
    132148        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     149        [global::System.ComponentModel.Browsable(false)]
     150        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
     151        public UserGroupDataTable UserGroup {
     152            get {
     153                return this.tableUserGroup;
     154            }
     155        }
     156       
     157        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     158        [global::System.ComponentModel.Browsable(false)]
     159        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
     160        public PermissionOwner_UserGroupDataTable PermissionOwner_UserGroup {
     161            get {
     162                return this.tablePermissionOwner_UserGroup;
     163            }
     164        }
     165       
     166        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    133167        [global::System.ComponentModel.BrowsableAttribute(true)]
    134168        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
     
    200234                if ((ds.Tables["PermissionOwner"] != null)) {
    201235                    base.Tables.Add(new PermissionOwnerDataTable(ds.Tables["PermissionOwner"]));
     236                }
     237                if ((ds.Tables["UserGroup"] != null)) {
     238                    base.Tables.Add(new UserGroupDataTable(ds.Tables["UserGroup"]));
     239                }
     240                if ((ds.Tables["PermissionOwner_UserGroup"] != null)) {
     241                    base.Tables.Add(new PermissionOwner_UserGroupDataTable(ds.Tables["PermissionOwner_UserGroup"]));
    202242                }
    203243                this.DataSetName = ds.DataSetName;
     
    255295                }
    256296            }
     297            this.tableUserGroup = ((UserGroupDataTable)(base.Tables["UserGroup"]));
     298            if ((initTable == true)) {
     299                if ((this.tableUserGroup != null)) {
     300                    this.tableUserGroup.InitVars();
     301                }
     302            }
     303            this.tablePermissionOwner_UserGroup = ((PermissionOwner_UserGroupDataTable)(base.Tables["PermissionOwner_UserGroup"]));
     304            if ((initTable == true)) {
     305                if ((this.tablePermissionOwner_UserGroup != null)) {
     306                    this.tablePermissionOwner_UserGroup.InitVars();
     307                }
     308            }
    257309            this.relationClient_is_a_Resource = this.Relations["Client_is_a_Resource"];
    258310            this.relationUser_is_a_PermissionOwner = this.Relations["User_is_a_PermissionOwner"];
     311            this.relationUserGroup_is_a_PermissionOwner = this.Relations["UserGroup_is_a_PermissionOwner"];
     312            this.relationR_44 = this.Relations["R_44"];
     313            this.relationR_57 = this.Relations["R_57"];
    259314        }
    260315       
     
    274329            this.tablePermissionOwner = new PermissionOwnerDataTable();
    275330            base.Tables.Add(this.tablePermissionOwner);
     331            this.tableUserGroup = new UserGroupDataTable();
     332            base.Tables.Add(this.tableUserGroup);
     333            this.tablePermissionOwner_UserGroup = new PermissionOwner_UserGroupDataTable();
     334            base.Tables.Add(this.tablePermissionOwner_UserGroup);
    276335            this.relationClient_is_a_Resource = new global::System.Data.DataRelation("Client_is_a_Resource", new global::System.Data.DataColumn[] {
    277336                        this.tableResource.ResourceIdColumn}, new global::System.Data.DataColumn[] {
     
    282341                        this.tableHiveUser.PermissionOwnerIdColumn}, false);
    283342            this.Relations.Add(this.relationUser_is_a_PermissionOwner);
     343            this.relationUserGroup_is_a_PermissionOwner = new global::System.Data.DataRelation("UserGroup_is_a_PermissionOwner", new global::System.Data.DataColumn[] {
     344                        this.tablePermissionOwner.PermissionOwnerIdColumn}, new global::System.Data.DataColumn[] {
     345                        this.tableUserGroup.PermissionOwnerIdColumn}, false);
     346            this.Relations.Add(this.relationUserGroup_is_a_PermissionOwner);
     347            this.relationR_44 = new global::System.Data.DataRelation("R_44", new global::System.Data.DataColumn[] {
     348                        this.tablePermissionOwner.PermissionOwnerIdColumn}, new global::System.Data.DataColumn[] {
     349                        this.tablePermissionOwner_UserGroup.PermissionOwnerIdColumn}, false);
     350            this.Relations.Add(this.relationR_44);
     351            this.relationR_57 = new global::System.Data.DataRelation("R_57", new global::System.Data.DataColumn[] {
     352                        this.tableUserGroup.PermissionOwnerIdColumn}, new global::System.Data.DataColumn[] {
     353                        this.tablePermissionOwner_UserGroup.UserGroupIdColumn}, false);
     354            this.Relations.Add(this.relationR_57);
    284355        }
    285356       
     
    301372        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    302373        private bool ShouldSerializePermissionOwner() {
     374            return false;
     375        }
     376       
     377        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     378        private bool ShouldSerializeUserGroup() {
     379            return false;
     380        }
     381       
     382        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     383        private bool ShouldSerializePermissionOwner_UserGroup() {
    303384            return false;
    304385        }
     
    364445       
    365446        public delegate void PermissionOwnerRowChangeEventHandler(object sender, PermissionOwnerRowChangeEvent e);
     447       
     448        public delegate void UserGroupRowChangeEventHandler(object sender, UserGroupRowChangeEvent e);
     449       
     450        public delegate void PermissionOwner_UserGroupRowChangeEventHandler(object sender, PermissionOwner_UserGroupRowChangeEvent e);
    366451       
    367452        /// <summary>
     
    14461531       
    14471532        /// <summary>
     1533        ///Represents the strongly named DataTable class.
     1534        ///</summary>
     1535        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     1536        [global::System.Serializable()]
     1537        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
     1538        public partial class UserGroupDataTable : global::System.Data.TypedTableBase<UserGroupRow> {
     1539           
     1540            private global::System.Data.DataColumn columnPermissionOwnerId;
     1541           
     1542            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1543            public UserGroupDataTable() {
     1544                this.TableName = "UserGroup";
     1545                this.BeginInit();
     1546                this.InitClass();
     1547                this.EndInit();
     1548            }
     1549           
     1550            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1551            internal UserGroupDataTable(global::System.Data.DataTable table) {
     1552                this.TableName = table.TableName;
     1553                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
     1554                    this.CaseSensitive = table.CaseSensitive;
     1555                }
     1556                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
     1557                    this.Locale = table.Locale;
     1558                }
     1559                if ((table.Namespace != table.DataSet.Namespace)) {
     1560                    this.Namespace = table.Namespace;
     1561                }
     1562                this.Prefix = table.Prefix;
     1563                this.MinimumCapacity = table.MinimumCapacity;
     1564            }
     1565           
     1566            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1567            protected UserGroupDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
     1568                    base(info, context) {
     1569                this.InitVars();
     1570            }
     1571           
     1572            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1573            public global::System.Data.DataColumn PermissionOwnerIdColumn {
     1574                get {
     1575                    return this.columnPermissionOwnerId;
     1576                }
     1577            }
     1578           
     1579            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1580            [global::System.ComponentModel.Browsable(false)]
     1581            public int Count {
     1582                get {
     1583                    return this.Rows.Count;
     1584                }
     1585            }
     1586           
     1587            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1588            public UserGroupRow this[int index] {
     1589                get {
     1590                    return ((UserGroupRow)(this.Rows[index]));
     1591                }
     1592            }
     1593           
     1594            public event UserGroupRowChangeEventHandler UserGroupRowChanging;
     1595           
     1596            public event UserGroupRowChangeEventHandler UserGroupRowChanged;
     1597           
     1598            public event UserGroupRowChangeEventHandler UserGroupRowDeleting;
     1599           
     1600            public event UserGroupRowChangeEventHandler UserGroupRowDeleted;
     1601           
     1602            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1603            public void AddUserGroupRow(UserGroupRow row) {
     1604                this.Rows.Add(row);
     1605            }
     1606           
     1607            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1608            public UserGroupRow AddUserGroupRow(PermissionOwnerRow parentPermissionOwnerRowByUserGroup_is_a_PermissionOwner) {
     1609                UserGroupRow rowUserGroupRow = ((UserGroupRow)(this.NewRow()));
     1610                object[] columnValuesArray = new object[] {
     1611                        null};
     1612                if ((parentPermissionOwnerRowByUserGroup_is_a_PermissionOwner != null)) {
     1613                    columnValuesArray[0] = parentPermissionOwnerRowByUserGroup_is_a_PermissionOwner[0];
     1614                }
     1615                rowUserGroupRow.ItemArray = columnValuesArray;
     1616                this.Rows.Add(rowUserGroupRow);
     1617                return rowUserGroupRow;
     1618            }
     1619           
     1620            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1621            public UserGroupRow FindByPermissionOwnerId(long PermissionOwnerId) {
     1622                return ((UserGroupRow)(this.Rows.Find(new object[] {
     1623                            PermissionOwnerId})));
     1624            }
     1625           
     1626            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1627            public override global::System.Data.DataTable Clone() {
     1628                UserGroupDataTable cln = ((UserGroupDataTable)(base.Clone()));
     1629                cln.InitVars();
     1630                return cln;
     1631            }
     1632           
     1633            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1634            protected override global::System.Data.DataTable CreateInstance() {
     1635                return new UserGroupDataTable();
     1636            }
     1637           
     1638            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1639            internal void InitVars() {
     1640                this.columnPermissionOwnerId = base.Columns["PermissionOwnerId"];
     1641            }
     1642           
     1643            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1644            private void InitClass() {
     1645                this.columnPermissionOwnerId = new global::System.Data.DataColumn("PermissionOwnerId", typeof(long), null, global::System.Data.MappingType.Element);
     1646                base.Columns.Add(this.columnPermissionOwnerId);
     1647                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
     1648                                this.columnPermissionOwnerId}, true));
     1649                this.columnPermissionOwnerId.AllowDBNull = false;
     1650                this.columnPermissionOwnerId.Unique = true;
     1651            }
     1652           
     1653            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1654            public UserGroupRow NewUserGroupRow() {
     1655                return ((UserGroupRow)(this.NewRow()));
     1656            }
     1657           
     1658            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1659            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
     1660                return new UserGroupRow(builder);
     1661            }
     1662           
     1663            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1664            protected override global::System.Type GetRowType() {
     1665                return typeof(UserGroupRow);
     1666            }
     1667           
     1668            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1669            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
     1670                base.OnRowChanged(e);
     1671                if ((this.UserGroupRowChanged != null)) {
     1672                    this.UserGroupRowChanged(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
     1673                }
     1674            }
     1675           
     1676            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1677            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
     1678                base.OnRowChanging(e);
     1679                if ((this.UserGroupRowChanging != null)) {
     1680                    this.UserGroupRowChanging(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
     1681                }
     1682            }
     1683           
     1684            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1685            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
     1686                base.OnRowDeleted(e);
     1687                if ((this.UserGroupRowDeleted != null)) {
     1688                    this.UserGroupRowDeleted(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
     1689                }
     1690            }
     1691           
     1692            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1693            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
     1694                base.OnRowDeleting(e);
     1695                if ((this.UserGroupRowDeleting != null)) {
     1696                    this.UserGroupRowDeleting(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
     1697                }
     1698            }
     1699           
     1700            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1701            public void RemoveUserGroupRow(UserGroupRow row) {
     1702                this.Rows.Remove(row);
     1703            }
     1704           
     1705            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1706            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
     1707                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
     1708                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
     1709                dsHiveServer ds = new dsHiveServer();
     1710                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
     1711                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
     1712                any1.MinOccurs = new decimal(0);
     1713                any1.MaxOccurs = decimal.MaxValue;
     1714                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     1715                sequence.Items.Add(any1);
     1716                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
     1717                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
     1718                any2.MinOccurs = new decimal(1);
     1719                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     1720                sequence.Items.Add(any2);
     1721                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
     1722                attribute1.Name = "namespace";
     1723                attribute1.FixedValue = ds.Namespace;
     1724                type.Attributes.Add(attribute1);
     1725                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
     1726                attribute2.Name = "tableTypeName";
     1727                attribute2.FixedValue = "UserGroupDataTable";
     1728                type.Attributes.Add(attribute2);
     1729                type.Particle = sequence;
     1730                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
     1731                if (xs.Contains(dsSchema.TargetNamespace)) {
     1732                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
     1733                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
     1734                    try {
     1735                        global::System.Xml.Schema.XmlSchema schema = null;
     1736                        dsSchema.Write(s1);
     1737                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
     1738                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
     1739                            s2.SetLength(0);
     1740                            schema.Write(s2);
     1741                            if ((s1.Length == s2.Length)) {
     1742                                s1.Position = 0;
     1743                                s2.Position = 0;
     1744                                for (; ((s1.Position != s1.Length)
     1745                                            && (s1.ReadByte() == s2.ReadByte())); ) {
     1746                                    ;
     1747                                }
     1748                                if ((s1.Position == s1.Length)) {
     1749                                    return type;
     1750                                }
     1751                            }
     1752                        }
     1753                    }
     1754                    finally {
     1755                        if ((s1 != null)) {
     1756                            s1.Close();
     1757                        }
     1758                        if ((s2 != null)) {
     1759                            s2.Close();
     1760                        }
     1761                    }
     1762                }
     1763                xs.Add(dsSchema);
     1764                return type;
     1765            }
     1766        }
     1767       
     1768        /// <summary>
     1769        ///Represents the strongly named DataTable class.
     1770        ///</summary>
     1771        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     1772        [global::System.Serializable()]
     1773        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
     1774        public partial class PermissionOwner_UserGroupDataTable : global::System.Data.TypedTableBase<PermissionOwner_UserGroupRow> {
     1775           
     1776            private global::System.Data.DataColumn columnPermissionOwnerId;
     1777           
     1778            private global::System.Data.DataColumn columnUserGroupId;
     1779           
     1780            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1781            public PermissionOwner_UserGroupDataTable() {
     1782                this.TableName = "PermissionOwner_UserGroup";
     1783                this.BeginInit();
     1784                this.InitClass();
     1785                this.EndInit();
     1786            }
     1787           
     1788            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1789            internal PermissionOwner_UserGroupDataTable(global::System.Data.DataTable table) {
     1790                this.TableName = table.TableName;
     1791                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
     1792                    this.CaseSensitive = table.CaseSensitive;
     1793                }
     1794                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
     1795                    this.Locale = table.Locale;
     1796                }
     1797                if ((table.Namespace != table.DataSet.Namespace)) {
     1798                    this.Namespace = table.Namespace;
     1799                }
     1800                this.Prefix = table.Prefix;
     1801                this.MinimumCapacity = table.MinimumCapacity;
     1802            }
     1803           
     1804            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1805            protected PermissionOwner_UserGroupDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
     1806                    base(info, context) {
     1807                this.InitVars();
     1808            }
     1809           
     1810            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1811            public global::System.Data.DataColumn PermissionOwnerIdColumn {
     1812                get {
     1813                    return this.columnPermissionOwnerId;
     1814                }
     1815            }
     1816           
     1817            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1818            public global::System.Data.DataColumn UserGroupIdColumn {
     1819                get {
     1820                    return this.columnUserGroupId;
     1821                }
     1822            }
     1823           
     1824            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1825            [global::System.ComponentModel.Browsable(false)]
     1826            public int Count {
     1827                get {
     1828                    return this.Rows.Count;
     1829                }
     1830            }
     1831           
     1832            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1833            public PermissionOwner_UserGroupRow this[int index] {
     1834                get {
     1835                    return ((PermissionOwner_UserGroupRow)(this.Rows[index]));
     1836                }
     1837            }
     1838           
     1839            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowChanging;
     1840           
     1841            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowChanged;
     1842           
     1843            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowDeleting;
     1844           
     1845            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowDeleted;
     1846           
     1847            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1848            public void AddPermissionOwner_UserGroupRow(PermissionOwner_UserGroupRow row) {
     1849                this.Rows.Add(row);
     1850            }
     1851           
     1852            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1853            public PermissionOwner_UserGroupRow AddPermissionOwner_UserGroupRow(PermissionOwnerRow parentPermissionOwnerRowByR_44, UserGroupRow parentUserGroupRowByR_57) {
     1854                PermissionOwner_UserGroupRow rowPermissionOwner_UserGroupRow = ((PermissionOwner_UserGroupRow)(this.NewRow()));
     1855                object[] columnValuesArray = new object[] {
     1856                        null,
     1857                        null};
     1858                if ((parentPermissionOwnerRowByR_44 != null)) {
     1859                    columnValuesArray[0] = parentPermissionOwnerRowByR_44[0];
     1860                }
     1861                if ((parentUserGroupRowByR_57 != null)) {
     1862                    columnValuesArray[1] = parentUserGroupRowByR_57[0];
     1863                }
     1864                rowPermissionOwner_UserGroupRow.ItemArray = columnValuesArray;
     1865                this.Rows.Add(rowPermissionOwner_UserGroupRow);
     1866                return rowPermissionOwner_UserGroupRow;
     1867            }
     1868           
     1869            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1870            public PermissionOwner_UserGroupRow FindByPermissionOwnerIdUserGroupId(long PermissionOwnerId, long UserGroupId) {
     1871                return ((PermissionOwner_UserGroupRow)(this.Rows.Find(new object[] {
     1872                            PermissionOwnerId,
     1873                            UserGroupId})));
     1874            }
     1875           
     1876            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1877            public override global::System.Data.DataTable Clone() {
     1878                PermissionOwner_UserGroupDataTable cln = ((PermissionOwner_UserGroupDataTable)(base.Clone()));
     1879                cln.InitVars();
     1880                return cln;
     1881            }
     1882           
     1883            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1884            protected override global::System.Data.DataTable CreateInstance() {
     1885                return new PermissionOwner_UserGroupDataTable();
     1886            }
     1887           
     1888            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1889            internal void InitVars() {
     1890                this.columnPermissionOwnerId = base.Columns["PermissionOwnerId"];
     1891                this.columnUserGroupId = base.Columns["UserGroupId"];
     1892            }
     1893           
     1894            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1895            private void InitClass() {
     1896                this.columnPermissionOwnerId = new global::System.Data.DataColumn("PermissionOwnerId", typeof(long), null, global::System.Data.MappingType.Element);
     1897                base.Columns.Add(this.columnPermissionOwnerId);
     1898                this.columnUserGroupId = new global::System.Data.DataColumn("UserGroupId", typeof(long), null, global::System.Data.MappingType.Element);
     1899                base.Columns.Add(this.columnUserGroupId);
     1900                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
     1901                                this.columnPermissionOwnerId,
     1902                                this.columnUserGroupId}, true));
     1903                this.columnPermissionOwnerId.AllowDBNull = false;
     1904                this.columnUserGroupId.AllowDBNull = false;
     1905            }
     1906           
     1907            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1908            public PermissionOwner_UserGroupRow NewPermissionOwner_UserGroupRow() {
     1909                return ((PermissionOwner_UserGroupRow)(this.NewRow()));
     1910            }
     1911           
     1912            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1913            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
     1914                return new PermissionOwner_UserGroupRow(builder);
     1915            }
     1916           
     1917            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1918            protected override global::System.Type GetRowType() {
     1919                return typeof(PermissionOwner_UserGroupRow);
     1920            }
     1921           
     1922            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1923            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
     1924                base.OnRowChanged(e);
     1925                if ((this.PermissionOwner_UserGroupRowChanged != null)) {
     1926                    this.PermissionOwner_UserGroupRowChanged(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
     1927                }
     1928            }
     1929           
     1930            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1931            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
     1932                base.OnRowChanging(e);
     1933                if ((this.PermissionOwner_UserGroupRowChanging != null)) {
     1934                    this.PermissionOwner_UserGroupRowChanging(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
     1935                }
     1936            }
     1937           
     1938            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1939            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
     1940                base.OnRowDeleted(e);
     1941                if ((this.PermissionOwner_UserGroupRowDeleted != null)) {
     1942                    this.PermissionOwner_UserGroupRowDeleted(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
     1943                }
     1944            }
     1945           
     1946            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1947            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
     1948                base.OnRowDeleting(e);
     1949                if ((this.PermissionOwner_UserGroupRowDeleting != null)) {
     1950                    this.PermissionOwner_UserGroupRowDeleting(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
     1951                }
     1952            }
     1953           
     1954            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1955            public void RemovePermissionOwner_UserGroupRow(PermissionOwner_UserGroupRow row) {
     1956                this.Rows.Remove(row);
     1957            }
     1958           
     1959            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     1960            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
     1961                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
     1962                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
     1963                dsHiveServer ds = new dsHiveServer();
     1964                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
     1965                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
     1966                any1.MinOccurs = new decimal(0);
     1967                any1.MaxOccurs = decimal.MaxValue;
     1968                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     1969                sequence.Items.Add(any1);
     1970                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
     1971                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
     1972                any2.MinOccurs = new decimal(1);
     1973                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     1974                sequence.Items.Add(any2);
     1975                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
     1976                attribute1.Name = "namespace";
     1977                attribute1.FixedValue = ds.Namespace;
     1978                type.Attributes.Add(attribute1);
     1979                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
     1980                attribute2.Name = "tableTypeName";
     1981                attribute2.FixedValue = "PermissionOwner_UserGroupDataTable";
     1982                type.Attributes.Add(attribute2);
     1983                type.Particle = sequence;
     1984                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
     1985                if (xs.Contains(dsSchema.TargetNamespace)) {
     1986                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
     1987                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
     1988                    try {
     1989                        global::System.Xml.Schema.XmlSchema schema = null;
     1990                        dsSchema.Write(s1);
     1991                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
     1992                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
     1993                            s2.SetLength(0);
     1994                            schema.Write(s2);
     1995                            if ((s1.Length == s2.Length)) {
     1996                                s1.Position = 0;
     1997                                s2.Position = 0;
     1998                                for (; ((s1.Position != s1.Length)
     1999                                            && (s1.ReadByte() == s2.ReadByte())); ) {
     2000                                    ;
     2001                                }
     2002                                if ((s1.Position == s1.Length)) {
     2003                                    return type;
     2004                                }
     2005                            }
     2006                        }
     2007                    }
     2008                    finally {
     2009                        if ((s1 != null)) {
     2010                            s1.Close();
     2011                        }
     2012                        if ((s2 != null)) {
     2013                            s2.Close();
     2014                        }
     2015                    }
     2016                }
     2017                xs.Add(dsSchema);
     2018                return type;
     2019            }
     2020        }
     2021       
     2022        /// <summary>
    14482023        ///Represents strongly named DataRow class.
    14492024        ///</summary>
     
    18332408                }
    18342409            }
     2410           
     2411            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2412            public UserGroupRow[] GetUserGroupRows() {
     2413                if ((this.Table.ChildRelations["UserGroup_is_a_PermissionOwner"] == null)) {
     2414                    return new UserGroupRow[0];
     2415                }
     2416                else {
     2417                    return ((UserGroupRow[])(base.GetChildRows(this.Table.ChildRelations["UserGroup_is_a_PermissionOwner"])));
     2418                }
     2419            }
     2420           
     2421            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2422            public PermissionOwner_UserGroupRow[] GetPermissionOwner_UserGroupRows() {
     2423                if ((this.Table.ChildRelations["R_44"] == null)) {
     2424                    return new PermissionOwner_UserGroupRow[0];
     2425                }
     2426                else {
     2427                    return ((PermissionOwner_UserGroupRow[])(base.GetChildRows(this.Table.ChildRelations["R_44"])));
     2428                }
     2429            }
     2430        }
     2431       
     2432        /// <summary>
     2433        ///Represents strongly named DataRow class.
     2434        ///</summary>
     2435        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     2436        public partial class UserGroupRow : global::System.Data.DataRow {
     2437           
     2438            private UserGroupDataTable tableUserGroup;
     2439           
     2440            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2441            internal UserGroupRow(global::System.Data.DataRowBuilder rb) :
     2442                    base(rb) {
     2443                this.tableUserGroup = ((UserGroupDataTable)(this.Table));
     2444            }
     2445           
     2446            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2447            public long PermissionOwnerId {
     2448                get {
     2449                    return ((long)(this[this.tableUserGroup.PermissionOwnerIdColumn]));
     2450                }
     2451                set {
     2452                    this[this.tableUserGroup.PermissionOwnerIdColumn] = value;
     2453                }
     2454            }
     2455           
     2456            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2457            public PermissionOwnerRow PermissionOwnerRow {
     2458                get {
     2459                    return ((PermissionOwnerRow)(this.GetParentRow(this.Table.ParentRelations["UserGroup_is_a_PermissionOwner"])));
     2460                }
     2461                set {
     2462                    this.SetParentRow(value, this.Table.ParentRelations["UserGroup_is_a_PermissionOwner"]);
     2463                }
     2464            }
     2465           
     2466            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2467            public PermissionOwner_UserGroupRow[] GetPermissionOwner_UserGroupRows() {
     2468                if ((this.Table.ChildRelations["R_57"] == null)) {
     2469                    return new PermissionOwner_UserGroupRow[0];
     2470                }
     2471                else {
     2472                    return ((PermissionOwner_UserGroupRow[])(base.GetChildRows(this.Table.ChildRelations["R_57"])));
     2473                }
     2474            }
     2475        }
     2476       
     2477        /// <summary>
     2478        ///Represents strongly named DataRow class.
     2479        ///</summary>
     2480        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     2481        public partial class PermissionOwner_UserGroupRow : global::System.Data.DataRow {
     2482           
     2483            private PermissionOwner_UserGroupDataTable tablePermissionOwner_UserGroup;
     2484           
     2485            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2486            internal PermissionOwner_UserGroupRow(global::System.Data.DataRowBuilder rb) :
     2487                    base(rb) {
     2488                this.tablePermissionOwner_UserGroup = ((PermissionOwner_UserGroupDataTable)(this.Table));
     2489            }
     2490           
     2491            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2492            public long PermissionOwnerId {
     2493                get {
     2494                    return ((long)(this[this.tablePermissionOwner_UserGroup.PermissionOwnerIdColumn]));
     2495                }
     2496                set {
     2497                    this[this.tablePermissionOwner_UserGroup.PermissionOwnerIdColumn] = value;
     2498                }
     2499            }
     2500           
     2501            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2502            public long UserGroupId {
     2503                get {
     2504                    return ((long)(this[this.tablePermissionOwner_UserGroup.UserGroupIdColumn]));
     2505                }
     2506                set {
     2507                    this[this.tablePermissionOwner_UserGroup.UserGroupIdColumn] = value;
     2508                }
     2509            }
     2510           
     2511            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2512            public PermissionOwnerRow PermissionOwnerRow {
     2513                get {
     2514                    return ((PermissionOwnerRow)(this.GetParentRow(this.Table.ParentRelations["R_44"])));
     2515                }
     2516                set {
     2517                    this.SetParentRow(value, this.Table.ParentRelations["R_44"]);
     2518                }
     2519            }
     2520           
     2521            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2522            public UserGroupRow UserGroupRow {
     2523                get {
     2524                    return ((UserGroupRow)(this.GetParentRow(this.Table.ParentRelations["R_57"])));
     2525                }
     2526                set {
     2527                    this.SetParentRow(value, this.Table.ParentRelations["R_57"]);
     2528                }
     2529            }
    18352530        }
    18362531       
     
    19462641            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    19472642            public PermissionOwnerRow Row {
     2643                get {
     2644                    return this.eventRow;
     2645                }
     2646            }
     2647           
     2648            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2649            public global::System.Data.DataRowAction Action {
     2650                get {
     2651                    return this.eventAction;
     2652                }
     2653            }
     2654        }
     2655       
     2656        /// <summary>
     2657        ///Row event argument class
     2658        ///</summary>
     2659        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     2660        public class UserGroupRowChangeEvent : global::System.EventArgs {
     2661           
     2662            private UserGroupRow eventRow;
     2663           
     2664            private global::System.Data.DataRowAction eventAction;
     2665           
     2666            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2667            public UserGroupRowChangeEvent(UserGroupRow row, global::System.Data.DataRowAction action) {
     2668                this.eventRow = row;
     2669                this.eventAction = action;
     2670            }
     2671           
     2672            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2673            public UserGroupRow Row {
     2674                get {
     2675                    return this.eventRow;
     2676                }
     2677            }
     2678           
     2679            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2680            public global::System.Data.DataRowAction Action {
     2681                get {
     2682                    return this.eventAction;
     2683                }
     2684            }
     2685        }
     2686       
     2687        /// <summary>
     2688        ///Row event argument class
     2689        ///</summary>
     2690        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     2691        public class PermissionOwner_UserGroupRowChangeEvent : global::System.EventArgs {
     2692           
     2693            private PermissionOwner_UserGroupRow eventRow;
     2694           
     2695            private global::System.Data.DataRowAction eventAction;
     2696           
     2697            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2698            public PermissionOwner_UserGroupRowChangeEvent(PermissionOwner_UserGroupRow row, global::System.Data.DataRowAction action) {
     2699                this.eventRow = row;
     2700                this.eventAction = action;
     2701            }
     2702           
     2703            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     2704            public PermissionOwner_UserGroupRow Row {
    19482705                get {
    19492706                    return this.eventRow;
     
    35854342   
    35864343    /// <summary>
     4344    ///Represents the connection and commands used to retrieve and save data.
     4345    ///</summary>
     4346    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     4347    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
     4348    [global::System.ComponentModel.ToolboxItem(true)]
     4349    [global::System.ComponentModel.DataObjectAttribute(true)]
     4350    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
     4351        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
     4352    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4353    public partial class UserGroupTableAdapter : global::System.ComponentModel.Component {
     4354       
     4355        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
     4356       
     4357        private global::System.Data.SqlClient.SqlConnection _connection;
     4358       
     4359        private global::System.Data.SqlClient.SqlTransaction _transaction;
     4360       
     4361        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
     4362       
     4363        private bool _clearBeforeFill;
     4364       
     4365        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4366        public UserGroupTableAdapter() {
     4367            this.ClearBeforeFill = true;
     4368        }
     4369       
     4370        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4371        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
     4372            get {
     4373                if ((this._adapter == null)) {
     4374                    this.InitAdapter();
     4375                }
     4376                return this._adapter;
     4377            }
     4378        }
     4379       
     4380        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4381        internal global::System.Data.SqlClient.SqlConnection Connection {
     4382            get {
     4383                if ((this._connection == null)) {
     4384                    this.InitConnection();
     4385                }
     4386                return this._connection;
     4387            }
     4388            set {
     4389                this._connection = value;
     4390                if ((this.Adapter.InsertCommand != null)) {
     4391                    this.Adapter.InsertCommand.Connection = value;
     4392                }
     4393                if ((this.Adapter.DeleteCommand != null)) {
     4394                    this.Adapter.DeleteCommand.Connection = value;
     4395                }
     4396                if ((this.Adapter.UpdateCommand != null)) {
     4397                    this.Adapter.UpdateCommand.Connection = value;
     4398                }
     4399                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
     4400                    if ((this.CommandCollection[i] != null)) {
     4401                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
     4402                    }
     4403                }
     4404            }
     4405        }
     4406       
     4407        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4408        internal global::System.Data.SqlClient.SqlTransaction Transaction {
     4409            get {
     4410                return this._transaction;
     4411            }
     4412            set {
     4413                this._transaction = value;
     4414                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
     4415                    this.CommandCollection[i].Transaction = this._transaction;
     4416                }
     4417                if (((this.Adapter != null)
     4418                            && (this.Adapter.DeleteCommand != null))) {
     4419                    this.Adapter.DeleteCommand.Transaction = this._transaction;
     4420                }
     4421                if (((this.Adapter != null)
     4422                            && (this.Adapter.InsertCommand != null))) {
     4423                    this.Adapter.InsertCommand.Transaction = this._transaction;
     4424                }
     4425                if (((this.Adapter != null)
     4426                            && (this.Adapter.UpdateCommand != null))) {
     4427                    this.Adapter.UpdateCommand.Transaction = this._transaction;
     4428                }
     4429            }
     4430        }
     4431       
     4432        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4433        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
     4434            get {
     4435                if ((this._commandCollection == null)) {
     4436                    this.InitCommandCollection();
     4437                }
     4438                return this._commandCollection;
     4439            }
     4440        }
     4441       
     4442        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4443        public bool ClearBeforeFill {
     4444            get {
     4445                return this._clearBeforeFill;
     4446            }
     4447            set {
     4448                this._clearBeforeFill = value;
     4449            }
     4450        }
     4451       
     4452        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4453        private void InitAdapter() {
     4454            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
     4455            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
     4456            tableMapping.SourceTable = "Table";
     4457            tableMapping.DataSetTable = "UserGroup";
     4458            tableMapping.ColumnMappings.Add("PermissionOwnerId", "PermissionOwnerId");
     4459            this._adapter.TableMappings.Add(tableMapping);
     4460            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
     4461            this._adapter.DeleteCommand.Connection = this.Connection;
     4462            this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[UserGroup] WHERE (([PermissionOwnerId] = @Original_PermissionO" +
     4463                "wnerId))";
     4464            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
     4465            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
     4466            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
     4467            this._adapter.InsertCommand.Connection = this.Connection;
     4468            this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[UserGroup] ([PermissionOwnerId]) VALUES (@PermissionOwnerId);\r" +
     4469                "\nSELECT PermissionOwnerId FROM UserGroup WHERE (PermissionOwnerId = @PermissionO" +
     4470                "wnerId)";
     4471            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
     4472            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4473            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
     4474            this._adapter.UpdateCommand.Connection = this.Connection;
     4475            this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId WHERE (([Pe" +
     4476                "rmissionOwnerId] = @Original_PermissionOwnerId));\r\nSELECT PermissionOwnerId FROM" +
     4477                " UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId)";
     4478            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
     4479            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4480            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
     4481        }
     4482       
     4483        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4484        private void InitConnection() {
     4485            this._connection = new global::System.Data.SqlClient.SqlConnection();
     4486            this._connection.ConnectionString = global::HeuristicLab.Hive.Server.ADODataAccess.Properties.Settings.Default.HiveServerConnectionString;
     4487        }
     4488       
     4489        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4490        private void InitCommandCollection() {
     4491            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
     4492            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
     4493            this._commandCollection[0].Connection = this.Connection;
     4494            this._commandCollection[0].CommandText = "SELECT PermissionOwnerId FROM dbo.UserGroup";
     4495            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
     4496        }
     4497       
     4498        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4499        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4500        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
     4501        public virtual int Fill(dsHiveServer.UserGroupDataTable dataTable) {
     4502            this.Adapter.SelectCommand = this.CommandCollection[0];
     4503            if ((this.ClearBeforeFill == true)) {
     4504                dataTable.Clear();
     4505            }
     4506            int returnValue = this.Adapter.Fill(dataTable);
     4507            return returnValue;
     4508        }
     4509       
     4510        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4511        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4512        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
     4513        public virtual dsHiveServer.UserGroupDataTable GetData() {
     4514            this.Adapter.SelectCommand = this.CommandCollection[0];
     4515            dsHiveServer.UserGroupDataTable dataTable = new dsHiveServer.UserGroupDataTable();
     4516            this.Adapter.Fill(dataTable);
     4517            return dataTable;
     4518        }
     4519       
     4520        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4521        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4522        public virtual int Update(dsHiveServer.UserGroupDataTable dataTable) {
     4523            return this.Adapter.Update(dataTable);
     4524        }
     4525       
     4526        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4527        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4528        public virtual int Update(dsHiveServer dataSet) {
     4529            return this.Adapter.Update(dataSet, "UserGroup");
     4530        }
     4531       
     4532        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4533        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4534        public virtual int Update(global::System.Data.DataRow dataRow) {
     4535            return this.Adapter.Update(new global::System.Data.DataRow[] {
     4536                        dataRow});
     4537        }
     4538       
     4539        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4540        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4541        public virtual int Update(global::System.Data.DataRow[] dataRows) {
     4542            return this.Adapter.Update(dataRows);
     4543        }
     4544       
     4545        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4546        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4547        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
     4548        public virtual int Delete(long Original_PermissionOwnerId) {
     4549            this.Adapter.DeleteCommand.Parameters[0].Value = ((long)(Original_PermissionOwnerId));
     4550            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
     4551            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
     4552                        != global::System.Data.ConnectionState.Open)) {
     4553                this.Adapter.DeleteCommand.Connection.Open();
     4554            }
     4555            try {
     4556                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
     4557                return returnValue;
     4558            }
     4559            finally {
     4560                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
     4561                    this.Adapter.DeleteCommand.Connection.Close();
     4562                }
     4563            }
     4564        }
     4565       
     4566        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4567        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4568        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
     4569        public virtual int Insert(long PermissionOwnerId) {
     4570            this.Adapter.InsertCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
     4571            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
     4572            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
     4573                        != global::System.Data.ConnectionState.Open)) {
     4574                this.Adapter.InsertCommand.Connection.Open();
     4575            }
     4576            try {
     4577                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
     4578                return returnValue;
     4579            }
     4580            finally {
     4581                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
     4582                    this.Adapter.InsertCommand.Connection.Close();
     4583                }
     4584            }
     4585        }
     4586       
     4587        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4588        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4589        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
     4590        public virtual int Update(long PermissionOwnerId, long Original_PermissionOwnerId) {
     4591            this.Adapter.UpdateCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
     4592            this.Adapter.UpdateCommand.Parameters[1].Value = ((long)(Original_PermissionOwnerId));
     4593            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
     4594            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
     4595                        != global::System.Data.ConnectionState.Open)) {
     4596                this.Adapter.UpdateCommand.Connection.Open();
     4597            }
     4598            try {
     4599                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
     4600                return returnValue;
     4601            }
     4602            finally {
     4603                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
     4604                    this.Adapter.UpdateCommand.Connection.Close();
     4605                }
     4606            }
     4607        }
     4608       
     4609        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4610        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4611        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
     4612        public virtual int Update(long Original_PermissionOwnerId) {
     4613            return this.Update(Original_PermissionOwnerId, Original_PermissionOwnerId);
     4614        }
     4615    }
     4616   
     4617    /// <summary>
     4618    ///Represents the connection and commands used to retrieve and save data.
     4619    ///</summary>
     4620    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
     4621    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
     4622    [global::System.ComponentModel.ToolboxItem(true)]
     4623    [global::System.ComponentModel.DataObjectAttribute(true)]
     4624    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
     4625        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
     4626    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4627    public partial class PermissionOwner_UserGroupTableAdapter : global::System.ComponentModel.Component {
     4628       
     4629        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
     4630       
     4631        private global::System.Data.SqlClient.SqlConnection _connection;
     4632       
     4633        private global::System.Data.SqlClient.SqlTransaction _transaction;
     4634       
     4635        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
     4636       
     4637        private bool _clearBeforeFill;
     4638       
     4639        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4640        public PermissionOwner_UserGroupTableAdapter() {
     4641            this.ClearBeforeFill = true;
     4642        }
     4643       
     4644        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4645        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
     4646            get {
     4647                if ((this._adapter == null)) {
     4648                    this.InitAdapter();
     4649                }
     4650                return this._adapter;
     4651            }
     4652        }
     4653       
     4654        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4655        internal global::System.Data.SqlClient.SqlConnection Connection {
     4656            get {
     4657                if ((this._connection == null)) {
     4658                    this.InitConnection();
     4659                }
     4660                return this._connection;
     4661            }
     4662            set {
     4663                this._connection = value;
     4664                if ((this.Adapter.InsertCommand != null)) {
     4665                    this.Adapter.InsertCommand.Connection = value;
     4666                }
     4667                if ((this.Adapter.DeleteCommand != null)) {
     4668                    this.Adapter.DeleteCommand.Connection = value;
     4669                }
     4670                if ((this.Adapter.UpdateCommand != null)) {
     4671                    this.Adapter.UpdateCommand.Connection = value;
     4672                }
     4673                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
     4674                    if ((this.CommandCollection[i] != null)) {
     4675                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
     4676                    }
     4677                }
     4678            }
     4679        }
     4680       
     4681        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4682        internal global::System.Data.SqlClient.SqlTransaction Transaction {
     4683            get {
     4684                return this._transaction;
     4685            }
     4686            set {
     4687                this._transaction = value;
     4688                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
     4689                    this.CommandCollection[i].Transaction = this._transaction;
     4690                }
     4691                if (((this.Adapter != null)
     4692                            && (this.Adapter.DeleteCommand != null))) {
     4693                    this.Adapter.DeleteCommand.Transaction = this._transaction;
     4694                }
     4695                if (((this.Adapter != null)
     4696                            && (this.Adapter.InsertCommand != null))) {
     4697                    this.Adapter.InsertCommand.Transaction = this._transaction;
     4698                }
     4699                if (((this.Adapter != null)
     4700                            && (this.Adapter.UpdateCommand != null))) {
     4701                    this.Adapter.UpdateCommand.Transaction = this._transaction;
     4702                }
     4703            }
     4704        }
     4705       
     4706        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4707        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
     4708            get {
     4709                if ((this._commandCollection == null)) {
     4710                    this.InitCommandCollection();
     4711                }
     4712                return this._commandCollection;
     4713            }
     4714        }
     4715       
     4716        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4717        public bool ClearBeforeFill {
     4718            get {
     4719                return this._clearBeforeFill;
     4720            }
     4721            set {
     4722                this._clearBeforeFill = value;
     4723            }
     4724        }
     4725       
     4726        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4727        private void InitAdapter() {
     4728            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
     4729            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
     4730            tableMapping.SourceTable = "Table";
     4731            tableMapping.DataSetTable = "PermissionOwner_UserGroup";
     4732            tableMapping.ColumnMappings.Add("PermissionOwnerId", "PermissionOwnerId");
     4733            tableMapping.ColumnMappings.Add("UserGroupId", "UserGroupId");
     4734            this._adapter.TableMappings.Add(tableMapping);
     4735            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
     4736            this._adapter.DeleteCommand.Connection = this.Connection;
     4737            this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[PermissionOwner_UserGroup] WHERE (([PermissionOwnerId] = @Orig" +
     4738                "inal_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId))";
     4739            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
     4740            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
     4741            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UserGroupId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserGroupId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
     4742            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
     4743            this._adapter.InsertCommand.Connection = this.Connection;
     4744            this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[PermissionOwner_UserGroup] ([PermissionOwnerId], [UserGroupId]) VALUES (@PermissionOwnerId, @UserGroupId);
     4745SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)";
     4746            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
     4747            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4748            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserGroupId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserGroupId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4749            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
     4750            this._adapter.UpdateCommand.Connection = this.Connection;
     4751            this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[PermissionOwner_UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId, [UserGroupId] = @UserGroupId WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId));
     4752SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)";
     4753            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
     4754            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4755            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserGroupId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserGroupId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4756            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PermissionOwnerId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
     4757            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UserGroupId", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserGroupId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
     4758        }
     4759       
     4760        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4761        private void InitConnection() {
     4762            this._connection = new global::System.Data.SqlClient.SqlConnection();
     4763            this._connection.ConnectionString = global::HeuristicLab.Hive.Server.ADODataAccess.Properties.Settings.Default.HiveServerConnectionString;
     4764        }
     4765       
     4766        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4767        private void InitCommandCollection() {
     4768            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
     4769            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
     4770            this._commandCollection[0].Connection = this.Connection;
     4771            this._commandCollection[0].CommandText = "SELECT PermissionOwnerId, UserGroupId FROM dbo.PermissionOwner_UserGroup";
     4772            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
     4773            this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
     4774            this._commandCollection[1].Connection = this.Connection;
     4775            this._commandCollection[1].CommandText = "SELECT * FROM dbo.PermissionOwner_UserGroup WHERE UserGroupId = @UserGroupId";
     4776            this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
     4777            this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserGroupId", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 0, 0, "UserGroupId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
     4778        }
     4779       
     4780        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4781        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4782        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
     4783        public virtual int Fill(dsHiveServer.PermissionOwner_UserGroupDataTable dataTable) {
     4784            this.Adapter.SelectCommand = this.CommandCollection[0];
     4785            if ((this.ClearBeforeFill == true)) {
     4786                dataTable.Clear();
     4787            }
     4788            int returnValue = this.Adapter.Fill(dataTable);
     4789            return returnValue;
     4790        }
     4791       
     4792        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4793        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4794        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
     4795        public virtual dsHiveServer.PermissionOwner_UserGroupDataTable GetData() {
     4796            this.Adapter.SelectCommand = this.CommandCollection[0];
     4797            dsHiveServer.PermissionOwner_UserGroupDataTable dataTable = new dsHiveServer.PermissionOwner_UserGroupDataTable();
     4798            this.Adapter.Fill(dataTable);
     4799            return dataTable;
     4800        }
     4801       
     4802        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4803        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4804        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
     4805        public virtual int FillByUserGroupId(dsHiveServer.PermissionOwner_UserGroupDataTable dataTable, long UserGroupId) {
     4806            this.Adapter.SelectCommand = this.CommandCollection[1];
     4807            this.Adapter.SelectCommand.Parameters[0].Value = ((long)(UserGroupId));
     4808            if ((this.ClearBeforeFill == true)) {
     4809                dataTable.Clear();
     4810            }
     4811            int returnValue = this.Adapter.Fill(dataTable);
     4812            return returnValue;
     4813        }
     4814       
     4815        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4816        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4817        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
     4818        public virtual dsHiveServer.PermissionOwner_UserGroupDataTable GetDataByUserGroupId(long UserGroupId) {
     4819            this.Adapter.SelectCommand = this.CommandCollection[1];
     4820            this.Adapter.SelectCommand.Parameters[0].Value = ((long)(UserGroupId));
     4821            dsHiveServer.PermissionOwner_UserGroupDataTable dataTable = new dsHiveServer.PermissionOwner_UserGroupDataTable();
     4822            this.Adapter.Fill(dataTable);
     4823            return dataTable;
     4824        }
     4825       
     4826        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4827        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4828        public virtual int Update(dsHiveServer.PermissionOwner_UserGroupDataTable dataTable) {
     4829            return this.Adapter.Update(dataTable);
     4830        }
     4831       
     4832        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4833        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4834        public virtual int Update(dsHiveServer dataSet) {
     4835            return this.Adapter.Update(dataSet, "PermissionOwner_UserGroup");
     4836        }
     4837       
     4838        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4839        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4840        public virtual int Update(global::System.Data.DataRow dataRow) {
     4841            return this.Adapter.Update(new global::System.Data.DataRow[] {
     4842                        dataRow});
     4843        }
     4844       
     4845        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4846        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4847        public virtual int Update(global::System.Data.DataRow[] dataRows) {
     4848            return this.Adapter.Update(dataRows);
     4849        }
     4850       
     4851        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4852        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4853        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
     4854        public virtual int Delete(long Original_PermissionOwnerId, long Original_UserGroupId) {
     4855            this.Adapter.DeleteCommand.Parameters[0].Value = ((long)(Original_PermissionOwnerId));
     4856            this.Adapter.DeleteCommand.Parameters[1].Value = ((long)(Original_UserGroupId));
     4857            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
     4858            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
     4859                        != global::System.Data.ConnectionState.Open)) {
     4860                this.Adapter.DeleteCommand.Connection.Open();
     4861            }
     4862            try {
     4863                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
     4864                return returnValue;
     4865            }
     4866            finally {
     4867                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
     4868                    this.Adapter.DeleteCommand.Connection.Close();
     4869                }
     4870            }
     4871        }
     4872       
     4873        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4874        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4875        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
     4876        public virtual int Insert(long PermissionOwnerId, long UserGroupId) {
     4877            this.Adapter.InsertCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
     4878            this.Adapter.InsertCommand.Parameters[1].Value = ((long)(UserGroupId));
     4879            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
     4880            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
     4881                        != global::System.Data.ConnectionState.Open)) {
     4882                this.Adapter.InsertCommand.Connection.Open();
     4883            }
     4884            try {
     4885                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
     4886                return returnValue;
     4887            }
     4888            finally {
     4889                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
     4890                    this.Adapter.InsertCommand.Connection.Close();
     4891                }
     4892            }
     4893        }
     4894       
     4895        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4896        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4897        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
     4898        public virtual int Update(long PermissionOwnerId, long UserGroupId, long Original_PermissionOwnerId, long Original_UserGroupId) {
     4899            this.Adapter.UpdateCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
     4900            this.Adapter.UpdateCommand.Parameters[1].Value = ((long)(UserGroupId));
     4901            this.Adapter.UpdateCommand.Parameters[2].Value = ((long)(Original_PermissionOwnerId));
     4902            this.Adapter.UpdateCommand.Parameters[3].Value = ((long)(Original_UserGroupId));
     4903            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
     4904            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
     4905                        != global::System.Data.ConnectionState.Open)) {
     4906                this.Adapter.UpdateCommand.Connection.Open();
     4907            }
     4908            try {
     4909                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
     4910                return returnValue;
     4911            }
     4912            finally {
     4913                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
     4914                    this.Adapter.UpdateCommand.Connection.Close();
     4915                }
     4916            }
     4917        }
     4918       
     4919        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     4920        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
     4921        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
     4922        public virtual int Update(long Original_PermissionOwnerId, long Original_UserGroupId) {
     4923            return this.Update(Original_PermissionOwnerId, Original_UserGroupId, Original_PermissionOwnerId, Original_UserGroupId);
     4924        }
     4925    }
     4926   
     4927    /// <summary>
    35874928    ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
    35884929    ///</summary>
     
    36054946        private PermissionOwnerTableAdapter _permissionOwnerTableAdapter;
    36064947       
     4948        private UserGroupTableAdapter _userGroupTableAdapter;
     4949       
     4950        private PermissionOwner_UserGroupTableAdapter _permissionOwner_UserGroupTableAdapter;
     4951       
    36074952        private bool _backupDataSetBeforeUpdate;
    36084953       
     
    36284973            }
    36294974            set {
    3630                 if (((this._resourceTableAdapter != null)
    3631                             && (this.TableAdapterInstanceCount == 1))) {
    3632                     this._resourceTableAdapter = value;
    3633                     return;
    3634                 }
    3635                 if (((value != null)
    3636                             && (this.MatchTableAdapterConnection(value.Connection) == false))) {
    3637                     throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
    3638                             "tring.");
    3639                 }
    36404975                this._resourceTableAdapter = value;
    36414976            }
     
    36514986            }
    36524987            set {
    3653                 if (((this._clientTableAdapter != null)
    3654                             && (this.TableAdapterInstanceCount == 1))) {
    3655                     this._clientTableAdapter = value;
    3656                     return;
    3657                 }
    3658                 if (((value != null)
    3659                             && (this.MatchTableAdapterConnection(value.Connection) == false))) {
    3660                     throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
    3661                             "tring.");
    3662                 }
    36634988                this._clientTableAdapter = value;
    36644989            }
     
    36744999            }
    36755000            set {
    3676                 if (((this._hiveUserTableAdapter != null)
    3677                             && (this.TableAdapterInstanceCount == 1))) {
    3678                     this._hiveUserTableAdapter = value;
    3679                     return;
    3680                 }
    3681                 if (((value != null)
    3682                             && (this.MatchTableAdapterConnection(value.Connection) == false))) {
    3683                     throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
    3684                             "tring.");
    3685                 }
    36865001                this._hiveUserTableAdapter = value;
    36875002            }
     
    36975012            }
    36985013            set {
    3699                 if (((this._permissionOwnerTableAdapter != null)
    3700                             && (this.TableAdapterInstanceCount == 1))) {
    3701                     this._permissionOwnerTableAdapter = value;
    3702                     return;
    3703                 }
    3704                 if (((value != null)
    3705                             && (this.MatchTableAdapterConnection(value.Connection) == false))) {
    3706                     throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
    3707                             "tring.");
    3708                 }
    37095014                this._permissionOwnerTableAdapter = value;
     5015            }
     5016        }
     5017       
     5018        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     5019        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
     5020            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
     5021            "", "System.Drawing.Design.UITypeEditor")]
     5022        public UserGroupTableAdapter UserGroupTableAdapter {
     5023            get {
     5024                return this._userGroupTableAdapter;
     5025            }
     5026            set {
     5027                this._userGroupTableAdapter = value;
     5028            }
     5029        }
     5030       
     5031        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     5032        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
     5033            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
     5034            "", "System.Drawing.Design.UITypeEditor")]
     5035        public PermissionOwner_UserGroupTableAdapter PermissionOwner_UserGroupTableAdapter {
     5036            get {
     5037                return this._permissionOwner_UserGroupTableAdapter;
     5038            }
     5039            set {
     5040                this._permissionOwner_UserGroupTableAdapter = value;
    37105041            }
    37115042        }
     
    37435074                            && (this._permissionOwnerTableAdapter.Connection != null))) {
    37445075                    return this._permissionOwnerTableAdapter.Connection;
     5076                }
     5077                if (((this._userGroupTableAdapter != null)
     5078                            && (this._userGroupTableAdapter.Connection != null))) {
     5079                    return this._userGroupTableAdapter.Connection;
     5080                }
     5081                if (((this._permissionOwner_UserGroupTableAdapter != null)
     5082                            && (this._permissionOwner_UserGroupTableAdapter.Connection != null))) {
     5083                    return this._permissionOwner_UserGroupTableAdapter.Connection;
    37455084                }
    37465085                return null;
     
    37665105                }
    37675106                if ((this._permissionOwnerTableAdapter != null)) {
     5107                    count = (count + 1);
     5108                }
     5109                if ((this._userGroupTableAdapter != null)) {
     5110                    count = (count + 1);
     5111                }
     5112                if ((this._permissionOwner_UserGroupTableAdapter != null)) {
    37685113                    count = (count + 1);
    37695114                }
     
    37875132                }
    37885133            }
     5134            if ((this._userGroupTableAdapter != null)) {
     5135                global::System.Data.DataRow[] updatedRows = dataSet.UserGroup.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
     5136                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
     5137                if (((updatedRows != null)
     5138                            && (0 < updatedRows.Length))) {
     5139                    result = (result + this._userGroupTableAdapter.Update(updatedRows));
     5140                    allChangedRows.AddRange(updatedRows);
     5141                }
     5142            }
    37895143            if ((this._resourceTableAdapter != null)) {
    37905144                global::System.Data.DataRow[] updatedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
     
    37935147                            && (0 < updatedRows.Length))) {
    37945148                    result = (result + this._resourceTableAdapter.Update(updatedRows));
     5149                    allChangedRows.AddRange(updatedRows);
     5150                }
     5151            }
     5152            if ((this._permissionOwner_UserGroupTableAdapter != null)) {
     5153                global::System.Data.DataRow[] updatedRows = dataSet.PermissionOwner_UserGroup.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
     5154                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
     5155                if (((updatedRows != null)
     5156                            && (0 < updatedRows.Length))) {
     5157                    result = (result + this._permissionOwner_UserGroupTableAdapter.Update(updatedRows));
    37955158                    allChangedRows.AddRange(updatedRows);
    37965159                }
     
    38315194                }
    38325195            }
     5196            if ((this._userGroupTableAdapter != null)) {
     5197                global::System.Data.DataRow[] addedRows = dataSet.UserGroup.Select(null, null, global::System.Data.DataViewRowState.Added);
     5198                if (((addedRows != null)
     5199                            && (0 < addedRows.Length))) {
     5200                    result = (result + this._userGroupTableAdapter.Update(addedRows));
     5201                    allAddedRows.AddRange(addedRows);
     5202                }
     5203            }
    38335204            if ((this._resourceTableAdapter != null)) {
    38345205                global::System.Data.DataRow[] addedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.Added);
     
    38365207                            && (0 < addedRows.Length))) {
    38375208                    result = (result + this._resourceTableAdapter.Update(addedRows));
     5209                    allAddedRows.AddRange(addedRows);
     5210                }
     5211            }
     5212            if ((this._permissionOwner_UserGroupTableAdapter != null)) {
     5213                global::System.Data.DataRow[] addedRows = dataSet.PermissionOwner_UserGroup.Select(null, null, global::System.Data.DataViewRowState.Added);
     5214                if (((addedRows != null)
     5215                            && (0 < addedRows.Length))) {
     5216                    result = (result + this._permissionOwner_UserGroupTableAdapter.Update(addedRows));
    38385217                    allAddedRows.AddRange(addedRows);
    38395218                }
     
    38805259                }
    38815260            }
     5261            if ((this._permissionOwner_UserGroupTableAdapter != null)) {
     5262                global::System.Data.DataRow[] deletedRows = dataSet.PermissionOwner_UserGroup.Select(null, null, global::System.Data.DataViewRowState.Deleted);
     5263                if (((deletedRows != null)
     5264                            && (0 < deletedRows.Length))) {
     5265                    result = (result + this._permissionOwner_UserGroupTableAdapter.Update(deletedRows));
     5266                    allChangedRows.AddRange(deletedRows);
     5267                }
     5268            }
    38825269            if ((this._resourceTableAdapter != null)) {
    38835270                global::System.Data.DataRow[] deletedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.Deleted);
     
    38885275                }
    38895276            }
     5277            if ((this._userGroupTableAdapter != null)) {
     5278                global::System.Data.DataRow[] deletedRows = dataSet.UserGroup.Select(null, null, global::System.Data.DataViewRowState.Deleted);
     5279                if (((deletedRows != null)
     5280                            && (0 < deletedRows.Length))) {
     5281                    result = (result + this._userGroupTableAdapter.Update(deletedRows));
     5282                    allChangedRows.AddRange(deletedRows);
     5283                }
     5284            }
    38905285            if ((this._permissionOwnerTableAdapter != null)) {
    38915286                global::System.Data.DataRow[] deletedRows = dataSet.PermissionOwner.Select(null, null, global::System.Data.DataViewRowState.Deleted);
     
    39335328                return 0;
    39345329            }
     5330            if (((this._resourceTableAdapter != null)
     5331                        && (this.MatchTableAdapterConnection(this._resourceTableAdapter.Connection) == false))) {
     5332                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
     5333                        "tring.");
     5334            }
     5335            if (((this._clientTableAdapter != null)
     5336                        && (this.MatchTableAdapterConnection(this._clientTableAdapter.Connection) == false))) {
     5337                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
     5338                        "tring.");
     5339            }
     5340            if (((this._hiveUserTableAdapter != null)
     5341                        && (this.MatchTableAdapterConnection(this._hiveUserTableAdapter.Connection) == false))) {
     5342                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
     5343                        "tring.");
     5344            }
     5345            if (((this._permissionOwnerTableAdapter != null)
     5346                        && (this.MatchTableAdapterConnection(this._permissionOwnerTableAdapter.Connection) == false))) {
     5347                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
     5348                        "tring.");
     5349            }
     5350            if (((this._userGroupTableAdapter != null)
     5351                        && (this.MatchTableAdapterConnection(this._userGroupTableAdapter.Connection) == false))) {
     5352                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
     5353                        "tring.");
     5354            }
     5355            if (((this._permissionOwner_UserGroupTableAdapter != null)
     5356                        && (this.MatchTableAdapterConnection(this._permissionOwner_UserGroupTableAdapter.Connection) == false))) {
     5357                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
     5358                        "tring.");
     5359            }
    39355360            global::System.Data.IDbConnection workConnection = this.Connection;
    39365361            if ((workConnection == null)) {
     
    39395364            }
    39405365            bool workConnOpened = false;
    3941             if (((workConnection.State & global::System.Data.ConnectionState.Closed)
    3942                         == global::System.Data.ConnectionState.Closed)) {
     5366            if (((workConnection.State & global::System.Data.ConnectionState.Broken)
     5367                        == global::System.Data.ConnectionState.Broken)) {
     5368                workConnection.Close();
     5369            }
     5370            if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
    39435371                workConnection.Open();
    39445372                workConnOpened = true;
     
    39965424                        this._permissionOwnerTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
    39975425                        adaptersWithAcceptChangesDuringUpdate.Add(this._permissionOwnerTableAdapter.Adapter);
     5426                    }
     5427                }
     5428                if ((this._userGroupTableAdapter != null)) {
     5429                    revertConnections.Add(this._userGroupTableAdapter, this._userGroupTableAdapter.Connection);
     5430                    this._userGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
     5431                    this._userGroupTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
     5432                    if (this._userGroupTableAdapter.Adapter.AcceptChangesDuringUpdate) {
     5433                        this._userGroupTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
     5434                        adaptersWithAcceptChangesDuringUpdate.Add(this._userGroupTableAdapter.Adapter);
     5435                    }
     5436                }
     5437                if ((this._permissionOwner_UserGroupTableAdapter != null)) {
     5438                    revertConnections.Add(this._permissionOwner_UserGroupTableAdapter, this._permissionOwner_UserGroupTableAdapter.Connection);
     5439                    this._permissionOwner_UserGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
     5440                    this._permissionOwner_UserGroupTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
     5441                    if (this._permissionOwner_UserGroupTableAdapter.Adapter.AcceptChangesDuringUpdate) {
     5442                        this._permissionOwner_UserGroupTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
     5443                        adaptersWithAcceptChangesDuringUpdate.Add(this._permissionOwner_UserGroupTableAdapter.Adapter);
    39985444                    }
    39995445                }
     
    40725518                    this._permissionOwnerTableAdapter.Transaction = null;
    40735519                }
     5520                if ((this._userGroupTableAdapter != null)) {
     5521                    this._userGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._userGroupTableAdapter]));
     5522                    this._userGroupTableAdapter.Transaction = null;
     5523                }
     5524                if ((this._permissionOwner_UserGroupTableAdapter != null)) {
     5525                    this._permissionOwner_UserGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._permissionOwner_UserGroupTableAdapter]));
     5526                    this._permissionOwner_UserGroupTableAdapter.Transaction = null;
     5527                }
    40745528                if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
    40755529                    global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd

    r905 r936  
    305305            </Sources>
    306306          </TableAdapter>
     307          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="UserGroupTableAdapter" GeneratorDataComponentClassName="UserGroupTableAdapter" Name="UserGroup" UserDataComponentName="UserGroupTableAdapter">
     308            <MainSource>
     309              <DbSource ConnectionRef="HiveServerConnectionString (Settings)" DbObjectName="HiveServer.dbo.UserGroup" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
     310                <DeleteCommand>
     311                  <DbCommand CommandType="Text" ModifiedByUser="false">
     312                    <CommandText>DELETE FROM [dbo].[UserGroup] WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId))</CommandText>
     313                    <Parameters>
     314                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Original_PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Original" />
     315                    </Parameters>
     316                  </DbCommand>
     317                </DeleteCommand>
     318                <InsertCommand>
     319                  <DbCommand CommandType="Text" ModifiedByUser="false">
     320                    <CommandText>INSERT INTO [dbo].[UserGroup] ([PermissionOwnerId]) VALUES (@PermissionOwnerId);
     321SELECT PermissionOwnerId FROM UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId)</CommandText>
     322                    <Parameters>
     323                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Current" />
     324                    </Parameters>
     325                  </DbCommand>
     326                </InsertCommand>
     327                <SelectCommand>
     328                  <DbCommand CommandType="Text" ModifiedByUser="false">
     329                    <CommandText>SELECT PermissionOwnerId FROM dbo.UserGroup</CommandText>
     330                    <Parameters />
     331                  </DbCommand>
     332                </SelectCommand>
     333                <UpdateCommand>
     334                  <DbCommand CommandType="Text" ModifiedByUser="false">
     335                    <CommandText>UPDATE [dbo].[UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId));
     336SELECT PermissionOwnerId FROM UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId)</CommandText>
     337                    <Parameters>
     338                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Current" />
     339                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Original_PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Original" />
     340                    </Parameters>
     341                  </DbCommand>
     342                </UpdateCommand>
     343              </DbSource>
     344            </MainSource>
     345            <Mappings>
     346              <Mapping SourceColumn="PermissionOwnerId" DataSetColumn="PermissionOwnerId" />
     347            </Mappings>
     348            <Sources />
     349          </TableAdapter>
     350          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PermissionOwner_UserGroupTableAdapter" GeneratorDataComponentClassName="PermissionOwner_UserGroupTableAdapter" Name="PermissionOwner_UserGroup" UserDataComponentName="PermissionOwner_UserGroupTableAdapter">
     351            <MainSource>
     352              <DbSource ConnectionRef="HiveServerConnectionString (Settings)" DbObjectName="HiveServer.dbo.PermissionOwner_UserGroup" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
     353                <DeleteCommand>
     354                  <DbCommand CommandType="Text" ModifiedByUser="false">
     355                    <CommandText>DELETE FROM [dbo].[PermissionOwner_UserGroup] WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId))</CommandText>
     356                    <Parameters>
     357                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Original_PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Original" />
     358                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Original_UserGroupId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="UserGroupId" SourceColumnNullMapping="false" SourceVersion="Original" />
     359                    </Parameters>
     360                  </DbCommand>
     361                </DeleteCommand>
     362                <InsertCommand>
     363                  <DbCommand CommandType="Text" ModifiedByUser="false">
     364                    <CommandText>INSERT INTO [dbo].[PermissionOwner_UserGroup] ([PermissionOwnerId], [UserGroupId]) VALUES (@PermissionOwnerId, @UserGroupId);
     365SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)</CommandText>
     366                    <Parameters>
     367                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Current" />
     368                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@UserGroupId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="UserGroupId" SourceColumnNullMapping="false" SourceVersion="Current" />
     369                    </Parameters>
     370                  </DbCommand>
     371                </InsertCommand>
     372                <SelectCommand>
     373                  <DbCommand CommandType="Text" ModifiedByUser="false">
     374                    <CommandText>SELECT PermissionOwnerId, UserGroupId FROM dbo.PermissionOwner_UserGroup</CommandText>
     375                    <Parameters />
     376                  </DbCommand>
     377                </SelectCommand>
     378                <UpdateCommand>
     379                  <DbCommand CommandType="Text" ModifiedByUser="false">
     380                    <CommandText>UPDATE [dbo].[PermissionOwner_UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId, [UserGroupId] = @UserGroupId WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId));
     381SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)</CommandText>
     382                    <Parameters>
     383                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Current" />
     384                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@UserGroupId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="UserGroupId" SourceColumnNullMapping="false" SourceVersion="Current" />
     385                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Original_PermissionOwnerId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="PermissionOwnerId" SourceColumnNullMapping="false" SourceVersion="Original" />
     386                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int64" Direction="Input" ParameterName="@Original_UserGroupId" Precision="0" ProviderType="BigInt" Scale="0" Size="0" SourceColumn="UserGroupId" SourceColumnNullMapping="false" SourceVersion="Original" />
     387                    </Parameters>
     388                  </DbCommand>
     389                </UpdateCommand>
     390              </DbSource>
     391            </MainSource>
     392            <Mappings>
     393              <Mapping SourceColumn="PermissionOwnerId" DataSetColumn="PermissionOwnerId" />
     394              <Mapping SourceColumn="UserGroupId" DataSetColumn="UserGroupId" />
     395            </Mappings>
     396            <Sources>
     397              <DbSource ConnectionRef="HiveServerConnectionString (Settings)" DbObjectName="HiveServer.dbo.PermissionOwner_UserGroup" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByUserGroupId" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByUserGroupId" GeneratorSourceName="FillByUserGroupId" GetMethodModifier="Public" GetMethodName="GetDataByUserGroupId" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataByUserGroupId" UserSourceName="FillByUserGroupId">
     398                <SelectCommand>
     399                  <DbCommand CommandType="Text" ModifiedByUser="true">
     400                    <CommandText>SELECT * FROM dbo.PermissionOwner_UserGroup WHERE UserGroupId = @UserGroupId</CommandText>
     401                    <Parameters>
     402                      <Parameter AllowDbNull="false" AutogeneratedName="UserGroupId" ColumnName="UserGroupId" DataSourceName="HiveServer.dbo.PermissionOwner_UserGroup" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@UserGroupId" Precision="0" ProviderType="BigInt" Scale="0" Size="8" SourceColumn="UserGroupId" SourceColumnNullMapping="false" SourceVersion="Current" />
     403                    </Parameters>
     404                  </DbCommand>
     405                </SelectCommand>
     406              </DbSource>
     407            </Sources>
     408          </TableAdapter>
    307409        </Tables>
    308410        <Sources />
     
    316418          <xs:complexType>
    317419            <xs:sequence>
    318               <xs:element name="ResourceId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />
    319               <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
     420              <xs:element name="ResourceId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />
     421              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
    320422                <xs:simpleType>
    321423                  <xs:restriction base="xs:string">
     
    330432          <xs:complexType>
    331433            <xs:sequence>
    332               <xs:element name="ResourceId" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />
    333               <xs:element name="GUID" msdata:DataType="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_UserColumnName="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" type="xs:string" minOccurs="0" />
    334               <xs:element name="CPUSpeed" msprop:Generator_UserColumnName="CPUSpeed" msprop:Generator_ColumnVarNameInTable="columnCPUSpeed" msprop:Generator_ColumnPropNameInRow="CPUSpeed" msprop:Generator_ColumnPropNameInTable="CPUSpeedColumn" type="xs:int" minOccurs="0" />
    335               <xs:element name="Memory" msprop:Generator_UserColumnName="Memory" msprop:Generator_ColumnVarNameInTable="columnMemory" msprop:Generator_ColumnPropNameInRow="Memory" msprop:Generator_ColumnPropNameInTable="MemoryColumn" type="xs:int" minOccurs="0" />
    336               <xs:element name="Login" msprop:Generator_UserColumnName="Login" msprop:Generator_ColumnVarNameInTable="columnLogin" msprop:Generator_ColumnPropNameInRow="Login" msprop:Generator_ColumnPropNameInTable="LoginColumn" type="xs:dateTime" minOccurs="0" />
    337               <xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInRow="Status" msprop:Generator_ColumnPropNameInTable="StatusColumn" minOccurs="0">
     434              <xs:element name="ResourceId" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />
     435              <xs:element name="GUID" msdata:DataType="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_UserColumnName="GUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" type="xs:string" minOccurs="0" />
     436              <xs:element name="CPUSpeed" msprop:Generator_UserColumnName="CPUSpeed" msprop:Generator_ColumnPropNameInRow="CPUSpeed" msprop:Generator_ColumnVarNameInTable="columnCPUSpeed" msprop:Generator_ColumnPropNameInTable="CPUSpeedColumn" type="xs:int" minOccurs="0" />
     437              <xs:element name="Memory" msprop:Generator_UserColumnName="Memory" msprop:Generator_ColumnPropNameInRow="Memory" msprop:Generator_ColumnVarNameInTable="columnMemory" msprop:Generator_ColumnPropNameInTable="MemoryColumn" type="xs:int" minOccurs="0" />
     438              <xs:element name="Login" msprop:Generator_UserColumnName="Login" msprop:Generator_ColumnPropNameInRow="Login" msprop:Generator_ColumnVarNameInTable="columnLogin" msprop:Generator_ColumnPropNameInTable="LoginColumn" type="xs:dateTime" minOccurs="0" />
     439              <xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_ColumnPropNameInRow="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInTable="StatusColumn" minOccurs="0">
    338440                <xs:simpleType>
    339441                  <xs:restriction base="xs:string">
     
    342444                </xs:simpleType>
    343445              </xs:element>
    344               <xs:element name="ClientConfigId" msprop:Generator_UserColumnName="ClientConfigId" msprop:Generator_ColumnVarNameInTable="columnClientConfigId" msprop:Generator_ColumnPropNameInRow="ClientConfigId" msprop:Generator_ColumnPropNameInTable="ClientConfigIdColumn" type="xs:long" minOccurs="0" />
    345               <xs:element name="NumberOfCores" msprop:Generator_UserColumnName="NumberOfCores" msprop:Generator_ColumnVarNameInTable="columnNumberOfCores" msprop:Generator_ColumnPropNameInRow="NumberOfCores" msprop:Generator_ColumnPropNameInTable="NumberOfCoresColumn" type="xs:int" minOccurs="0" />
     446              <xs:element name="ClientConfigId" msprop:Generator_UserColumnName="ClientConfigId" msprop:Generator_ColumnPropNameInRow="ClientConfigId" msprop:Generator_ColumnVarNameInTable="columnClientConfigId" msprop:Generator_ColumnPropNameInTable="ClientConfigIdColumn" type="xs:long" minOccurs="0" />
     447              <xs:element name="NumberOfCores" msprop:Generator_UserColumnName="NumberOfCores" msprop:Generator_ColumnPropNameInRow="NumberOfCores" msprop:Generator_ColumnVarNameInTable="columnNumberOfCores" msprop:Generator_ColumnPropNameInTable="NumberOfCoresColumn" type="xs:int" minOccurs="0" />
    346448            </xs:sequence>
    347449          </xs:complexType>
     
    350452          <xs:complexType>
    351453            <xs:sequence>
    352               <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
    353               <xs:element name="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInRow="Password" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0">
     454              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
     455              <xs:element name="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_ColumnPropNameInRow="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0">
    354456                <xs:simpleType>
    355457                  <xs:restriction base="xs:string">
     
    364466          <xs:complexType>
    365467            <xs:sequence>
    366               <xs:element name="PermissionOwnerId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
    367               <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
     468              <xs:element name="PermissionOwnerId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
     469              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
    368470                <xs:simpleType>
    369471                  <xs:restriction base="xs:string">
     
    372474                </xs:simpleType>
    373475              </xs:element>
     476            </xs:sequence>
     477          </xs:complexType>
     478        </xs:element>
     479        <xs:element name="UserGroup" msprop:Generator_UserTableName="UserGroup" msprop:Generator_RowDeletedName="UserGroupRowDeleted" msprop:Generator_TableClassName="UserGroupDataTable" msprop:Generator_RowChangedName="UserGroupRowChanged" msprop:Generator_RowClassName="UserGroupRow" msprop:Generator_RowChangingName="UserGroupRowChanging" msprop:Generator_RowEvArgName="UserGroupRowChangeEvent" msprop:Generator_RowEvHandlerName="UserGroupRowChangeEventHandler" msprop:Generator_TablePropName="UserGroup" msprop:Generator_TableVarName="tableUserGroup" msprop:Generator_RowDeletingName="UserGroupRowDeleting">
     480          <xs:complexType>
     481            <xs:sequence>
     482              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
     483            </xs:sequence>
     484          </xs:complexType>
     485        </xs:element>
     486        <xs:element name="PermissionOwner_UserGroup" msprop:Generator_UserTableName="PermissionOwner_UserGroup" msprop:Generator_RowDeletedName="PermissionOwner_UserGroupRowDeleted" msprop:Generator_TableClassName="PermissionOwner_UserGroupDataTable" msprop:Generator_RowChangedName="PermissionOwner_UserGroupRowChanged" msprop:Generator_RowClassName="PermissionOwner_UserGroupRow" msprop:Generator_RowChangingName="PermissionOwner_UserGroupRowChanging" msprop:Generator_RowEvArgName="PermissionOwner_UserGroupRowChangeEvent" msprop:Generator_RowEvHandlerName="PermissionOwner_UserGroupRowChangeEventHandler" msprop:Generator_TablePropName="PermissionOwner_UserGroup" msprop:Generator_TableVarName="tablePermissionOwner_UserGroup" msprop:Generator_RowDeletingName="PermissionOwner_UserGroupRowDeleting">
     487          <xs:complexType>
     488            <xs:sequence>
     489              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
     490              <xs:element name="UserGroupId" msprop:Generator_UserColumnName="UserGroupId" msprop:Generator_ColumnPropNameInRow="UserGroupId" msprop:Generator_ColumnVarNameInTable="columnUserGroupId" msprop:Generator_ColumnPropNameInTable="UserGroupIdColumn" type="xs:long" />
    374491            </xs:sequence>
    375492          </xs:complexType>
     
    393510      <xs:field xpath="mstns:PermissionOwnerId" />
    394511    </xs:unique>
     512    <xs:unique name="UserGroup_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
     513      <xs:selector xpath=".//mstns:UserGroup" />
     514      <xs:field xpath="mstns:PermissionOwnerId" />
     515    </xs:unique>
     516    <xs:unique name="PermissionOwner_UserGroup_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
     517      <xs:selector xpath=".//mstns:PermissionOwner_UserGroup" />
     518      <xs:field xpath="mstns:PermissionOwnerId" />
     519      <xs:field xpath="mstns:UserGroupId" />
     520    </xs:unique>
    395521  </xs:element>
    396522  <xs:annotation>
     
    398524      <msdata:Relationship name="Client_is_a_Resource" msdata:parent="Resource" msdata:child="Client" msdata:parentkey="ResourceId" msdata:childkey="ResourceId" msprop:Generator_UserRelationName="Client_is_a_Resource" msprop:Generator_RelationVarName="relationClient_is_a_Resource" msprop:Generator_UserChildTable="Client" msprop:Generator_UserParentTable="Resource" msprop:Generator_ParentPropName="ResourceRow" msprop:Generator_ChildPropName="GetClientRows" />
    399525      <msdata:Relationship name="User_is_a_PermissionOwner" msdata:parent="PermissionOwner" msdata:child="HiveUser" msdata:parentkey="PermissionOwnerId" msdata:childkey="PermissionOwnerId" msprop:Generator_UserRelationName="User_is_a_PermissionOwner" msprop:Generator_RelationVarName="relationUser_is_a_PermissionOwner" msprop:Generator_UserChildTable="HiveUser" msprop:Generator_UserParentTable="PermissionOwner" msprop:Generator_ParentPropName="PermissionOwnerRow" msprop:Generator_ChildPropName="GetHiveUserRows" />
     526      <msdata:Relationship name="UserGroup_is_a_PermissionOwner" msdata:parent="PermissionOwner" msdata:child="UserGroup" msdata:parentkey="PermissionOwnerId" msdata:childkey="PermissionOwnerId" msprop:Generator_UserRelationName="UserGroup_is_a_PermissionOwner" msprop:Generator_RelationVarName="relationUserGroup_is_a_PermissionOwner" msprop:Generator_UserChildTable="UserGroup" msprop:Generator_UserParentTable="PermissionOwner" msprop:Generator_ParentPropName="PermissionOwnerRow" msprop:Generator_ChildPropName="GetUserGroupRows" />
     527      <msdata:Relationship name="R_44" msdata:parent="PermissionOwner" msdata:child="PermissionOwner_UserGroup" msdata:parentkey="PermissionOwnerId" msdata:childkey="PermissionOwnerId" msprop:Generator_UserRelationName="R_44" msprop:Generator_RelationVarName="relationR_44" msprop:Generator_UserChildTable="PermissionOwner_UserGroup" msprop:Generator_UserParentTable="PermissionOwner" msprop:Generator_ParentPropName="PermissionOwnerRow" msprop:Generator_ChildPropName="GetPermissionOwner_UserGroupRows" />
     528      <msdata:Relationship name="R_57" msdata:parent="UserGroup" msdata:child="PermissionOwner_UserGroup" msdata:parentkey="PermissionOwnerId" msdata:childkey="UserGroupId" msprop:Generator_UserRelationName="R_57" msprop:Generator_RelationVarName="relationR_57" msprop:Generator_UserChildTable="PermissionOwner_UserGroup" msprop:Generator_UserParentTable="UserGroup" msprop:Generator_ParentPropName="UserGroupRow" msprop:Generator_ChildPropName="GetPermissionOwner_UserGroupRows" />
    400529    </xs:appinfo>
    401530  </xs:annotation>
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss

    r905 r936  
    55     the code is regenerated.
    66</autogenerated>-->
    7 <DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="3" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
     7<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="5" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
    88  <Shapes>
    9     <Shape ID="DesignTable:Resource" ZOrder="4" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
    10     <Shape ID="DesignTable:Client" ZOrder="3" X="39" Y="137" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" />
    11     <Shape ID="DesignTable:HiveUser" ZOrder="2" X="336" Y="139" Height="139" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
    12     <Shape ID="DesignTable:PermissionOwner" ZOrder="1" X="298" Y="-16" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
     9    <Shape ID="DesignTable:Resource" ZOrder="9" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
     10    <Shape ID="DesignTable:Client" ZOrder="8" X="-89" Y="148" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" />
     11    <Shape ID="DesignTable:HiveUser" ZOrder="5" X="492" Y="150" Height="139" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
     12    <Shape ID="DesignTable:PermissionOwner" ZOrder="7" X="298" Y="-16" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
     13    <Shape ID="DesignTable:UserGroup" ZOrder="6" X="252" Y="405" Height="88" Width="202" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="42" />
     14    <Shape ID="DesignTable:PermissionOwner_UserGroup" ZOrder="4" X="112" Y="182" Height="122" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
    1315  </Shapes>
    1416  <Connectors>
    15     <Connector ID="DesignRelation:Client_is_a_Resource" ZOrder="6" LineWidth="11">
     17    <Connector ID="DesignRelation:Client_is_a_Resource" ZOrder="11" LineWidth="11">
    1618      <RoutePoints>
    1719        <Point>
    18           <X>62</X>
     20          <X>59</X>
    1921          <Y>106</Y>
    2022        </Point>
    2123        <Point>
    22           <X>62</X>
    23           <Y>137</Y>
     24          <X>59</X>
     25          <Y>148</Y>
    2426        </Point>
    2527      </RoutePoints>
    2628    </Connector>
    27     <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="5" LineWidth="11">
     29    <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="10" LineWidth="11">
    2830      <RoutePoints>
    2931        <Point>
    30           <X>438</X>
     32          <X>516</X>
    3133          <Y>106</Y>
    3234        </Point>
    3335        <Point>
    34           <X>438</X>
    35           <Y>139</Y>
     36          <X>516</X>
     37          <Y>150</Y>
     38        </Point>
     39      </RoutePoints>
     40    </Connector>
     41    <Connector ID="DesignRelation:UserGroup_is_a_PermissionOwner" ZOrder="1" LineWidth="11">
     42      <RoutePoints>
     43        <Point>
     44          <X>432</X>
     45          <Y>106</Y>
     46        </Point>
     47        <Point>
     48          <X>432</X>
     49          <Y>405</Y>
     50        </Point>
     51      </RoutePoints>
     52    </Connector>
     53    <Connector ID="DesignRelation:R_44" ZOrder="3" LineWidth="11">
     54      <RoutePoints>
     55        <Point>
     56          <X>346</X>
     57          <Y>106</Y>
     58        </Point>
     59        <Point>
     60          <X>346</X>
     61          <Y>182</Y>
     62        </Point>
     63      </RoutePoints>
     64    </Connector>
     65    <Connector ID="DesignRelation:R_57" ZOrder="2" LineWidth="11">
     66      <RoutePoints>
     67        <Point>
     68          <X>346</X>
     69          <Y>405</Y>
     70        </Point>
     71        <Point>
     72          <X>346</X>
     73          <Y>304</Y>
    3674        </Point>
    3775      </RoutePoints>
  • trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs

    r925 r936  
    102102    }
    103103
     104    private void TestUserGroupAdapter() {
     105      IUserGroupAdapter userGroupAdapter =
     106       ServiceLocator.GetUserGroupAdapter();
     107
     108      User user =
     109        new User();
     110      user.Name = "Stefan";
     111
     112      User user2 =
     113        new User();
     114      user2.Name = "Martin";
     115
     116      UserGroup group =
     117        new UserGroup();
     118
     119      UserGroup subGroup =
     120        new UserGroup();
     121      subGroup.Members.Add(user);
     122
     123      group.Members.Add(user2);
     124      group.Members.Add(subGroup);
     125
     126      userGroupAdapter.UpdateUserGroup(group);
     127
     128      UserGroup read =
     129        userGroupAdapter.GetUserGroupById(group.PermissionOwnerId);
     130
     131      ICollection<UserGroup> userGroups =
     132        userGroupAdapter.GetAllUserGroups();
     133
     134      userGroupAdapter.DeleteUserGroup(subGroup);
     135
     136      userGroups =
     137        userGroupAdapter.GetAllUserGroups();
     138
     139      read =
     140        userGroupAdapter.GetUserGroupById(group.PermissionOwnerId);
     141
     142      userGroupAdapter.DeleteUserGroup(group);
     143
     144      userGroups =
     145        userGroupAdapter.GetAllUserGroups();
     146
     147      IUserAdapter userAdapter =
     148        ServiceLocator.GetUserAdapter();
     149
     150      userAdapter.DeleteUser(user);
     151      userAdapter.DeleteUser(user2);
     152    }
     153
    104154    public override void Run() {
    105155      TestClientAdapter();
    106156      TestUserAdapter();
     157      TestUserGroupAdapter();
    107158
    108159      ITransactionManager transactionManager =
Note: See TracChangeset for help on using the changeset viewer.