Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/PermissionOwnerAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/PermissionOwnerAdapter.cs	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/PermissionOwnerAdapter.cs	(revision 905)
@@ -34,4 +34,30 @@
      new dsHiveServerTableAdapters.PermissionOwnerTableAdapter();
 
+    private PermissionOwner Convert(dsHiveServer.PermissionOwnerRow row, 
+      PermissionOwner permOwner) {
+      if (row != null && permOwner != null) {
+        permOwner.PermissionOwnerId = row.PermissionOwnerId;
+
+        if (!row.IsNameNull())
+          permOwner.Name = row.Name;
+        else
+          permOwner.Name = String.Empty;
+
+        return permOwner;
+      } else
+        return null;
+    }
+
+    private dsHiveServer.PermissionOwnerRow Convert(PermissionOwner permOwner,
+      dsHiveServer.PermissionOwnerRow row) {
+      if (row != null && permOwner != null) {
+        row.PermissionOwnerId = permOwner.PermissionOwnerId;
+        row.Name = permOwner.Name;
+
+        return row;
+      } else
+        return null;
+    }
+
     public void UpdatePermissionOwner(PermissionOwner permOwner) {
       if (permOwner != null) {
@@ -57,5 +83,13 @@
     internal bool FillPermissionOwner(PermissionOwner permOwner) {
       if (permOwner != null) {
+        dsHiveServer.PermissionOwnerDataTable data =
+          adapter.GetDataById(permOwner.PermissionOwnerId);
+        if (data.Count == 1) {
+          dsHiveServer.PermissionOwnerRow row =
+            data[0];
+          Convert(row, permOwner);
+
           return true;
+        }
       }
 
@@ -63,10 +97,28 @@
     }
 
-    public PermissionOwner GetPermissionOwnerById(long resourceId) {
-      throw new NotImplementedException();
+    public PermissionOwner GetPermissionOwnerById(long permOwnerId) {
+      PermissionOwner permOwner = new PermissionOwner();
+      permOwner.PermissionOwnerId = permOwnerId;
+
+      if (FillPermissionOwner(permOwner))
+        return permOwner;
+      else
+        return null;
     }
 
     public ICollection<PermissionOwner> GetAllPermissionOwners() {
-      throw new NotImplementedException();
+      ICollection<PermissionOwner> allPermissionOwners =
+        new List<PermissionOwner>();
+
+      dsHiveServer.PermissionOwnerDataTable data =
+          adapter.GetData();
+
+      foreach (dsHiveServer.PermissionOwnerRow row in data) {
+        PermissionOwner permOwner = new PermissionOwner();
+        Convert(row, permOwner);
+        allPermissionOwners.Add(permOwner);
+      }
+
+      return allPermissionOwners;
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs	(revision 905)
@@ -68,21 +68,76 @@
 
     public void UpdateUser(User user) {
-      throw new NotImplementedException();
+      if (user != null) {
+        permOwnerAdapter.UpdatePermissionOwner(user);
+
+        dsHiveServer.HiveUserDataTable data =
+          adapter.GetDataById(user.PermissionOwnerId);
+
+        dsHiveServer.HiveUserRow row;
+        if (data.Count == 0) {
+          row = data.NewHiveUserRow();
+          row.PermissionOwnerId = user.PermissionOwnerId;
+          data.AddHiveUserRow(row);
+        } else {
+          row = data[0];
+        }
+
+        Convert(user, row);
+
+        adapter.Update(data);
+      }
     }
 
     public User GetUserById(long userId) {
-      throw new NotImplementedException();
+      User user = new User();
+
+      dsHiveServer.HiveUserDataTable data =
+          adapter.GetDataById(userId);
+      if (data.Count == 1) {
+        dsHiveServer.HiveUserRow row =
+          data[0];
+        Convert(row, user);
+
+        return user;
+      } else {
+        return null;
+      }
     }
 
     public User GetUserByName(String name) {
-      throw new NotImplementedException();
+      User user = new User();
+
+      dsHiveServer.HiveUserDataTable data =
+          adapter.GetDataByName(name);
+      if (data.Count == 1) {
+        dsHiveServer.HiveUserRow row =
+          data[0];
+        Convert(row, user);
+
+        return user;
+      } else {
+        return null;
+      }
     }
 
     public ICollection<User> GetAllUsers() {
-      throw new NotImplementedException();
+      ICollection<User> allUsers =
+        new List<User>();
+
+      dsHiveServer.HiveUserDataTable data =
+          adapter.GetData();
+
+      foreach (dsHiveServer.HiveUserRow row in data) {
+        User user = new User();
+        Convert(row, user);
+        allUsers.Add(user);
+      }
+
+      return allUsers;
     }
 
     public bool DeleteUser(User user) {
-      throw new NotImplementedException();
+      //referential integrity will delete the client object
+      return permOwnerAdapter.DeletePermissionOwner(user);
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs	(revision 905)
@@ -3025,5 +3025,5 @@
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         private void InitCommandCollection() {
-            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
+            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
             this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
             this._commandCollection[0].Connection = this.Connection;
@@ -3035,4 +3035,11 @@
             this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
             this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 0, 0, "PermissionOwnerId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+            this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
+            this._commandCollection[2].Connection = this.Connection;
+            this._commandCollection[2].CommandText = "SELECT     HiveUser.PermissionOwnerId, HiveUser.Password\r\nFROM         HiveUser I" +
+                "NNER JOIN\r\n                      PermissionOwner ON HiveUser.PermissionOwnerId =" +
+                " PermissionOwner.PermissionOwnerId\r\nWHERE     (PermissionOwner.Name = @Name)";
+            this._commandCollection[2].CommandType = global::System.Data.CommandType.Text;
+            this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.VarChar, 18, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
         }
         
@@ -3078,4 +3085,38 @@
             this.Adapter.SelectCommand = this.CommandCollection[1];
             this.Adapter.SelectCommand.Parameters[0].Value = ((long)(Id));
+            dsHiveServer.HiveUserDataTable dataTable = new dsHiveServer.HiveUserDataTable();
+            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 FillByName(dsHiveServer.HiveUserDataTable dataTable, string Name) {
+            this.Adapter.SelectCommand = this.CommandCollection[2];
+            if ((Name == null)) {
+                this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
+            }
+            else {
+                this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Name));
+            }
+            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.HiveUserDataTable GetDataByName(string Name) {
+            this.Adapter.SelectCommand = this.CommandCollection[2];
+            if ((Name == null)) {
+                this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
+            }
+            else {
+                this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Name));
+            }
             dsHiveServer.HiveUserDataTable dataTable = new dsHiveServer.HiveUserDataTable();
             this.Adapter.Fill(dataTable);
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd	(revision 905)
@@ -230,4 +230,17 @@
                 </SelectCommand>
               </DbSource>
+              <DbSource ConnectionRef="HiveServerConnectionString (Settings)" DbObjectName="HiveServer.dbo.HiveUser" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByName" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByName" GeneratorSourceName="FillByName" GetMethodModifier="Public" GetMethodName="GetDataByName" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataByName" UserSourceName="FillByName">
+                <SelectCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="true">
+                    <CommandText>SELECT     HiveUser.PermissionOwnerId, HiveUser.Password
+FROM         HiveUser INNER JOIN
+                      PermissionOwner ON HiveUser.PermissionOwnerId = PermissionOwner.PermissionOwnerId
+WHERE     (PermissionOwner.Name = @Name)</CommandText>
+                    <Parameters>
+                      <Parameter AllowDbNull="true" AutogeneratedName="Name" ColumnName="Name" DataSourceName="HiveServer.dbo.PermissionOwner" DataTypeServer="varchar(18)" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="18" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" />
+                    </Parameters>
+                  </DbCommand>
+                </SelectCommand>
+              </DbSource>
             </Sources>
           </TableAdapter>
@@ -303,6 +316,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_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: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:simpleType>
                   <xs:restriction base="xs:string">
@@ -314,13 +327,13 @@
           </xs:complexType>
         </xs:element>
-        <xs:element name="Client" msprop:Generator_UserTableName="Client" msprop:Generator_RowDeletedName="ClientRowDeleted" msprop:Generator_TableClassName="ClientDataTable" msprop:Generator_RowChangedName="ClientRowChanged" msprop:Generator_RowClassName="ClientRow" msprop:Generator_RowChangingName="ClientRowChanging" msprop:Generator_RowEvArgName="ClientRowChangeEvent" msprop:Generator_RowEvHandlerName="ClientRowChangeEventHandler" msprop:Generator_TablePropName="Client" msprop:Generator_TableVarName="tableClient" msprop:Generator_RowDeletingName="ClientRowDeleting">
+        <xs:element name="Client" msprop:Generator_UserTableName="Client" msprop:Generator_RowDeletedName="ClientRowDeleted" msprop:Generator_RowChangedName="ClientRowChanged" msprop:Generator_RowClassName="ClientRow" msprop:Generator_RowChangingName="ClientRowChanging" msprop:Generator_RowEvArgName="ClientRowChangeEvent" msprop:Generator_RowEvHandlerName="ClientRowChangeEventHandler" msprop:Generator_TableClassName="ClientDataTable" msprop:Generator_TableVarName="tableClient" msprop:Generator_RowDeletingName="ClientRowDeleting" msprop:Generator_TablePropName="Client">
           <xs:complexType>
             <xs:sequence>
-              <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: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:simpleType>
                   <xs:restriction base="xs:string">
@@ -329,14 +342,14 @@
                 </xs:simpleType>
               </xs:element>
-              <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: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:sequence>
           </xs:complexType>
         </xs:element>
-        <xs:element name="HiveUser" msprop:Generator_UserTableName="HiveUser" msprop:Generator_RowDeletedName="HiveUserRowDeleted" msprop:Generator_TableClassName="HiveUserDataTable" msprop:Generator_RowChangedName="HiveUserRowChanged" msprop:Generator_RowClassName="HiveUserRow" msprop:Generator_RowChangingName="HiveUserRowChanging" msprop:Generator_RowEvArgName="HiveUserRowChangeEvent" msprop:Generator_RowEvHandlerName="HiveUserRowChangeEventHandler" msprop:Generator_TablePropName="HiveUser" msprop:Generator_TableVarName="tableHiveUser" msprop:Generator_RowDeletingName="HiveUserRowDeleting">
+        <xs:element name="HiveUser" msprop:Generator_UserTableName="HiveUser" msprop:Generator_RowDeletedName="HiveUserRowDeleted" msprop:Generator_RowChangedName="HiveUserRowChanged" msprop:Generator_RowClassName="HiveUserRow" msprop:Generator_RowChangingName="HiveUserRowChanging" msprop:Generator_RowEvArgName="HiveUserRowChangeEvent" msprop:Generator_RowEvHandlerName="HiveUserRowChangeEventHandler" msprop:Generator_TableClassName="HiveUserDataTable" msprop:Generator_TableVarName="tableHiveUser" msprop:Generator_RowDeletingName="HiveUserRowDeleting" msprop:Generator_TablePropName="HiveUser">
           <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="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_ColumnPropNameInRow="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0">
+              <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:simpleType>
                   <xs:restriction base="xs:string">
@@ -348,9 +361,9 @@
           </xs:complexType>
         </xs:element>
-        <xs:element name="PermissionOwner" msprop:Generator_UserTableName="PermissionOwner" msprop:Generator_RowDeletedName="PermissionOwnerRowDeleted" msprop:Generator_TableClassName="PermissionOwnerDataTable" msprop:Generator_RowChangedName="PermissionOwnerRowChanged" msprop:Generator_RowClassName="PermissionOwnerRow" msprop:Generator_RowChangingName="PermissionOwnerRowChanging" msprop:Generator_RowEvArgName="PermissionOwnerRowChangeEvent" msprop:Generator_RowEvHandlerName="PermissionOwnerRowChangeEventHandler" msprop:Generator_TablePropName="PermissionOwner" msprop:Generator_TableVarName="tablePermissionOwner" msprop:Generator_RowDeletingName="PermissionOwnerRowDeleting">
+        <xs:element name="PermissionOwner" msprop:Generator_UserTableName="PermissionOwner" msprop:Generator_RowDeletedName="PermissionOwnerRowDeleted" msprop:Generator_RowChangedName="PermissionOwnerRowChanged" msprop:Generator_RowClassName="PermissionOwnerRow" msprop:Generator_RowChangingName="PermissionOwnerRowChanging" msprop:Generator_RowEvArgName="PermissionOwnerRowChangeEvent" msprop:Generator_RowEvHandlerName="PermissionOwnerRowChangeEventHandler" msprop:Generator_TableClassName="PermissionOwnerDataTable" msprop:Generator_TableVarName="tablePermissionOwner" msprop:Generator_RowDeletingName="PermissionOwnerRowDeleting" msprop:Generator_TablePropName="PermissionOwner">
           <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_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: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:simpleType>
                   <xs:restriction base="xs:string">
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss	(revision 905)
@@ -5,10 +5,10 @@
      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="-10" 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="3" 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="2" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
-    <Shape ID="DesignTable:Client" ZOrder="1" X="39" Y="137" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" />
-    <Shape ID="DesignTable:HiveUser" ZOrder="5" X="480" Y="221" Height="122" Width="193" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
-    <Shape ID="DesignTable:PermissionOwner" ZOrder="4" X="442" Y="66" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
+    <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" />
   </Shapes>
   <Connectors>
@@ -25,13 +25,13 @@
       </RoutePoints>
     </Connector>
-    <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="3" LineWidth="11">
+    <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="5" LineWidth="11">
       <RoutePoints>
         <Point>
-          <X>521</X>
-          <Y>188</Y>
+          <X>438</X>
+          <Y>106</Y>
         </Point>
         <Point>
-          <X>521</X>
-          <Y>221</Y>
+          <X>438</X>
+          <Y>139</Y>
         </Point>
       </RoutePoints>
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs	(revision 905)
@@ -36,5 +36,5 @@
       AutoRestart = true)]
   class HiveDbTestApplication : ApplicationBase {
-    public override void Run() {
+    private void TestClientAdapter() {
       IClientAdapter clientAdapter =
         ServiceLocator.GetClientAdapter();
@@ -43,7 +43,7 @@
       client.Login = DateTime.Now;
       client.ClientId = Guid.NewGuid();
-      clientAdapter.UpdateClient(client); 
+      clientAdapter.UpdateClient(client);
 
-      ClientInfo clientRead = 
+      ClientInfo clientRead =
         clientAdapter.GetClientById(client.ClientId);
       Debug.Assert(
@@ -57,5 +57,5 @@
       Debug.Assert(
        clientRead != null &&
-       client.ClientId == clientRead.ClientId && 
+       client.ClientId == clientRead.ClientId &&
        clientRead.CpuSpeedPerCore == 2000);
 
@@ -68,4 +68,42 @@
       Debug.Assert(count - 1 == clients.Count);
     }
+
+    private void TestUserAdapter() {
+      IUserAdapter userAdapter =
+        ServiceLocator.GetUserAdapter();
+
+      User user = new User();
+      user.Name = "Stefan";
+
+      userAdapter.UpdateUser(user);
+
+      User userRead =
+        userAdapter.GetUserById(user.PermissionOwnerId);
+      Debug.Assert(
+        userRead != null &&
+        user.PermissionOwnerId == userRead.PermissionOwnerId);
+
+      user.Password = "passme";
+      userAdapter.UpdateUser(user);
+      userRead =
+        userAdapter.GetUserByName(user.Name);
+      Debug.Assert(
+       userRead != null &&
+       userRead.Name == user.Name &&
+       userRead.Password == user.Password);
+
+      ICollection<User> users = userAdapter.GetAllUsers();
+      int count = users.Count;
+
+      userAdapter.DeleteUser(user);
+
+      users = userAdapter.GetAllUsers();
+      Debug.Assert(count - 1 == users.Count);
+    }
+
+    public override void Run() {
+      TestClientAdapter();
+      TestUserAdapter();
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IPermissionOwnerAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IPermissionOwnerAdapter.cs	(revision 904)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IPermissionOwnerAdapter.cs	(revision 905)
@@ -42,5 +42,5 @@
     /// <param name="clientId"></param>
     /// <returns></returns>
-    PermissionOwner GetPermissionOwnerById(long resourceId);
+    PermissionOwner GetPermissionOwnerById(long permOwnerId);
 
     /// <summary>
