Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs	(revision 935)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs	(revision 936)
@@ -133,7 +133,12 @@
       ClientInfo client = new ClientInfo();
 
-      dsHiveServer.ClientRow row =
-        data.Single<dsHiveServer.ClientRow>(
-          r => !r.IsGUIDNull() && r.GUID == clientId);
+      dsHiveServer.ClientRow row = null;
+      IEnumerable<dsHiveServer.ClientRow> clients =
+            from c in
+              data.AsEnumerable<dsHiveServer.ClientRow>()
+            where !c.IsGUIDNull() && c.GUID == clientId
+            select c;
+      if (clients.Count<dsHiveServer.ClientRow>() == 1)
+        row = clients.First<dsHiveServer.ClientRow>();
 
       if (row != null) {
@@ -162,7 +167,12 @@
     public bool DeleteClient(ClientInfo client) {
       if (client != null) {
-        dsHiveServer.ClientRow row =
-          data.Single<dsHiveServer.ClientRow>(
-            r => r.GUID == client.ClientId);
+        dsHiveServer.ClientRow row = null;
+        IEnumerable<dsHiveServer.ClientRow> clients =
+              from c in
+                data.AsEnumerable<dsHiveServer.ClientRow>()
+              where !c.IsGUIDNull() && c.GUID == client.ClientId
+              select c;
+        if (clients.Count<dsHiveServer.ClientRow>() == 1)
+          row = clients.First<dsHiveServer.ClientRow>();
 
         if (row != null) {
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs	(revision 935)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs	(revision 936)
@@ -27,23 +27,243 @@
 using HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess;
 using HeuristicLab.Hive.Contracts.BusinessObjects;
+using System.Runtime.CompilerServices;
 
 namespace HeuristicLab.Hive.Server.ADODataAccess {
-  class UserGroupAdapter: IUserGroupAdapter {
+  class UserGroupAdapter: DataAdapterBase, IUserGroupAdapter {
+    private dsHiveServerTableAdapters.UserGroupTableAdapter adapter =
+        new dsHiveServerTableAdapters.UserGroupTableAdapter();
+
+    private dsHiveServer.UserGroupDataTable data =
+      new dsHiveServer.UserGroupDataTable();
+
+    private dsHiveServerTableAdapters.PermissionOwner_UserGroupTableAdapter permOwnerUserGroupAdapter =
+      new dsHiveServerTableAdapters.PermissionOwner_UserGroupTableAdapter();
+
+    private dsHiveServer.PermissionOwner_UserGroupDataTable permOwnerUserGroupData =
+      new dsHiveServer.PermissionOwner_UserGroupDataTable();
+
+    private IPermissionOwnerAdapter permOwnerAdapter =
+      ServiceLocator.GetPermissionOwnerAdapter();
+
+    private IUserAdapter userAdapter =
+      ServiceLocator.GetUserAdapter();
+
+    public UserGroupAdapter() {
+      adapter.Fill(data);
+      permOwnerUserGroupAdapter.Fill(permOwnerUserGroupData);
+    }
+
+    protected override void Update() {
+      this.adapter.Update(this.data);
+      this.permOwnerUserGroupAdapter.Update(permOwnerUserGroupData);
+    }
+
+    private UserGroup Convert(dsHiveServer.UserGroupRow row,
+      UserGroup userGroup) {
+      if (row != null && userGroup != null) {
+        /*Parent - Permission Owner*/
+        userGroup.PermissionOwnerId = row.PermissionOwnerId;
+        permOwnerAdapter.GetPermissionOwnerById(userGroup);
+
+        //first check for created references
+        IEnumerable<dsHiveServer.PermissionOwner_UserGroupRow> userGroupRows =
+          from permOwner in
+            permOwnerUserGroupData.AsEnumerable<dsHiveServer.PermissionOwner_UserGroupRow>()
+          where permOwner.UserGroupId == userGroup.PermissionOwnerId
+          select permOwner;
+
+        foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
+          userGroupRows) {
+          PermissionOwner permOwner = null;
+          
+          IEnumerable<PermissionOwner> permOwners =
+            from p in
+              userGroup.Members
+            where p.PermissionOwnerId == permOwnerUserGroupRow.PermissionOwnerId
+            select p;
+          if (permOwners.Count<PermissionOwner>() == 1)
+            permOwner = permOwners.First<PermissionOwner>();
+
+          if (permOwner == null) {
+            PermissionOwner permissionOwner = 
+              userAdapter.GetUserById(permOwnerUserGroupRow.PermissionOwnerId);
+
+            if (permissionOwner == null) {
+              //is a user group
+              permissionOwner =
+                GetUserGroupById(permOwnerUserGroupRow.PermissionOwnerId);
+            }
+
+            userGroup.Members.Add(permissionOwner);
+          }
+        }
+
+        //secondly check for deleted references
+        ICollection<PermissionOwner> deleted = 
+          new List<PermissionOwner>();
+
+        foreach (PermissionOwner permOwner in userGroup.Members) {
+          dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow =
+            permOwnerUserGroupData.FindByPermissionOwnerIdUserGroupId(
+              permOwner.PermissionOwnerId,
+              userGroup.PermissionOwnerId);
+
+          if (permOwnerUserGroupRow == null) {
+            deleted.Add(permOwner);
+          }
+        }
+
+        foreach (PermissionOwner permOwner in deleted) {
+          userGroup.Members.Remove(permOwner);
+        }
+
+        return userGroup;
+      } else
+        return null;
+    }
+
+    private dsHiveServer.UserGroupRow Convert(UserGroup userGroup,
+      dsHiveServer.UserGroupRow row) {
+      if (userGroup != null && row != null) {
+        row.PermissionOwnerId = userGroup.PermissionOwnerId;
+      
+        //update references
+        foreach (PermissionOwner permOwner in userGroup.Members) {          
+          //first update the member to make sure it exists in the DB
+          if (permOwner is User) {
+            userAdapter.UpdateUser(permOwner as User);
+          } else if (permOwner is UserGroup) {
+            UpdateUserGroup(permOwner as UserGroup);
+          }
+
+          //secondly check for created references
+          dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow =
+            permOwnerUserGroupData.FindByPermissionOwnerIdUserGroupId(
+              permOwner.PermissionOwnerId,
+              userGroup.PermissionOwnerId);
+
+          if (permOwnerUserGroupRow == null) {
+            permOwnerUserGroupRow = 
+              permOwnerUserGroupData.NewPermissionOwner_UserGroupRow();
+
+            permOwnerUserGroupRow.PermissionOwnerId =
+              permOwner.PermissionOwnerId;
+            permOwnerUserGroupRow.UserGroupId =
+              userGroup.PermissionOwnerId;
+
+            permOwnerUserGroupData.AddPermissionOwner_UserGroupRow(
+              permOwnerUserGroupRow);
+          }
+        }
+
+        //thirdly check for deleted references
+        IEnumerable<dsHiveServer.PermissionOwner_UserGroupRow> userGroupRows = 
+          from permOwner in 
+            permOwnerUserGroupData.AsEnumerable<dsHiveServer.PermissionOwner_UserGroupRow>()
+          where permOwner.UserGroupId == userGroup.PermissionOwnerId  
+          select permOwner;
+
+        ICollection<dsHiveServer.PermissionOwner_UserGroupRow> deleted =
+          new List<dsHiveServer.PermissionOwner_UserGroupRow>();
+
+        foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
+          userGroupRows) {
+          PermissionOwner permOwner = userGroup.Members.Single<PermissionOwner>(
+            p => p.PermissionOwnerId == permOwnerUserGroupRow.PermissionOwnerId);
+
+          if (permOwner == null) {
+            deleted.Add(permOwnerUserGroupRow);
+          }
+        }
+
+        foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
+          deleted) {
+          permOwnerUserGroupData.RemovePermissionOwner_UserGroupRow(
+            permOwnerUserGroupRow);
+        }
+
+      }
+
+      return row;
+    }
+
     #region IUserGroupAdapter Members
-
+    [MethodImpl(MethodImplOptions.Synchronized)]
     public void UpdateUserGroup(UserGroup group) {
-      throw new NotImplementedException();
+      if (group != null) {
+        permOwnerAdapter.UpdatePermissionOwner(group);
+
+        dsHiveServer.UserGroupRow row =
+          data.FindByPermissionOwnerId(group.PermissionOwnerId);
+
+        if (row == null) {
+          row = data.NewUserGroupRow();
+          row.PermissionOwnerId = group.PermissionOwnerId;
+          data.AddUserGroupRow(row);
+        }
+
+        Convert(group, row);
+      }
     }
 
     public UserGroup GetUserGroupById(long userGroupId) {
-      throw new NotImplementedException();
+      UserGroup userGroup = new UserGroup();
+
+      dsHiveServer.UserGroupRow row =
+        data.FindByPermissionOwnerId(userGroupId);
+
+      if (row != null) {
+        Convert(row, userGroup);
+
+        return userGroup;
+      } else {
+        return null;
+      }
     }
 
     public ICollection<UserGroup> GetAllUserGroups() {
-      throw new NotImplementedException();
-    }
-
+      ICollection<UserGroup> allUserGroups =
+        new List<UserGroup>();
+
+      foreach (dsHiveServer.UserGroupRow row in data) {
+        UserGroup userGroup = new UserGroup();
+
+        Convert(row, userGroup);
+        allUserGroups.Add(userGroup);
+      }
+
+      return allUserGroups;
+    }
+
+    [MethodImpl(MethodImplOptions.Synchronized)]
     public bool DeleteUserGroup(UserGroup group) {
-      throw new NotImplementedException();
+      if (group != null) {
+        dsHiveServer.UserGroupRow row =
+          data.FindByPermissionOwnerId(group.PermissionOwnerId);
+
+        if (row != null) {
+          ICollection<dsHiveServer.PermissionOwner_UserGroupRow> deleted =
+            new List<dsHiveServer.PermissionOwner_UserGroupRow>();
+          
+          foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
+            permOwnerUserGroupData) {
+            if (permOwnerUserGroupRow.UserGroupId == group.PermissionOwnerId || 
+                permOwnerUserGroupRow.PermissionOwnerId == group.PermissionOwnerId) {
+              deleted.Add(permOwnerUserGroupRow);
+            }
+          }
+
+          foreach (dsHiveServer.PermissionOwner_UserGroupRow permOwnerUserGroupRow in
+            deleted) {
+            permOwnerUserGroupData.RemovePermissionOwner_UserGroupRow(
+              permOwnerUserGroupRow);
+          }
+          
+          data.RemoveUserGroupRow(row);
+          return permOwnerAdapter.DeletePermissionOwner(group);
+        }
+      }
+
+      return false;
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs	(revision 935)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs	(revision 936)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.1433
+//     Runtime Version:2.0.50727.3053
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -34,7 +34,17 @@
         private PermissionOwnerDataTable tablePermissionOwner;
         
+        private UserGroupDataTable tableUserGroup;
+        
+        private PermissionOwner_UserGroupDataTable tablePermissionOwner_UserGroup;
+        
         private global::System.Data.DataRelation relationClient_is_a_Resource;
         
         private global::System.Data.DataRelation relationUser_is_a_PermissionOwner;
+        
+        private global::System.Data.DataRelation relationUserGroup_is_a_PermissionOwner;
+        
+        private global::System.Data.DataRelation relationR_44;
+        
+        private global::System.Data.DataRelation relationR_57;
         
         private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
@@ -76,4 +86,10 @@
                     base.Tables.Add(new PermissionOwnerDataTable(ds.Tables["PermissionOwner"]));
                 }
+                if ((ds.Tables["UserGroup"] != null)) {
+                    base.Tables.Add(new UserGroupDataTable(ds.Tables["UserGroup"]));
+                }
+                if ((ds.Tables["PermissionOwner_UserGroup"] != null)) {
+                    base.Tables.Add(new PermissionOwner_UserGroupDataTable(ds.Tables["PermissionOwner_UserGroup"]));
+                }
                 this.DataSetName = ds.DataSetName;
                 this.Prefix = ds.Prefix;
@@ -131,4 +147,22 @@
         
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Browsable(false)]
+        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+        public UserGroupDataTable UserGroup {
+            get {
+                return this.tableUserGroup;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Browsable(false)]
+        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+        public PermissionOwner_UserGroupDataTable PermissionOwner_UserGroup {
+            get {
+                return this.tablePermissionOwner_UserGroup;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.ComponentModel.BrowsableAttribute(true)]
         [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
@@ -200,4 +234,10 @@
                 if ((ds.Tables["PermissionOwner"] != null)) {
                     base.Tables.Add(new PermissionOwnerDataTable(ds.Tables["PermissionOwner"]));
+                }
+                if ((ds.Tables["UserGroup"] != null)) {
+                    base.Tables.Add(new UserGroupDataTable(ds.Tables["UserGroup"]));
+                }
+                if ((ds.Tables["PermissionOwner_UserGroup"] != null)) {
+                    base.Tables.Add(new PermissionOwner_UserGroupDataTable(ds.Tables["PermissionOwner_UserGroup"]));
                 }
                 this.DataSetName = ds.DataSetName;
@@ -255,6 +295,21 @@
                 }
             }
+            this.tableUserGroup = ((UserGroupDataTable)(base.Tables["UserGroup"]));
+            if ((initTable == true)) {
+                if ((this.tableUserGroup != null)) {
+                    this.tableUserGroup.InitVars();
+                }
+            }
+            this.tablePermissionOwner_UserGroup = ((PermissionOwner_UserGroupDataTable)(base.Tables["PermissionOwner_UserGroup"]));
+            if ((initTable == true)) {
+                if ((this.tablePermissionOwner_UserGroup != null)) {
+                    this.tablePermissionOwner_UserGroup.InitVars();
+                }
+            }
             this.relationClient_is_a_Resource = this.Relations["Client_is_a_Resource"];
             this.relationUser_is_a_PermissionOwner = this.Relations["User_is_a_PermissionOwner"];
+            this.relationUserGroup_is_a_PermissionOwner = this.Relations["UserGroup_is_a_PermissionOwner"];
+            this.relationR_44 = this.Relations["R_44"];
+            this.relationR_57 = this.Relations["R_57"];
         }
         
@@ -274,4 +329,8 @@
             this.tablePermissionOwner = new PermissionOwnerDataTable();
             base.Tables.Add(this.tablePermissionOwner);
+            this.tableUserGroup = new UserGroupDataTable();
+            base.Tables.Add(this.tableUserGroup);
+            this.tablePermissionOwner_UserGroup = new PermissionOwner_UserGroupDataTable();
+            base.Tables.Add(this.tablePermissionOwner_UserGroup);
             this.relationClient_is_a_Resource = new global::System.Data.DataRelation("Client_is_a_Resource", new global::System.Data.DataColumn[] {
                         this.tableResource.ResourceIdColumn}, new global::System.Data.DataColumn[] {
@@ -282,4 +341,16 @@
                         this.tableHiveUser.PermissionOwnerIdColumn}, false);
             this.Relations.Add(this.relationUser_is_a_PermissionOwner);
+            this.relationUserGroup_is_a_PermissionOwner = new global::System.Data.DataRelation("UserGroup_is_a_PermissionOwner", new global::System.Data.DataColumn[] {
+                        this.tablePermissionOwner.PermissionOwnerIdColumn}, new global::System.Data.DataColumn[] {
+                        this.tableUserGroup.PermissionOwnerIdColumn}, false);
+            this.Relations.Add(this.relationUserGroup_is_a_PermissionOwner);
+            this.relationR_44 = new global::System.Data.DataRelation("R_44", new global::System.Data.DataColumn[] {
+                        this.tablePermissionOwner.PermissionOwnerIdColumn}, new global::System.Data.DataColumn[] {
+                        this.tablePermissionOwner_UserGroup.PermissionOwnerIdColumn}, false);
+            this.Relations.Add(this.relationR_44);
+            this.relationR_57 = new global::System.Data.DataRelation("R_57", new global::System.Data.DataColumn[] {
+                        this.tableUserGroup.PermissionOwnerIdColumn}, new global::System.Data.DataColumn[] {
+                        this.tablePermissionOwner_UserGroup.UserGroupIdColumn}, false);
+            this.Relations.Add(this.relationR_57);
         }
         
@@ -301,4 +372,14 @@
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         private bool ShouldSerializePermissionOwner() {
+            return false;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private bool ShouldSerializeUserGroup() {
+            return false;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private bool ShouldSerializePermissionOwner_UserGroup() {
             return false;
         }
@@ -364,4 +445,8 @@
         
         public delegate void PermissionOwnerRowChangeEventHandler(object sender, PermissionOwnerRowChangeEvent e);
+        
+        public delegate void UserGroupRowChangeEventHandler(object sender, UserGroupRowChangeEvent e);
+        
+        public delegate void PermissionOwner_UserGroupRowChangeEventHandler(object sender, PermissionOwner_UserGroupRowChangeEvent e);
         
         /// <summary>
@@ -1446,4 +1531,494 @@
         
         /// <summary>
+        ///Represents the strongly named DataTable class.
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+        [global::System.Serializable()]
+        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+        public partial class UserGroupDataTable : global::System.Data.TypedTableBase<UserGroupRow> {
+            
+            private global::System.Data.DataColumn columnPermissionOwnerId;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupDataTable() {
+                this.TableName = "UserGroup";
+                this.BeginInit();
+                this.InitClass();
+                this.EndInit();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            internal UserGroupDataTable(global::System.Data.DataTable table) {
+                this.TableName = table.TableName;
+                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+                    this.CaseSensitive = table.CaseSensitive;
+                }
+                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+                    this.Locale = table.Locale;
+                }
+                if ((table.Namespace != table.DataSet.Namespace)) {
+                    this.Namespace = table.Namespace;
+                }
+                this.Prefix = table.Prefix;
+                this.MinimumCapacity = table.MinimumCapacity;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected UserGroupDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : 
+                    base(info, context) {
+                this.InitVars();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public global::System.Data.DataColumn PermissionOwnerIdColumn {
+                get {
+                    return this.columnPermissionOwnerId;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.ComponentModel.Browsable(false)]
+            public int Count {
+                get {
+                    return this.Rows.Count;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow this[int index] {
+                get {
+                    return ((UserGroupRow)(this.Rows[index]));
+                }
+            }
+            
+            public event UserGroupRowChangeEventHandler UserGroupRowChanging;
+            
+            public event UserGroupRowChangeEventHandler UserGroupRowChanged;
+            
+            public event UserGroupRowChangeEventHandler UserGroupRowDeleting;
+            
+            public event UserGroupRowChangeEventHandler UserGroupRowDeleted;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public void AddUserGroupRow(UserGroupRow row) {
+                this.Rows.Add(row);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow AddUserGroupRow(PermissionOwnerRow parentPermissionOwnerRowByUserGroup_is_a_PermissionOwner) {
+                UserGroupRow rowUserGroupRow = ((UserGroupRow)(this.NewRow()));
+                object[] columnValuesArray = new object[] {
+                        null};
+                if ((parentPermissionOwnerRowByUserGroup_is_a_PermissionOwner != null)) {
+                    columnValuesArray[0] = parentPermissionOwnerRowByUserGroup_is_a_PermissionOwner[0];
+                }
+                rowUserGroupRow.ItemArray = columnValuesArray;
+                this.Rows.Add(rowUserGroupRow);
+                return rowUserGroupRow;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow FindByPermissionOwnerId(long PermissionOwnerId) {
+                return ((UserGroupRow)(this.Rows.Find(new object[] {
+                            PermissionOwnerId})));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public override global::System.Data.DataTable Clone() {
+                UserGroupDataTable cln = ((UserGroupDataTable)(base.Clone()));
+                cln.InitVars();
+                return cln;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override global::System.Data.DataTable CreateInstance() {
+                return new UserGroupDataTable();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            internal void InitVars() {
+                this.columnPermissionOwnerId = base.Columns["PermissionOwnerId"];
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            private void InitClass() {
+                this.columnPermissionOwnerId = new global::System.Data.DataColumn("PermissionOwnerId", typeof(long), null, global::System.Data.MappingType.Element);
+                base.Columns.Add(this.columnPermissionOwnerId);
+                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
+                                this.columnPermissionOwnerId}, true));
+                this.columnPermissionOwnerId.AllowDBNull = false;
+                this.columnPermissionOwnerId.Unique = true;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow NewUserGroupRow() {
+                return ((UserGroupRow)(this.NewRow()));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+                return new UserGroupRow(builder);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override global::System.Type GetRowType() {
+                return typeof(UserGroupRow);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowChanged(e);
+                if ((this.UserGroupRowChanged != null)) {
+                    this.UserGroupRowChanged(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowChanging(e);
+                if ((this.UserGroupRowChanging != null)) {
+                    this.UserGroupRowChanging(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowDeleted(e);
+                if ((this.UserGroupRowDeleted != null)) {
+                    this.UserGroupRowDeleted(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowDeleting(e);
+                if ((this.UserGroupRowDeleting != null)) {
+                    this.UserGroupRowDeleting(this, new UserGroupRowChangeEvent(((UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public void RemoveUserGroupRow(UserGroupRow row) {
+                this.Rows.Remove(row);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
+                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
+                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
+                dsHiveServer ds = new dsHiveServer();
+                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
+                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
+                any1.MinOccurs = new decimal(0);
+                any1.MaxOccurs = decimal.MaxValue;
+                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+                sequence.Items.Add(any1);
+                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
+                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
+                any2.MinOccurs = new decimal(1);
+                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+                sequence.Items.Add(any2);
+                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
+                attribute1.Name = "namespace";
+                attribute1.FixedValue = ds.Namespace;
+                type.Attributes.Add(attribute1);
+                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
+                attribute2.Name = "tableTypeName";
+                attribute2.FixedValue = "UserGroupDataTable";
+                type.Attributes.Add(attribute2);
+                type.Particle = sequence;
+                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
+                if (xs.Contains(dsSchema.TargetNamespace)) {
+                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
+                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
+                    try {
+                        global::System.Xml.Schema.XmlSchema schema = null;
+                        dsSchema.Write(s1);
+                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
+                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
+                            s2.SetLength(0);
+                            schema.Write(s2);
+                            if ((s1.Length == s2.Length)) {
+                                s1.Position = 0;
+                                s2.Position = 0;
+                                for (; ((s1.Position != s1.Length) 
+                                            && (s1.ReadByte() == s2.ReadByte())); ) {
+                                    ;
+                                }
+                                if ((s1.Position == s1.Length)) {
+                                    return type;
+                                }
+                            }
+                        }
+                    }
+                    finally {
+                        if ((s1 != null)) {
+                            s1.Close();
+                        }
+                        if ((s2 != null)) {
+                            s2.Close();
+                        }
+                    }
+                }
+                xs.Add(dsSchema);
+                return type;
+            }
+        }
+        
+        /// <summary>
+        ///Represents the strongly named DataTable class.
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+        [global::System.Serializable()]
+        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+        public partial class PermissionOwner_UserGroupDataTable : global::System.Data.TypedTableBase<PermissionOwner_UserGroupRow> {
+            
+            private global::System.Data.DataColumn columnPermissionOwnerId;
+            
+            private global::System.Data.DataColumn columnUserGroupId;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupDataTable() {
+                this.TableName = "PermissionOwner_UserGroup";
+                this.BeginInit();
+                this.InitClass();
+                this.EndInit();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            internal PermissionOwner_UserGroupDataTable(global::System.Data.DataTable table) {
+                this.TableName = table.TableName;
+                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+                    this.CaseSensitive = table.CaseSensitive;
+                }
+                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+                    this.Locale = table.Locale;
+                }
+                if ((table.Namespace != table.DataSet.Namespace)) {
+                    this.Namespace = table.Namespace;
+                }
+                this.Prefix = table.Prefix;
+                this.MinimumCapacity = table.MinimumCapacity;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected PermissionOwner_UserGroupDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : 
+                    base(info, context) {
+                this.InitVars();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public global::System.Data.DataColumn PermissionOwnerIdColumn {
+                get {
+                    return this.columnPermissionOwnerId;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public global::System.Data.DataColumn UserGroupIdColumn {
+                get {
+                    return this.columnUserGroupId;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.ComponentModel.Browsable(false)]
+            public int Count {
+                get {
+                    return this.Rows.Count;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow this[int index] {
+                get {
+                    return ((PermissionOwner_UserGroupRow)(this.Rows[index]));
+                }
+            }
+            
+            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowChanging;
+            
+            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowChanged;
+            
+            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowDeleting;
+            
+            public event PermissionOwner_UserGroupRowChangeEventHandler PermissionOwner_UserGroupRowDeleted;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public void AddPermissionOwner_UserGroupRow(PermissionOwner_UserGroupRow row) {
+                this.Rows.Add(row);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow AddPermissionOwner_UserGroupRow(PermissionOwnerRow parentPermissionOwnerRowByR_44, UserGroupRow parentUserGroupRowByR_57) {
+                PermissionOwner_UserGroupRow rowPermissionOwner_UserGroupRow = ((PermissionOwner_UserGroupRow)(this.NewRow()));
+                object[] columnValuesArray = new object[] {
+                        null,
+                        null};
+                if ((parentPermissionOwnerRowByR_44 != null)) {
+                    columnValuesArray[0] = parentPermissionOwnerRowByR_44[0];
+                }
+                if ((parentUserGroupRowByR_57 != null)) {
+                    columnValuesArray[1] = parentUserGroupRowByR_57[0];
+                }
+                rowPermissionOwner_UserGroupRow.ItemArray = columnValuesArray;
+                this.Rows.Add(rowPermissionOwner_UserGroupRow);
+                return rowPermissionOwner_UserGroupRow;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow FindByPermissionOwnerIdUserGroupId(long PermissionOwnerId, long UserGroupId) {
+                return ((PermissionOwner_UserGroupRow)(this.Rows.Find(new object[] {
+                            PermissionOwnerId,
+                            UserGroupId})));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public override global::System.Data.DataTable Clone() {
+                PermissionOwner_UserGroupDataTable cln = ((PermissionOwner_UserGroupDataTable)(base.Clone()));
+                cln.InitVars();
+                return cln;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override global::System.Data.DataTable CreateInstance() {
+                return new PermissionOwner_UserGroupDataTable();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            internal void InitVars() {
+                this.columnPermissionOwnerId = base.Columns["PermissionOwnerId"];
+                this.columnUserGroupId = base.Columns["UserGroupId"];
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            private void InitClass() {
+                this.columnPermissionOwnerId = new global::System.Data.DataColumn("PermissionOwnerId", typeof(long), null, global::System.Data.MappingType.Element);
+                base.Columns.Add(this.columnPermissionOwnerId);
+                this.columnUserGroupId = new global::System.Data.DataColumn("UserGroupId", typeof(long), null, global::System.Data.MappingType.Element);
+                base.Columns.Add(this.columnUserGroupId);
+                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
+                                this.columnPermissionOwnerId,
+                                this.columnUserGroupId}, true));
+                this.columnPermissionOwnerId.AllowDBNull = false;
+                this.columnUserGroupId.AllowDBNull = false;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow NewPermissionOwner_UserGroupRow() {
+                return ((PermissionOwner_UserGroupRow)(this.NewRow()));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+                return new PermissionOwner_UserGroupRow(builder);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override global::System.Type GetRowType() {
+                return typeof(PermissionOwner_UserGroupRow);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowChanged(e);
+                if ((this.PermissionOwner_UserGroupRowChanged != null)) {
+                    this.PermissionOwner_UserGroupRowChanged(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowChanging(e);
+                if ((this.PermissionOwner_UserGroupRowChanging != null)) {
+                    this.PermissionOwner_UserGroupRowChanging(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowDeleted(e);
+                if ((this.PermissionOwner_UserGroupRowDeleted != null)) {
+                    this.PermissionOwner_UserGroupRowDeleted(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowDeleting(e);
+                if ((this.PermissionOwner_UserGroupRowDeleting != null)) {
+                    this.PermissionOwner_UserGroupRowDeleting(this, new PermissionOwner_UserGroupRowChangeEvent(((PermissionOwner_UserGroupRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public void RemovePermissionOwner_UserGroupRow(PermissionOwner_UserGroupRow row) {
+                this.Rows.Remove(row);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
+                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
+                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
+                dsHiveServer ds = new dsHiveServer();
+                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
+                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
+                any1.MinOccurs = new decimal(0);
+                any1.MaxOccurs = decimal.MaxValue;
+                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+                sequence.Items.Add(any1);
+                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
+                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
+                any2.MinOccurs = new decimal(1);
+                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+                sequence.Items.Add(any2);
+                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
+                attribute1.Name = "namespace";
+                attribute1.FixedValue = ds.Namespace;
+                type.Attributes.Add(attribute1);
+                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
+                attribute2.Name = "tableTypeName";
+                attribute2.FixedValue = "PermissionOwner_UserGroupDataTable";
+                type.Attributes.Add(attribute2);
+                type.Particle = sequence;
+                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
+                if (xs.Contains(dsSchema.TargetNamespace)) {
+                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
+                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
+                    try {
+                        global::System.Xml.Schema.XmlSchema schema = null;
+                        dsSchema.Write(s1);
+                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
+                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
+                            s2.SetLength(0);
+                            schema.Write(s2);
+                            if ((s1.Length == s2.Length)) {
+                                s1.Position = 0;
+                                s2.Position = 0;
+                                for (; ((s1.Position != s1.Length) 
+                                            && (s1.ReadByte() == s2.ReadByte())); ) {
+                                    ;
+                                }
+                                if ((s1.Position == s1.Length)) {
+                                    return type;
+                                }
+                            }
+                        }
+                    }
+                    finally {
+                        if ((s1 != null)) {
+                            s1.Close();
+                        }
+                        if ((s2 != null)) {
+                            s2.Close();
+                        }
+                    }
+                }
+                xs.Add(dsSchema);
+                return type;
+            }
+        }
+        
+        /// <summary>
         ///Represents strongly named DataRow class.
         ///</summary>
@@ -1833,4 +2408,124 @@
                 }
             }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow[] GetUserGroupRows() {
+                if ((this.Table.ChildRelations["UserGroup_is_a_PermissionOwner"] == null)) {
+                    return new UserGroupRow[0];
+                }
+                else {
+                    return ((UserGroupRow[])(base.GetChildRows(this.Table.ChildRelations["UserGroup_is_a_PermissionOwner"])));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow[] GetPermissionOwner_UserGroupRows() {
+                if ((this.Table.ChildRelations["R_44"] == null)) {
+                    return new PermissionOwner_UserGroupRow[0];
+                }
+                else {
+                    return ((PermissionOwner_UserGroupRow[])(base.GetChildRows(this.Table.ChildRelations["R_44"])));
+                }
+            }
+        }
+        
+        /// <summary>
+        ///Represents strongly named DataRow class.
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+        public partial class UserGroupRow : global::System.Data.DataRow {
+            
+            private UserGroupDataTable tableUserGroup;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            internal UserGroupRow(global::System.Data.DataRowBuilder rb) : 
+                    base(rb) {
+                this.tableUserGroup = ((UserGroupDataTable)(this.Table));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public long PermissionOwnerId {
+                get {
+                    return ((long)(this[this.tableUserGroup.PermissionOwnerIdColumn]));
+                }
+                set {
+                    this[this.tableUserGroup.PermissionOwnerIdColumn] = value;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwnerRow PermissionOwnerRow {
+                get {
+                    return ((PermissionOwnerRow)(this.GetParentRow(this.Table.ParentRelations["UserGroup_is_a_PermissionOwner"])));
+                }
+                set {
+                    this.SetParentRow(value, this.Table.ParentRelations["UserGroup_is_a_PermissionOwner"]);
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow[] GetPermissionOwner_UserGroupRows() {
+                if ((this.Table.ChildRelations["R_57"] == null)) {
+                    return new PermissionOwner_UserGroupRow[0];
+                }
+                else {
+                    return ((PermissionOwner_UserGroupRow[])(base.GetChildRows(this.Table.ChildRelations["R_57"])));
+                }
+            }
+        }
+        
+        /// <summary>
+        ///Represents strongly named DataRow class.
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+        public partial class PermissionOwner_UserGroupRow : global::System.Data.DataRow {
+            
+            private PermissionOwner_UserGroupDataTable tablePermissionOwner_UserGroup;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            internal PermissionOwner_UserGroupRow(global::System.Data.DataRowBuilder rb) : 
+                    base(rb) {
+                this.tablePermissionOwner_UserGroup = ((PermissionOwner_UserGroupDataTable)(this.Table));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public long PermissionOwnerId {
+                get {
+                    return ((long)(this[this.tablePermissionOwner_UserGroup.PermissionOwnerIdColumn]));
+                }
+                set {
+                    this[this.tablePermissionOwner_UserGroup.PermissionOwnerIdColumn] = value;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public long UserGroupId {
+                get {
+                    return ((long)(this[this.tablePermissionOwner_UserGroup.UserGroupIdColumn]));
+                }
+                set {
+                    this[this.tablePermissionOwner_UserGroup.UserGroupIdColumn] = value;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwnerRow PermissionOwnerRow {
+                get {
+                    return ((PermissionOwnerRow)(this.GetParentRow(this.Table.ParentRelations["R_44"])));
+                }
+                set {
+                    this.SetParentRow(value, this.Table.ParentRelations["R_44"]);
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow UserGroupRow {
+                get {
+                    return ((UserGroupRow)(this.GetParentRow(this.Table.ParentRelations["R_57"])));
+                }
+                set {
+                    this.SetParentRow(value, this.Table.ParentRelations["R_57"]);
+                }
+            }
         }
         
@@ -1946,4 +2641,66 @@
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
             public PermissionOwnerRow Row {
+                get {
+                    return this.eventRow;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public global::System.Data.DataRowAction Action {
+                get {
+                    return this.eventAction;
+                }
+            }
+        }
+        
+        /// <summary>
+        ///Row event argument class
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+        public class UserGroupRowChangeEvent : global::System.EventArgs {
+            
+            private UserGroupRow eventRow;
+            
+            private global::System.Data.DataRowAction eventAction;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRowChangeEvent(UserGroupRow row, global::System.Data.DataRowAction action) {
+                this.eventRow = row;
+                this.eventAction = action;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public UserGroupRow Row {
+                get {
+                    return this.eventRow;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public global::System.Data.DataRowAction Action {
+                get {
+                    return this.eventAction;
+                }
+            }
+        }
+        
+        /// <summary>
+        ///Row event argument class
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+        public class PermissionOwner_UserGroupRowChangeEvent : global::System.EventArgs {
+            
+            private PermissionOwner_UserGroupRow eventRow;
+            
+            private global::System.Data.DataRowAction eventAction;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRowChangeEvent(PermissionOwner_UserGroupRow row, global::System.Data.DataRowAction action) {
+                this.eventRow = row;
+                this.eventAction = action;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            public PermissionOwner_UserGroupRow Row {
                 get {
                     return this.eventRow;
@@ -3585,4 +4342,588 @@
     
     /// <summary>
+    ///Represents the connection and commands used to retrieve and save data.
+    ///</summary>
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+    [global::System.ComponentModel.ToolboxItem(true)]
+    [global::System.ComponentModel.DataObjectAttribute(true)]
+    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
+        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+    public partial class UserGroupTableAdapter : global::System.ComponentModel.Component {
+        
+        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
+        
+        private global::System.Data.SqlClient.SqlConnection _connection;
+        
+        private global::System.Data.SqlClient.SqlTransaction _transaction;
+        
+        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
+        
+        private bool _clearBeforeFill;
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public UserGroupTableAdapter() {
+            this.ClearBeforeFill = true;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
+            get {
+                if ((this._adapter == null)) {
+                    this.InitAdapter();
+                }
+                return this._adapter;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        internal global::System.Data.SqlClient.SqlConnection Connection {
+            get {
+                if ((this._connection == null)) {
+                    this.InitConnection();
+                }
+                return this._connection;
+            }
+            set {
+                this._connection = value;
+                if ((this.Adapter.InsertCommand != null)) {
+                    this.Adapter.InsertCommand.Connection = value;
+                }
+                if ((this.Adapter.DeleteCommand != null)) {
+                    this.Adapter.DeleteCommand.Connection = value;
+                }
+                if ((this.Adapter.UpdateCommand != null)) {
+                    this.Adapter.UpdateCommand.Connection = value;
+                }
+                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+                    if ((this.CommandCollection[i] != null)) {
+                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
+                    }
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        internal global::System.Data.SqlClient.SqlTransaction Transaction {
+            get {
+                return this._transaction;
+            }
+            set {
+                this._transaction = value;
+                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+                    this.CommandCollection[i].Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.DeleteCommand != null))) {
+                    this.Adapter.DeleteCommand.Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.InsertCommand != null))) {
+                    this.Adapter.InsertCommand.Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.UpdateCommand != null))) {
+                    this.Adapter.UpdateCommand.Transaction = this._transaction;
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
+            get {
+                if ((this._commandCollection == null)) {
+                    this.InitCommandCollection();
+                }
+                return this._commandCollection;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public bool ClearBeforeFill {
+            get {
+                return this._clearBeforeFill;
+            }
+            set {
+                this._clearBeforeFill = value;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private void InitAdapter() {
+            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
+            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
+            tableMapping.SourceTable = "Table";
+            tableMapping.DataSetTable = "UserGroup";
+            tableMapping.ColumnMappings.Add("PermissionOwnerId", "PermissionOwnerId");
+            this._adapter.TableMappings.Add(tableMapping);
+            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
+            this._adapter.DeleteCommand.Connection = this.Connection;
+            this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[UserGroup] WHERE (([PermissionOwnerId] = @Original_PermissionO" +
+                "wnerId))";
+            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
+            this._adapter.InsertCommand.Connection = this.Connection;
+            this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[UserGroup] ([PermissionOwnerId]) VALUES (@PermissionOwnerId);\r" +
+                "\nSELECT PermissionOwnerId FROM UserGroup WHERE (PermissionOwnerId = @PermissionO" +
+                "wnerId)";
+            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
+            this._adapter.UpdateCommand.Connection = this.Connection;
+            this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId WHERE (([Pe" +
+                "rmissionOwnerId] = @Original_PermissionOwnerId));\r\nSELECT PermissionOwnerId FROM" +
+                " UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId)";
+            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+            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, "", "", ""));
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private void InitConnection() {
+            this._connection = new global::System.Data.SqlClient.SqlConnection();
+            this._connection.ConnectionString = global::HeuristicLab.Hive.Server.ADODataAccess.Properties.Settings.Default.HiveServerConnectionString;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private void InitCommandCollection() {
+            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
+            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
+            this._commandCollection[0].Connection = this.Connection;
+            this._commandCollection[0].CommandText = "SELECT PermissionOwnerId FROM dbo.UserGroup";
+            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
+        public virtual int Fill(dsHiveServer.UserGroupDataTable dataTable) {
+            this.Adapter.SelectCommand = this.CommandCollection[0];
+            if ((this.ClearBeforeFill == true)) {
+                dataTable.Clear();
+            }
+            int returnValue = this.Adapter.Fill(dataTable);
+            return returnValue;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
+        public virtual dsHiveServer.UserGroupDataTable GetData() {
+            this.Adapter.SelectCommand = this.CommandCollection[0];
+            dsHiveServer.UserGroupDataTable dataTable = new dsHiveServer.UserGroupDataTable();
+            this.Adapter.Fill(dataTable);
+            return dataTable;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(dsHiveServer.UserGroupDataTable dataTable) {
+            return this.Adapter.Update(dataTable);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(dsHiveServer dataSet) {
+            return this.Adapter.Update(dataSet, "UserGroup");
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(global::System.Data.DataRow dataRow) {
+            return this.Adapter.Update(new global::System.Data.DataRow[] {
+                        dataRow});
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(global::System.Data.DataRow[] dataRows) {
+            return this.Adapter.Update(dataRows);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
+        public virtual int Delete(long Original_PermissionOwnerId) {
+            this.Adapter.DeleteCommand.Parameters[0].Value = ((long)(Original_PermissionOwnerId));
+            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
+            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) 
+                        != global::System.Data.ConnectionState.Open)) {
+                this.Adapter.DeleteCommand.Connection.Open();
+            }
+            try {
+                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
+                return returnValue;
+            }
+            finally {
+                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+                    this.Adapter.DeleteCommand.Connection.Close();
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
+        public virtual int Insert(long PermissionOwnerId) {
+            this.Adapter.InsertCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
+            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
+            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) 
+                        != global::System.Data.ConnectionState.Open)) {
+                this.Adapter.InsertCommand.Connection.Open();
+            }
+            try {
+                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
+                return returnValue;
+            }
+            finally {
+                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+                    this.Adapter.InsertCommand.Connection.Close();
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+        public virtual int Update(long PermissionOwnerId, long Original_PermissionOwnerId) {
+            this.Adapter.UpdateCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
+            this.Adapter.UpdateCommand.Parameters[1].Value = ((long)(Original_PermissionOwnerId));
+            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
+            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) 
+                        != global::System.Data.ConnectionState.Open)) {
+                this.Adapter.UpdateCommand.Connection.Open();
+            }
+            try {
+                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
+                return returnValue;
+            }
+            finally {
+                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+                    this.Adapter.UpdateCommand.Connection.Close();
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+        public virtual int Update(long Original_PermissionOwnerId) {
+            return this.Update(Original_PermissionOwnerId, Original_PermissionOwnerId);
+        }
+    }
+    
+    /// <summary>
+    ///Represents the connection and commands used to retrieve and save data.
+    ///</summary>
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+    [global::System.ComponentModel.ToolboxItem(true)]
+    [global::System.ComponentModel.DataObjectAttribute(true)]
+    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
+        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+    public partial class PermissionOwner_UserGroupTableAdapter : global::System.ComponentModel.Component {
+        
+        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
+        
+        private global::System.Data.SqlClient.SqlConnection _connection;
+        
+        private global::System.Data.SqlClient.SqlTransaction _transaction;
+        
+        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
+        
+        private bool _clearBeforeFill;
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public PermissionOwner_UserGroupTableAdapter() {
+            this.ClearBeforeFill = true;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
+            get {
+                if ((this._adapter == null)) {
+                    this.InitAdapter();
+                }
+                return this._adapter;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        internal global::System.Data.SqlClient.SqlConnection Connection {
+            get {
+                if ((this._connection == null)) {
+                    this.InitConnection();
+                }
+                return this._connection;
+            }
+            set {
+                this._connection = value;
+                if ((this.Adapter.InsertCommand != null)) {
+                    this.Adapter.InsertCommand.Connection = value;
+                }
+                if ((this.Adapter.DeleteCommand != null)) {
+                    this.Adapter.DeleteCommand.Connection = value;
+                }
+                if ((this.Adapter.UpdateCommand != null)) {
+                    this.Adapter.UpdateCommand.Connection = value;
+                }
+                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+                    if ((this.CommandCollection[i] != null)) {
+                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
+                    }
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        internal global::System.Data.SqlClient.SqlTransaction Transaction {
+            get {
+                return this._transaction;
+            }
+            set {
+                this._transaction = value;
+                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+                    this.CommandCollection[i].Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.DeleteCommand != null))) {
+                    this.Adapter.DeleteCommand.Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.InsertCommand != null))) {
+                    this.Adapter.InsertCommand.Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.UpdateCommand != null))) {
+                    this.Adapter.UpdateCommand.Transaction = this._transaction;
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
+            get {
+                if ((this._commandCollection == null)) {
+                    this.InitCommandCollection();
+                }
+                return this._commandCollection;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public bool ClearBeforeFill {
+            get {
+                return this._clearBeforeFill;
+            }
+            set {
+                this._clearBeforeFill = value;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private void InitAdapter() {
+            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
+            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
+            tableMapping.SourceTable = "Table";
+            tableMapping.DataSetTable = "PermissionOwner_UserGroup";
+            tableMapping.ColumnMappings.Add("PermissionOwnerId", "PermissionOwnerId");
+            tableMapping.ColumnMappings.Add("UserGroupId", "UserGroupId");
+            this._adapter.TableMappings.Add(tableMapping);
+            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
+            this._adapter.DeleteCommand.Connection = this.Connection;
+            this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[PermissionOwner_UserGroup] WHERE (([PermissionOwnerId] = @Orig" +
+                "inal_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId))";
+            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+            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, "", "", ""));
+            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
+            this._adapter.InsertCommand.Connection = this.Connection;
+            this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[PermissionOwner_UserGroup] ([PermissionOwnerId], [UserGroupId]) VALUES (@PermissionOwnerId, @UserGroupId);
+SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)";
+            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+            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, "", "", ""));
+            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
+            this._adapter.UpdateCommand.Connection = this.Connection;
+            this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[PermissionOwner_UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId, [UserGroupId] = @UserGroupId WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId));
+SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)";
+            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+            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, "", "", ""));
+            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, "", "", ""));
+            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, "", "", ""));
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private void InitConnection() {
+            this._connection = new global::System.Data.SqlClient.SqlConnection();
+            this._connection.ConnectionString = global::HeuristicLab.Hive.Server.ADODataAccess.Properties.Settings.Default.HiveServerConnectionString;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        private void InitCommandCollection() {
+            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
+            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
+            this._commandCollection[0].Connection = this.Connection;
+            this._commandCollection[0].CommandText = "SELECT PermissionOwnerId, UserGroupId FROM dbo.PermissionOwner_UserGroup";
+            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
+            this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
+            this._commandCollection[1].Connection = this.Connection;
+            this._commandCollection[1].CommandText = "SELECT * FROM dbo.PermissionOwner_UserGroup WHERE UserGroupId = @UserGroupId";
+            this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
+            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, "", "", ""));
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
+        public virtual int Fill(dsHiveServer.PermissionOwner_UserGroupDataTable dataTable) {
+            this.Adapter.SelectCommand = this.CommandCollection[0];
+            if ((this.ClearBeforeFill == true)) {
+                dataTable.Clear();
+            }
+            int returnValue = this.Adapter.Fill(dataTable);
+            return returnValue;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
+        public virtual dsHiveServer.PermissionOwner_UserGroupDataTable GetData() {
+            this.Adapter.SelectCommand = this.CommandCollection[0];
+            dsHiveServer.PermissionOwner_UserGroupDataTable dataTable = new dsHiveServer.PermissionOwner_UserGroupDataTable();
+            this.Adapter.Fill(dataTable);
+            return dataTable;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
+        public virtual int FillByUserGroupId(dsHiveServer.PermissionOwner_UserGroupDataTable dataTable, long UserGroupId) {
+            this.Adapter.SelectCommand = this.CommandCollection[1];
+            this.Adapter.SelectCommand.Parameters[0].Value = ((long)(UserGroupId));
+            if ((this.ClearBeforeFill == true)) {
+                dataTable.Clear();
+            }
+            int returnValue = this.Adapter.Fill(dataTable);
+            return returnValue;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+        public virtual dsHiveServer.PermissionOwner_UserGroupDataTable GetDataByUserGroupId(long UserGroupId) {
+            this.Adapter.SelectCommand = this.CommandCollection[1];
+            this.Adapter.SelectCommand.Parameters[0].Value = ((long)(UserGroupId));
+            dsHiveServer.PermissionOwner_UserGroupDataTable dataTable = new dsHiveServer.PermissionOwner_UserGroupDataTable();
+            this.Adapter.Fill(dataTable);
+            return dataTable;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(dsHiveServer.PermissionOwner_UserGroupDataTable dataTable) {
+            return this.Adapter.Update(dataTable);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(dsHiveServer dataSet) {
+            return this.Adapter.Update(dataSet, "PermissionOwner_UserGroup");
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(global::System.Data.DataRow dataRow) {
+            return this.Adapter.Update(new global::System.Data.DataRow[] {
+                        dataRow});
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        public virtual int Update(global::System.Data.DataRow[] dataRows) {
+            return this.Adapter.Update(dataRows);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
+        public virtual int Delete(long Original_PermissionOwnerId, long Original_UserGroupId) {
+            this.Adapter.DeleteCommand.Parameters[0].Value = ((long)(Original_PermissionOwnerId));
+            this.Adapter.DeleteCommand.Parameters[1].Value = ((long)(Original_UserGroupId));
+            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
+            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) 
+                        != global::System.Data.ConnectionState.Open)) {
+                this.Adapter.DeleteCommand.Connection.Open();
+            }
+            try {
+                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
+                return returnValue;
+            }
+            finally {
+                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+                    this.Adapter.DeleteCommand.Connection.Close();
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
+        public virtual int Insert(long PermissionOwnerId, long UserGroupId) {
+            this.Adapter.InsertCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
+            this.Adapter.InsertCommand.Parameters[1].Value = ((long)(UserGroupId));
+            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
+            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) 
+                        != global::System.Data.ConnectionState.Open)) {
+                this.Adapter.InsertCommand.Connection.Open();
+            }
+            try {
+                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
+                return returnValue;
+            }
+            finally {
+                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+                    this.Adapter.InsertCommand.Connection.Close();
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+        public virtual int Update(long PermissionOwnerId, long UserGroupId, long Original_PermissionOwnerId, long Original_UserGroupId) {
+            this.Adapter.UpdateCommand.Parameters[0].Value = ((long)(PermissionOwnerId));
+            this.Adapter.UpdateCommand.Parameters[1].Value = ((long)(UserGroupId));
+            this.Adapter.UpdateCommand.Parameters[2].Value = ((long)(Original_PermissionOwnerId));
+            this.Adapter.UpdateCommand.Parameters[3].Value = ((long)(Original_UserGroupId));
+            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
+            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) 
+                        != global::System.Data.ConnectionState.Open)) {
+                this.Adapter.UpdateCommand.Connection.Open();
+            }
+            try {
+                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
+                return returnValue;
+            }
+            finally {
+                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+                    this.Adapter.UpdateCommand.Connection.Close();
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
+        public virtual int Update(long Original_PermissionOwnerId, long Original_UserGroupId) {
+            return this.Update(Original_PermissionOwnerId, Original_UserGroupId, Original_PermissionOwnerId, Original_UserGroupId);
+        }
+    }
+    
+    /// <summary>
     ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
     ///</summary>
@@ -3605,4 +4946,8 @@
         private PermissionOwnerTableAdapter _permissionOwnerTableAdapter;
         
+        private UserGroupTableAdapter _userGroupTableAdapter;
+        
+        private PermissionOwner_UserGroupTableAdapter _permissionOwner_UserGroupTableAdapter;
+        
         private bool _backupDataSetBeforeUpdate;
         
@@ -3628,14 +4973,4 @@
             }
             set {
-                if (((this._resourceTableAdapter != null) 
-                            && (this.TableAdapterInstanceCount == 1))) {
-                    this._resourceTableAdapter = value;
-                    return;
-                }
-                if (((value != null) 
-                            && (this.MatchTableAdapterConnection(value.Connection) == false))) {
-                    throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
-                            "tring.");
-                }
                 this._resourceTableAdapter = value;
             }
@@ -3651,14 +4986,4 @@
             }
             set {
-                if (((this._clientTableAdapter != null) 
-                            && (this.TableAdapterInstanceCount == 1))) {
-                    this._clientTableAdapter = value;
-                    return;
-                }
-                if (((value != null) 
-                            && (this.MatchTableAdapterConnection(value.Connection) == false))) {
-                    throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
-                            "tring.");
-                }
                 this._clientTableAdapter = value;
             }
@@ -3674,14 +4999,4 @@
             }
             set {
-                if (((this._hiveUserTableAdapter != null) 
-                            && (this.TableAdapterInstanceCount == 1))) {
-                    this._hiveUserTableAdapter = value;
-                    return;
-                }
-                if (((value != null) 
-                            && (this.MatchTableAdapterConnection(value.Connection) == false))) {
-                    throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
-                            "tring.");
-                }
                 this._hiveUserTableAdapter = value;
             }
@@ -3697,15 +5012,31 @@
             }
             set {
-                if (((this._permissionOwnerTableAdapter != null) 
-                            && (this.TableAdapterInstanceCount == 1))) {
-                    this._permissionOwnerTableAdapter = value;
-                    return;
-                }
-                if (((value != null) 
-                            && (this.MatchTableAdapterConnection(value.Connection) == false))) {
-                    throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
-                            "tring.");
-                }
                 this._permissionOwnerTableAdapter = value;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
+            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
+            "", "System.Drawing.Design.UITypeEditor")]
+        public UserGroupTableAdapter UserGroupTableAdapter {
+            get {
+                return this._userGroupTableAdapter;
+            }
+            set {
+                this._userGroupTableAdapter = value;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
+            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
+            "", "System.Drawing.Design.UITypeEditor")]
+        public PermissionOwner_UserGroupTableAdapter PermissionOwner_UserGroupTableAdapter {
+            get {
+                return this._permissionOwner_UserGroupTableAdapter;
+            }
+            set {
+                this._permissionOwner_UserGroupTableAdapter = value;
             }
         }
@@ -3743,4 +5074,12 @@
                             && (this._permissionOwnerTableAdapter.Connection != null))) {
                     return this._permissionOwnerTableAdapter.Connection;
+                }
+                if (((this._userGroupTableAdapter != null) 
+                            && (this._userGroupTableAdapter.Connection != null))) {
+                    return this._userGroupTableAdapter.Connection;
+                }
+                if (((this._permissionOwner_UserGroupTableAdapter != null) 
+                            && (this._permissionOwner_UserGroupTableAdapter.Connection != null))) {
+                    return this._permissionOwner_UserGroupTableAdapter.Connection;
                 }
                 return null;
@@ -3766,4 +5105,10 @@
                 }
                 if ((this._permissionOwnerTableAdapter != null)) {
+                    count = (count + 1);
+                }
+                if ((this._userGroupTableAdapter != null)) {
+                    count = (count + 1);
+                }
+                if ((this._permissionOwner_UserGroupTableAdapter != null)) {
                     count = (count + 1);
                 }
@@ -3787,4 +5132,13 @@
                 }
             }
+            if ((this._userGroupTableAdapter != null)) {
+                global::System.Data.DataRow[] updatedRows = dataSet.UserGroup.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
+                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
+                if (((updatedRows != null) 
+                            && (0 < updatedRows.Length))) {
+                    result = (result + this._userGroupTableAdapter.Update(updatedRows));
+                    allChangedRows.AddRange(updatedRows);
+                }
+            }
             if ((this._resourceTableAdapter != null)) {
                 global::System.Data.DataRow[] updatedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
@@ -3793,4 +5147,13 @@
                             && (0 < updatedRows.Length))) {
                     result = (result + this._resourceTableAdapter.Update(updatedRows));
+                    allChangedRows.AddRange(updatedRows);
+                }
+            }
+            if ((this._permissionOwner_UserGroupTableAdapter != null)) {
+                global::System.Data.DataRow[] updatedRows = dataSet.PermissionOwner_UserGroup.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
+                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
+                if (((updatedRows != null) 
+                            && (0 < updatedRows.Length))) {
+                    result = (result + this._permissionOwner_UserGroupTableAdapter.Update(updatedRows));
                     allChangedRows.AddRange(updatedRows);
                 }
@@ -3831,4 +5194,12 @@
                 }
             }
+            if ((this._userGroupTableAdapter != null)) {
+                global::System.Data.DataRow[] addedRows = dataSet.UserGroup.Select(null, null, global::System.Data.DataViewRowState.Added);
+                if (((addedRows != null) 
+                            && (0 < addedRows.Length))) {
+                    result = (result + this._userGroupTableAdapter.Update(addedRows));
+                    allAddedRows.AddRange(addedRows);
+                }
+            }
             if ((this._resourceTableAdapter != null)) {
                 global::System.Data.DataRow[] addedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.Added);
@@ -3836,4 +5207,12 @@
                             && (0 < addedRows.Length))) {
                     result = (result + this._resourceTableAdapter.Update(addedRows));
+                    allAddedRows.AddRange(addedRows);
+                }
+            }
+            if ((this._permissionOwner_UserGroupTableAdapter != null)) {
+                global::System.Data.DataRow[] addedRows = dataSet.PermissionOwner_UserGroup.Select(null, null, global::System.Data.DataViewRowState.Added);
+                if (((addedRows != null) 
+                            && (0 < addedRows.Length))) {
+                    result = (result + this._permissionOwner_UserGroupTableAdapter.Update(addedRows));
                     allAddedRows.AddRange(addedRows);
                 }
@@ -3880,4 +5259,12 @@
                 }
             }
+            if ((this._permissionOwner_UserGroupTableAdapter != null)) {
+                global::System.Data.DataRow[] deletedRows = dataSet.PermissionOwner_UserGroup.Select(null, null, global::System.Data.DataViewRowState.Deleted);
+                if (((deletedRows != null) 
+                            && (0 < deletedRows.Length))) {
+                    result = (result + this._permissionOwner_UserGroupTableAdapter.Update(deletedRows));
+                    allChangedRows.AddRange(deletedRows);
+                }
+            }
             if ((this._resourceTableAdapter != null)) {
                 global::System.Data.DataRow[] deletedRows = dataSet.Resource.Select(null, null, global::System.Data.DataViewRowState.Deleted);
@@ -3888,4 +5275,12 @@
                 }
             }
+            if ((this._userGroupTableAdapter != null)) {
+                global::System.Data.DataRow[] deletedRows = dataSet.UserGroup.Select(null, null, global::System.Data.DataViewRowState.Deleted);
+                if (((deletedRows != null) 
+                            && (0 < deletedRows.Length))) {
+                    result = (result + this._userGroupTableAdapter.Update(deletedRows));
+                    allChangedRows.AddRange(deletedRows);
+                }
+            }
             if ((this._permissionOwnerTableAdapter != null)) {
                 global::System.Data.DataRow[] deletedRows = dataSet.PermissionOwner.Select(null, null, global::System.Data.DataViewRowState.Deleted);
@@ -3933,4 +5328,34 @@
                 return 0;
             }
+            if (((this._resourceTableAdapter != null) 
+                        && (this.MatchTableAdapterConnection(this._resourceTableAdapter.Connection) == false))) {
+                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+                        "tring.");
+            }
+            if (((this._clientTableAdapter != null) 
+                        && (this.MatchTableAdapterConnection(this._clientTableAdapter.Connection) == false))) {
+                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+                        "tring.");
+            }
+            if (((this._hiveUserTableAdapter != null) 
+                        && (this.MatchTableAdapterConnection(this._hiveUserTableAdapter.Connection) == false))) {
+                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+                        "tring.");
+            }
+            if (((this._permissionOwnerTableAdapter != null) 
+                        && (this.MatchTableAdapterConnection(this._permissionOwnerTableAdapter.Connection) == false))) {
+                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+                        "tring.");
+            }
+            if (((this._userGroupTableAdapter != null) 
+                        && (this.MatchTableAdapterConnection(this._userGroupTableAdapter.Connection) == false))) {
+                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+                        "tring.");
+            }
+            if (((this._permissionOwner_UserGroupTableAdapter != null) 
+                        && (this.MatchTableAdapterConnection(this._permissionOwner_UserGroupTableAdapter.Connection) == false))) {
+                throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
+                        "tring.");
+            }
             global::System.Data.IDbConnection workConnection = this.Connection;
             if ((workConnection == null)) {
@@ -3939,6 +5364,9 @@
             }
             bool workConnOpened = false;
-            if (((workConnection.State & global::System.Data.ConnectionState.Closed) 
-                        == global::System.Data.ConnectionState.Closed)) {
+            if (((workConnection.State & global::System.Data.ConnectionState.Broken) 
+                        == global::System.Data.ConnectionState.Broken)) {
+                workConnection.Close();
+            }
+            if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
                 workConnection.Open();
                 workConnOpened = true;
@@ -3996,4 +5424,22 @@
                         this._permissionOwnerTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
                         adaptersWithAcceptChangesDuringUpdate.Add(this._permissionOwnerTableAdapter.Adapter);
+                    }
+                }
+                if ((this._userGroupTableAdapter != null)) {
+                    revertConnections.Add(this._userGroupTableAdapter, this._userGroupTableAdapter.Connection);
+                    this._userGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
+                    this._userGroupTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
+                    if (this._userGroupTableAdapter.Adapter.AcceptChangesDuringUpdate) {
+                        this._userGroupTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
+                        adaptersWithAcceptChangesDuringUpdate.Add(this._userGroupTableAdapter.Adapter);
+                    }
+                }
+                if ((this._permissionOwner_UserGroupTableAdapter != null)) {
+                    revertConnections.Add(this._permissionOwner_UserGroupTableAdapter, this._permissionOwner_UserGroupTableAdapter.Connection);
+                    this._permissionOwner_UserGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
+                    this._permissionOwner_UserGroupTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
+                    if (this._permissionOwner_UserGroupTableAdapter.Adapter.AcceptChangesDuringUpdate) {
+                        this._permissionOwner_UserGroupTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
+                        adaptersWithAcceptChangesDuringUpdate.Add(this._permissionOwner_UserGroupTableAdapter.Adapter);
                     }
                 }
@@ -4072,4 +5518,12 @@
                     this._permissionOwnerTableAdapter.Transaction = null;
                 }
+                if ((this._userGroupTableAdapter != null)) {
+                    this._userGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._userGroupTableAdapter]));
+                    this._userGroupTableAdapter.Transaction = null;
+                }
+                if ((this._permissionOwner_UserGroupTableAdapter != null)) {
+                    this._permissionOwner_UserGroupTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._permissionOwner_UserGroupTableAdapter]));
+                    this._permissionOwner_UserGroupTableAdapter.Transaction = null;
+                }
                 if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
                     global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd	(revision 935)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd	(revision 936)
@@ -305,4 +305,106 @@
             </Sources>
           </TableAdapter>
+          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="UserGroupTableAdapter" GeneratorDataComponentClassName="UserGroupTableAdapter" Name="UserGroup" UserDataComponentName="UserGroupTableAdapter">
+            <MainSource>
+              <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">
+                <DeleteCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>DELETE FROM [dbo].[UserGroup] WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId))</CommandText>
+                    <Parameters>
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </DeleteCommand>
+                <InsertCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>INSERT INTO [dbo].[UserGroup] ([PermissionOwnerId]) VALUES (@PermissionOwnerId);
+SELECT PermissionOwnerId FROM UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId)</CommandText>
+                    <Parameters>
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </InsertCommand>
+                <SelectCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>SELECT PermissionOwnerId FROM dbo.UserGroup</CommandText>
+                    <Parameters />
+                  </DbCommand>
+                </SelectCommand>
+                <UpdateCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>UPDATE [dbo].[UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId));
+SELECT PermissionOwnerId FROM UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId)</CommandText>
+                    <Parameters>
+                      <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" />
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </UpdateCommand>
+              </DbSource>
+            </MainSource>
+            <Mappings>
+              <Mapping SourceColumn="PermissionOwnerId" DataSetColumn="PermissionOwnerId" />
+            </Mappings>
+            <Sources />
+          </TableAdapter>
+          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PermissionOwner_UserGroupTableAdapter" GeneratorDataComponentClassName="PermissionOwner_UserGroupTableAdapter" Name="PermissionOwner_UserGroup" UserDataComponentName="PermissionOwner_UserGroupTableAdapter">
+            <MainSource>
+              <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">
+                <DeleteCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>DELETE FROM [dbo].[PermissionOwner_UserGroup] WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId))</CommandText>
+                    <Parameters>
+                      <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" />
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </DeleteCommand>
+                <InsertCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>INSERT INTO [dbo].[PermissionOwner_UserGroup] ([PermissionOwnerId], [UserGroupId]) VALUES (@PermissionOwnerId, @UserGroupId);
+SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)</CommandText>
+                    <Parameters>
+                      <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" />
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </InsertCommand>
+                <SelectCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>SELECT PermissionOwnerId, UserGroupId FROM dbo.PermissionOwner_UserGroup</CommandText>
+                    <Parameters />
+                  </DbCommand>
+                </SelectCommand>
+                <UpdateCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="false">
+                    <CommandText>UPDATE [dbo].[PermissionOwner_UserGroup] SET [PermissionOwnerId] = @PermissionOwnerId, [UserGroupId] = @UserGroupId WHERE (([PermissionOwnerId] = @Original_PermissionOwnerId) AND ([UserGroupId] = @Original_UserGroupId));
+SELECT PermissionOwnerId, UserGroupId FROM PermissionOwner_UserGroup WHERE (PermissionOwnerId = @PermissionOwnerId) AND (UserGroupId = @UserGroupId)</CommandText>
+                    <Parameters>
+                      <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" />
+                      <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" />
+                      <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" />
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </UpdateCommand>
+              </DbSource>
+            </MainSource>
+            <Mappings>
+              <Mapping SourceColumn="PermissionOwnerId" DataSetColumn="PermissionOwnerId" />
+              <Mapping SourceColumn="UserGroupId" DataSetColumn="UserGroupId" />
+            </Mappings>
+            <Sources>
+              <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">
+                <SelectCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="true">
+                    <CommandText>SELECT * FROM dbo.PermissionOwner_UserGroup WHERE UserGroupId = @UserGroupId</CommandText>
+                    <Parameters>
+                      <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" />
+                    </Parameters>
+                  </DbCommand>
+                </SelectCommand>
+              </DbSource>
+            </Sources>
+          </TableAdapter>
         </Tables>
         <Sources />
@@ -316,6 +418,6 @@
           <xs:complexType>
             <xs:sequence>
-              <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" />
-              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
+              <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" />
+              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
                 <xs:simpleType>
                   <xs:restriction base="xs:string">
@@ -330,10 +432,10 @@
           <xs:complexType>
             <xs:sequence>
-              <xs:element name="ResourceId" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />
-              <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" />
-              <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" />
-              <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" />
-              <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" />
-              <xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInRow="Status" msprop:Generator_ColumnPropNameInTable="StatusColumn" minOccurs="0">
+              <xs:element name="ResourceId" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />
+              <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" />
+              <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" />
+              <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" />
+              <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" />
+              <xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_ColumnPropNameInRow="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInTable="StatusColumn" minOccurs="0">
                 <xs:simpleType>
                   <xs:restriction base="xs:string">
@@ -342,6 +444,6 @@
                 </xs:simpleType>
               </xs:element>
-              <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" />
-              <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" />
+              <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" />
+              <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" />
             </xs:sequence>
           </xs:complexType>
@@ -350,6 +452,6 @@
           <xs:complexType>
             <xs:sequence>
-              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
-              <xs:element name="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInRow="Password" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0">
+              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
+              <xs:element name="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_ColumnPropNameInRow="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0">
                 <xs:simpleType>
                   <xs:restriction base="xs:string">
@@ -364,6 +466,6 @@
           <xs:complexType>
             <xs:sequence>
-              <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" />
-              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
+              <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" />
+              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
                 <xs:simpleType>
                   <xs:restriction base="xs:string">
@@ -372,4 +474,19 @@
                 </xs:simpleType>
               </xs:element>
+            </xs:sequence>
+          </xs:complexType>
+        </xs:element>
+        <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">
+          <xs:complexType>
+            <xs:sequence>
+              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
+            </xs:sequence>
+          </xs:complexType>
+        </xs:element>
+        <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">
+          <xs:complexType>
+            <xs:sequence>
+              <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />
+              <xs:element name="UserGroupId" msprop:Generator_UserColumnName="UserGroupId" msprop:Generator_ColumnPropNameInRow="UserGroupId" msprop:Generator_ColumnVarNameInTable="columnUserGroupId" msprop:Generator_ColumnPropNameInTable="UserGroupIdColumn" type="xs:long" />
             </xs:sequence>
           </xs:complexType>
@@ -393,4 +510,13 @@
       <xs:field xpath="mstns:PermissionOwnerId" />
     </xs:unique>
+    <xs:unique name="UserGroup_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
+      <xs:selector xpath=".//mstns:UserGroup" />
+      <xs:field xpath="mstns:PermissionOwnerId" />
+    </xs:unique>
+    <xs:unique name="PermissionOwner_UserGroup_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
+      <xs:selector xpath=".//mstns:PermissionOwner_UserGroup" />
+      <xs:field xpath="mstns:PermissionOwnerId" />
+      <xs:field xpath="mstns:UserGroupId" />
+    </xs:unique>
   </xs:element>
   <xs:annotation>
@@ -398,4 +524,7 @@
       <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" />
       <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" />
+      <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" />
+      <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" />
+      <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" />
     </xs:appinfo>
   </xs:annotation>
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss	(revision 935)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss	(revision 936)
@@ -5,33 +5,71 @@
      the code is regenerated.
 </autogenerated>-->
-<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">
+<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">
   <Shapes>
-    <Shape ID="DesignTable:Resource" ZOrder="4" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
-    <Shape ID="DesignTable:Client" ZOrder="3" X="39" Y="137" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" />
-    <Shape ID="DesignTable:HiveUser" ZOrder="2" X="336" Y="139" Height="139" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
-    <Shape ID="DesignTable:PermissionOwner" ZOrder="1" X="298" Y="-16" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
+    <Shape ID="DesignTable:Resource" ZOrder="9" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
+    <Shape ID="DesignTable:Client" ZOrder="8" X="-89" Y="148" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" />
+    <Shape ID="DesignTable:HiveUser" ZOrder="5" X="492" Y="150" Height="139" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
+    <Shape ID="DesignTable:PermissionOwner" ZOrder="7" X="298" Y="-16" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
+    <Shape ID="DesignTable:UserGroup" ZOrder="6" X="252" Y="405" Height="88" Width="202" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="42" />
+    <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" />
   </Shapes>
   <Connectors>
-    <Connector ID="DesignRelation:Client_is_a_Resource" ZOrder="6" LineWidth="11">
+    <Connector ID="DesignRelation:Client_is_a_Resource" ZOrder="11" LineWidth="11">
       <RoutePoints>
         <Point>
-          <X>62</X>
+          <X>59</X>
           <Y>106</Y>
         </Point>
         <Point>
-          <X>62</X>
-          <Y>137</Y>
+          <X>59</X>
+          <Y>148</Y>
         </Point>
       </RoutePoints>
     </Connector>
-    <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="5" LineWidth="11">
+    <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="10" LineWidth="11">
       <RoutePoints>
         <Point>
-          <X>438</X>
+          <X>516</X>
           <Y>106</Y>
         </Point>
         <Point>
-          <X>438</X>
-          <Y>139</Y>
+          <X>516</X>
+          <Y>150</Y>
+        </Point>
+      </RoutePoints>
+    </Connector>
+    <Connector ID="DesignRelation:UserGroup_is_a_PermissionOwner" ZOrder="1" LineWidth="11">
+      <RoutePoints>
+        <Point>
+          <X>432</X>
+          <Y>106</Y>
+        </Point>
+        <Point>
+          <X>432</X>
+          <Y>405</Y>
+        </Point>
+      </RoutePoints>
+    </Connector>
+    <Connector ID="DesignRelation:R_44" ZOrder="3" LineWidth="11">
+      <RoutePoints>
+        <Point>
+          <X>346</X>
+          <Y>106</Y>
+        </Point>
+        <Point>
+          <X>346</X>
+          <Y>182</Y>
+        </Point>
+      </RoutePoints>
+    </Connector>
+    <Connector ID="DesignRelation:R_57" ZOrder="2" LineWidth="11">
+      <RoutePoints>
+        <Point>
+          <X>346</X>
+          <Y>405</Y>
+        </Point>
+        <Point>
+          <X>346</X>
+          <Y>304</Y>
         </Point>
       </RoutePoints>
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs	(revision 935)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs	(revision 936)
@@ -102,7 +102,58 @@
     }
 
+    private void TestUserGroupAdapter() {
+      IUserGroupAdapter userGroupAdapter =
+       ServiceLocator.GetUserGroupAdapter();
+
+      User user =
+        new User();
+      user.Name = "Stefan";
+
+      User user2 =
+        new User();
+      user2.Name = "Martin";
+
+      UserGroup group =
+        new UserGroup();
+
+      UserGroup subGroup =
+        new UserGroup();
+      subGroup.Members.Add(user);
+
+      group.Members.Add(user2);
+      group.Members.Add(subGroup);
+
+      userGroupAdapter.UpdateUserGroup(group);
+
+      UserGroup read =
+        userGroupAdapter.GetUserGroupById(group.PermissionOwnerId);
+
+      ICollection<UserGroup> userGroups =
+        userGroupAdapter.GetAllUserGroups();
+
+      userGroupAdapter.DeleteUserGroup(subGroup);
+
+      userGroups =
+        userGroupAdapter.GetAllUserGroups();
+
+      read =
+        userGroupAdapter.GetUserGroupById(group.PermissionOwnerId);
+
+      userGroupAdapter.DeleteUserGroup(group);
+
+      userGroups =
+        userGroupAdapter.GetAllUserGroups();
+
+      IUserAdapter userAdapter =
+        ServiceLocator.GetUserAdapter();
+
+      userAdapter.DeleteUser(user);
+      userAdapter.DeleteUser(user2);
+    }
+
     public override void Run() {
       TestClientAdapter();
       TestUserAdapter();
+      TestUserGroupAdapter();
 
       ITransactionManager transactionManager =
