Changeset 905 for trunk/sources
- Timestamp:
- 12/04/08 16:49:55 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/PermissionOwnerAdapter.cs
r899 r905 34 34 new dsHiveServerTableAdapters.PermissionOwnerTableAdapter(); 35 35 36 private PermissionOwner Convert(dsHiveServer.PermissionOwnerRow row, 37 PermissionOwner permOwner) { 38 if (row != null && permOwner != null) { 39 permOwner.PermissionOwnerId = row.PermissionOwnerId; 40 41 if (!row.IsNameNull()) 42 permOwner.Name = row.Name; 43 else 44 permOwner.Name = String.Empty; 45 46 return permOwner; 47 } else 48 return null; 49 } 50 51 private dsHiveServer.PermissionOwnerRow Convert(PermissionOwner permOwner, 52 dsHiveServer.PermissionOwnerRow row) { 53 if (row != null && permOwner != null) { 54 row.PermissionOwnerId = permOwner.PermissionOwnerId; 55 row.Name = permOwner.Name; 56 57 return row; 58 } else 59 return null; 60 } 61 36 62 public void UpdatePermissionOwner(PermissionOwner permOwner) { 37 63 if (permOwner != null) { … … 57 83 internal bool FillPermissionOwner(PermissionOwner permOwner) { 58 84 if (permOwner != null) { 85 dsHiveServer.PermissionOwnerDataTable data = 86 adapter.GetDataById(permOwner.PermissionOwnerId); 87 if (data.Count == 1) { 88 dsHiveServer.PermissionOwnerRow row = 89 data[0]; 90 Convert(row, permOwner); 91 59 92 return true; 93 } 60 94 } 61 95 … … 63 97 } 64 98 65 public PermissionOwner GetPermissionOwnerById(long resourceId) { 66 throw new NotImplementedException(); 99 public PermissionOwner GetPermissionOwnerById(long permOwnerId) { 100 PermissionOwner permOwner = new PermissionOwner(); 101 permOwner.PermissionOwnerId = permOwnerId; 102 103 if (FillPermissionOwner(permOwner)) 104 return permOwner; 105 else 106 return null; 67 107 } 68 108 69 109 public ICollection<PermissionOwner> GetAllPermissionOwners() { 70 throw new NotImplementedException(); 110 ICollection<PermissionOwner> allPermissionOwners = 111 new List<PermissionOwner>(); 112 113 dsHiveServer.PermissionOwnerDataTable data = 114 adapter.GetData(); 115 116 foreach (dsHiveServer.PermissionOwnerRow row in data) { 117 PermissionOwner permOwner = new PermissionOwner(); 118 Convert(row, permOwner); 119 allPermissionOwners.Add(permOwner); 120 } 121 122 return allPermissionOwners; 71 123 } 72 124 -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs
r899 r905 68 68 69 69 public void UpdateUser(User user) { 70 throw new NotImplementedException(); 70 if (user != null) { 71 permOwnerAdapter.UpdatePermissionOwner(user); 72 73 dsHiveServer.HiveUserDataTable data = 74 adapter.GetDataById(user.PermissionOwnerId); 75 76 dsHiveServer.HiveUserRow row; 77 if (data.Count == 0) { 78 row = data.NewHiveUserRow(); 79 row.PermissionOwnerId = user.PermissionOwnerId; 80 data.AddHiveUserRow(row); 81 } else { 82 row = data[0]; 83 } 84 85 Convert(user, row); 86 87 adapter.Update(data); 88 } 71 89 } 72 90 73 91 public User GetUserById(long userId) { 74 throw new NotImplementedException(); 92 User user = new User(); 93 94 dsHiveServer.HiveUserDataTable data = 95 adapter.GetDataById(userId); 96 if (data.Count == 1) { 97 dsHiveServer.HiveUserRow row = 98 data[0]; 99 Convert(row, user); 100 101 return user; 102 } else { 103 return null; 104 } 75 105 } 76 106 77 107 public User GetUserByName(String name) { 78 throw new NotImplementedException(); 108 User user = new User(); 109 110 dsHiveServer.HiveUserDataTable data = 111 adapter.GetDataByName(name); 112 if (data.Count == 1) { 113 dsHiveServer.HiveUserRow row = 114 data[0]; 115 Convert(row, user); 116 117 return user; 118 } else { 119 return null; 120 } 79 121 } 80 122 81 123 public ICollection<User> GetAllUsers() { 82 throw new NotImplementedException(); 124 ICollection<User> allUsers = 125 new List<User>(); 126 127 dsHiveServer.HiveUserDataTable data = 128 adapter.GetData(); 129 130 foreach (dsHiveServer.HiveUserRow row in data) { 131 User user = new User(); 132 Convert(row, user); 133 allUsers.Add(user); 134 } 135 136 return allUsers; 83 137 } 84 138 85 139 public bool DeleteUser(User user) { 86 throw new NotImplementedException(); 140 //referential integrity will delete the client object 141 return permOwnerAdapter.DeletePermissionOwner(user); 87 142 } 88 143 -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.Designer.cs
r845 r905 3025 3025 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 3026 3026 private void InitCommandCollection() { 3027 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[ 2];3027 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; 3028 3028 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); 3029 3029 this._commandCollection[0].Connection = this.Connection; … … 3035 3035 this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; 3036 3036 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, "", "", "")); 3037 this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); 3038 this._commandCollection[2].Connection = this.Connection; 3039 this._commandCollection[2].CommandText = "SELECT HiveUser.PermissionOwnerId, HiveUser.Password\r\nFROM HiveUser I" + 3040 "NNER JOIN\r\n PermissionOwner ON HiveUser.PermissionOwnerId =" + 3041 " PermissionOwner.PermissionOwnerId\r\nWHERE (PermissionOwner.Name = @Name)"; 3042 this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; 3043 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, "", "", "")); 3037 3044 } 3038 3045 … … 3078 3085 this.Adapter.SelectCommand = this.CommandCollection[1]; 3079 3086 this.Adapter.SelectCommand.Parameters[0].Value = ((long)(Id)); 3087 dsHiveServer.HiveUserDataTable dataTable = new dsHiveServer.HiveUserDataTable(); 3088 this.Adapter.Fill(dataTable); 3089 return dataTable; 3090 } 3091 3092 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 3093 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 3094 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 3095 public virtual int FillByName(dsHiveServer.HiveUserDataTable dataTable, string Name) { 3096 this.Adapter.SelectCommand = this.CommandCollection[2]; 3097 if ((Name == null)) { 3098 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 3099 } 3100 else { 3101 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Name)); 3102 } 3103 if ((this.ClearBeforeFill == true)) { 3104 dataTable.Clear(); 3105 } 3106 int returnValue = this.Adapter.Fill(dataTable); 3107 return returnValue; 3108 } 3109 3110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 3111 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 3112 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 3113 public virtual dsHiveServer.HiveUserDataTable GetDataByName(string Name) { 3114 this.Adapter.SelectCommand = this.CommandCollection[2]; 3115 if ((Name == null)) { 3116 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 3117 } 3118 else { 3119 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Name)); 3120 } 3080 3121 dsHiveServer.HiveUserDataTable dataTable = new dsHiveServer.HiveUserDataTable(); 3081 3122 this.Adapter.Fill(dataTable); -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xsd
r845 r905 230 230 </SelectCommand> 231 231 </DbSource> 232 <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"> 233 <SelectCommand> 234 <DbCommand CommandType="Text" ModifiedByUser="true"> 235 <CommandText>SELECT HiveUser.PermissionOwnerId, HiveUser.Password 236 FROM HiveUser INNER JOIN 237 PermissionOwner ON HiveUser.PermissionOwnerId = PermissionOwner.PermissionOwnerId 238 WHERE (PermissionOwner.Name = @Name)</CommandText> 239 <Parameters> 240 <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" /> 241 </Parameters> 242 </DbCommand> 243 </SelectCommand> 244 </DbSource> 232 245 </Sources> 233 246 </TableAdapter> … … 303 316 <xs:complexType> 304 317 <xs:sequence> 305 <xs:element name="ResourceId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_Column VarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />306 <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_Column VarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">318 <xs:element name="ResourceId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" /> 319 <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0"> 307 320 <xs:simpleType> 308 321 <xs:restriction base="xs:string"> … … 314 327 </xs:complexType> 315 328 </xs:element> 316 <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">329 <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"> 317 330 <xs:complexType> 318 331 <xs:sequence> 319 <xs:element name="ResourceId" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_Column PropNameInRow="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" />320 <xs:element name="GUID" msdata:DataType="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_UserColumnName="GUID" msprop:Generator_Column PropNameInRow="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" type="xs:string" minOccurs="0" />321 <xs:element name="CPUSpeed" msprop:Generator_UserColumnName="CPUSpeed" msprop:Generator_Column PropNameInRow="CPUSpeed" msprop:Generator_ColumnVarNameInTable="columnCPUSpeed" msprop:Generator_ColumnPropNameInTable="CPUSpeedColumn" type="xs:int" minOccurs="0" />322 <xs:element name="Memory" msprop:Generator_UserColumnName="Memory" msprop:Generator_Column PropNameInRow="Memory" msprop:Generator_ColumnVarNameInTable="columnMemory" msprop:Generator_ColumnPropNameInTable="MemoryColumn" type="xs:int" minOccurs="0" />323 <xs:element name="Login" msprop:Generator_UserColumnName="Login" msprop:Generator_Column PropNameInRow="Login" msprop:Generator_ColumnVarNameInTable="columnLogin" msprop:Generator_ColumnPropNameInTable="LoginColumn" type="xs:dateTime" minOccurs="0" />324 <xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_Column PropNameInRow="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInTable="StatusColumn" minOccurs="0">332 <xs:element name="ResourceId" msprop:Generator_UserColumnName="ResourceId" msprop:Generator_ColumnVarNameInTable="columnResourceId" msprop:Generator_ColumnPropNameInRow="ResourceId" msprop:Generator_ColumnPropNameInTable="ResourceIdColumn" type="xs:long" /> 333 <xs:element name="GUID" msdata:DataType="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_UserColumnName="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" type="xs:string" minOccurs="0" /> 334 <xs:element name="CPUSpeed" msprop:Generator_UserColumnName="CPUSpeed" msprop:Generator_ColumnVarNameInTable="columnCPUSpeed" msprop:Generator_ColumnPropNameInRow="CPUSpeed" msprop:Generator_ColumnPropNameInTable="CPUSpeedColumn" type="xs:int" minOccurs="0" /> 335 <xs:element name="Memory" msprop:Generator_UserColumnName="Memory" msprop:Generator_ColumnVarNameInTable="columnMemory" msprop:Generator_ColumnPropNameInRow="Memory" msprop:Generator_ColumnPropNameInTable="MemoryColumn" type="xs:int" minOccurs="0" /> 336 <xs:element name="Login" msprop:Generator_UserColumnName="Login" msprop:Generator_ColumnVarNameInTable="columnLogin" msprop:Generator_ColumnPropNameInRow="Login" msprop:Generator_ColumnPropNameInTable="LoginColumn" type="xs:dateTime" minOccurs="0" /> 337 <xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInRow="Status" msprop:Generator_ColumnPropNameInTable="StatusColumn" minOccurs="0"> 325 338 <xs:simpleType> 326 339 <xs:restriction base="xs:string"> … … 329 342 </xs:simpleType> 330 343 </xs:element> 331 <xs:element name="ClientConfigId" msprop:Generator_UserColumnName="ClientConfigId" msprop:Generator_Column PropNameInRow="ClientConfigId" msprop:Generator_ColumnVarNameInTable="columnClientConfigId" msprop:Generator_ColumnPropNameInTable="ClientConfigIdColumn" type="xs:long" minOccurs="0" />332 <xs:element name="NumberOfCores" msprop:Generator_UserColumnName="NumberOfCores" msprop:Generator_Column PropNameInRow="NumberOfCores" msprop:Generator_ColumnVarNameInTable="columnNumberOfCores" msprop:Generator_ColumnPropNameInTable="NumberOfCoresColumn" type="xs:int" minOccurs="0" />344 <xs:element name="ClientConfigId" msprop:Generator_UserColumnName="ClientConfigId" msprop:Generator_ColumnVarNameInTable="columnClientConfigId" msprop:Generator_ColumnPropNameInRow="ClientConfigId" msprop:Generator_ColumnPropNameInTable="ClientConfigIdColumn" type="xs:long" minOccurs="0" /> 345 <xs:element name="NumberOfCores" msprop:Generator_UserColumnName="NumberOfCores" msprop:Generator_ColumnVarNameInTable="columnNumberOfCores" msprop:Generator_ColumnPropNameInRow="NumberOfCores" msprop:Generator_ColumnPropNameInTable="NumberOfCoresColumn" type="xs:int" minOccurs="0" /> 333 346 </xs:sequence> 334 347 </xs:complexType> 335 348 </xs:element> 336 <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">349 <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"> 337 350 <xs:complexType> 338 351 <xs:sequence> 339 <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_Column PropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />340 <xs:element name="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_Column PropNameInRow="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0">352 <xs:element name="PermissionOwnerId" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" /> 353 <xs:element name="Password" msprop:Generator_UserColumnName="Password" msprop:Generator_ColumnVarNameInTable="columnPassword" msprop:Generator_ColumnPropNameInRow="Password" msprop:Generator_ColumnPropNameInTable="PasswordColumn" minOccurs="0"> 341 354 <xs:simpleType> 342 355 <xs:restriction base="xs:string"> … … 348 361 </xs:complexType> 349 362 </xs:element> 350 <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">363 <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"> 351 364 <xs:complexType> 352 365 <xs:sequence> 353 <xs:element name="PermissionOwnerId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_Column PropNameInRow="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" />354 <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_Column PropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">366 <xs:element name="PermissionOwnerId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="PermissionOwnerId" msprop:Generator_ColumnVarNameInTable="columnPermissionOwnerId" msprop:Generator_ColumnPropNameInRow="PermissionOwnerId" msprop:Generator_ColumnPropNameInTable="PermissionOwnerIdColumn" type="xs:long" /> 367 <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0"> 355 368 <xs:simpleType> 356 369 <xs:restriction base="xs:string"> -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/dsHiveServer.xss
r845 r905 5 5 the code is regenerated. 6 6 </autogenerated>--> 7 <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">7 <DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="3" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> 8 8 <Shapes> 9 <Shape ID="DesignTable:Resource" ZOrder=" 2" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />10 <Shape ID="DesignTable:Client" ZOrder=" 1" X="39" Y="137" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" />11 <Shape ID="DesignTable:HiveUser" ZOrder=" 5" X="480" Y="221" Height="122" Width="193" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />12 <Shape ID="DesignTable:PermissionOwner" ZOrder=" 4" X="442" Y="66" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />9 <Shape ID="DesignTable:Resource" ZOrder="4" X="31" Y="-16" Height="122" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" /> 10 <Shape ID="DesignTable:Client" ZOrder="3" X="39" Y="137" Height="224" Width="176" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" /> 11 <Shape ID="DesignTable:HiveUser" ZOrder="2" X="336" Y="139" Height="139" Width="226" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" /> 12 <Shape ID="DesignTable:PermissionOwner" ZOrder="1" X="298" Y="-16" Height="122" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" /> 13 13 </Shapes> 14 14 <Connectors> … … 25 25 </RoutePoints> 26 26 </Connector> 27 <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder=" 3" LineWidth="11">27 <Connector ID="DesignRelation:User_is_a_PermissionOwner" ZOrder="5" LineWidth="11"> 28 28 <RoutePoints> 29 29 <Point> 30 <X> 521</X>31 <Y>1 88</Y>30 <X>438</X> 31 <Y>106</Y> 32 32 </Point> 33 33 <Point> 34 <X> 521</X>35 <Y> 221</Y>34 <X>438</X> 35 <Y>139</Y> 36 36 </Point> 37 37 </RoutePoints> -
trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs
r845 r905 36 36 AutoRestart = true)] 37 37 class HiveDbTestApplication : ApplicationBase { 38 p ublic override void Run() {38 private void TestClientAdapter() { 39 39 IClientAdapter clientAdapter = 40 40 ServiceLocator.GetClientAdapter(); … … 43 43 client.Login = DateTime.Now; 44 44 client.ClientId = Guid.NewGuid(); 45 clientAdapter.UpdateClient(client); 45 clientAdapter.UpdateClient(client); 46 46 47 ClientInfo clientRead = 47 ClientInfo clientRead = 48 48 clientAdapter.GetClientById(client.ClientId); 49 49 Debug.Assert( … … 57 57 Debug.Assert( 58 58 clientRead != null && 59 client.ClientId == clientRead.ClientId && 59 client.ClientId == clientRead.ClientId && 60 60 clientRead.CpuSpeedPerCore == 2000); 61 61 … … 68 68 Debug.Assert(count - 1 == clients.Count); 69 69 } 70 71 private void TestUserAdapter() { 72 IUserAdapter userAdapter = 73 ServiceLocator.GetUserAdapter(); 74 75 User user = new User(); 76 user.Name = "Stefan"; 77 78 userAdapter.UpdateUser(user); 79 80 User userRead = 81 userAdapter.GetUserById(user.PermissionOwnerId); 82 Debug.Assert( 83 userRead != null && 84 user.PermissionOwnerId == userRead.PermissionOwnerId); 85 86 user.Password = "passme"; 87 userAdapter.UpdateUser(user); 88 userRead = 89 userAdapter.GetUserByName(user.Name); 90 Debug.Assert( 91 userRead != null && 92 userRead.Name == user.Name && 93 userRead.Password == user.Password); 94 95 ICollection<User> users = userAdapter.GetAllUsers(); 96 int count = users.Count; 97 98 userAdapter.DeleteUser(user); 99 100 users = userAdapter.GetAllUsers(); 101 Debug.Assert(count - 1 == users.Count); 102 } 103 104 public override void Run() { 105 TestClientAdapter(); 106 TestUserAdapter(); 107 } 70 108 } 71 109 } -
trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IPermissionOwnerAdapter.cs
r845 r905 42 42 /// <param name="clientId"></param> 43 43 /// <returns></returns> 44 PermissionOwner GetPermissionOwnerById(long resourceId);44 PermissionOwner GetPermissionOwnerById(long permOwnerId); 45 45 46 46 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.