aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLInventoryData.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-07 23:15:35 +0000
committerSean Dague2008-04-07 23:15:35 +0000
commitf43681510725f5b95fcb864a1f3e4b744fcaf992 (patch)
tree2d34caa75488d1c608d1a21b4888cb0f264a6cba /OpenSim/Data/MySQL/MySQLInventoryData.cs
parentneeded to add 4 characters to support the dashes (diff)
downloadopensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.zip
opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.gz
opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.bz2
opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.xz
Refactor InventoryItemBase to do the following:
* wrap fields as Properties * rename some fields/properties to more sensible names * set style to PropName to match more standard C# approach
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index ceb73c5..6bb7a53 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -312,19 +312,19 @@ namespace OpenSim.Data.MySQL
312 { 312 {
313 InventoryItemBase item = new InventoryItemBase(); 313 InventoryItemBase item = new InventoryItemBase();
314 314
315 item.inventoryID = new LLUUID((string) reader["inventoryID"]); 315 item.ID = new LLUUID((string) reader["inventoryID"]);
316 item.assetID = new LLUUID((string) reader["assetID"]); 316 item.AssetID = new LLUUID((string) reader["assetID"]);
317 item.assetType = (int) reader["assetType"]; 317 item.AssetType = (int) reader["assetType"];
318 item.parentFolderID = new LLUUID((string) reader["parentFolderID"]); 318 item.Folder = new LLUUID((string) reader["parentFolderID"]);
319 item.avatarID = new LLUUID((string) reader["avatarID"]); 319 item.Owner = new LLUUID((string) reader["avatarID"]);
320 item.inventoryName = (string) reader["inventoryName"]; 320 item.Name = (string) reader["inventoryName"];
321 item.inventoryDescription = (string) reader["inventoryDescription"]; 321 item.Description = (string) reader["inventoryDescription"];
322 item.inventoryNextPermissions = (uint) reader["inventoryNextPermissions"]; 322 item.NextPermissions = (uint) reader["inventoryNextPermissions"];
323 item.inventoryCurrentPermissions = (uint) reader["inventoryCurrentPermissions"]; 323 item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
324 item.invType = (int) reader["invType"]; 324 item.InvType = (int) reader["invType"];
325 item.creatorsID = new LLUUID((string) reader["creatorID"]); 325 item.Creator = new LLUUID((string) reader["creatorID"]);
326 item.inventoryBasePermissions = (uint) reader["inventoryBasePermissions"]; 326 item.BasePermissions = (uint) reader["inventoryBasePermissions"];
327 item.inventoryEveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; 327 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
328 return item; 328 return item;
329 } 329 }
330 catch (MySqlException e) 330 catch (MySqlException e)
@@ -444,20 +444,20 @@ namespace OpenSim.Data.MySQL
444 try 444 try
445 { 445 {
446 MySqlCommand result = new MySqlCommand(sql, database.Connection); 446 MySqlCommand result = new MySqlCommand(sql, database.Connection);
447 result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToString()); 447 result.Parameters.AddWithValue("?inventoryID", item.ID.ToString());
448 result.Parameters.AddWithValue("?assetID", item.assetID.ToString()); 448 result.Parameters.AddWithValue("?assetID", item.AssetID.ToString());
449 result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); 449 result.Parameters.AddWithValue("?assetType", item.AssetType.ToString());
450 result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToString()); 450 result.Parameters.AddWithValue("?parentFolderID", item.Folder.ToString());
451 result.Parameters.AddWithValue("?avatarID", item.avatarID.ToString()); 451 result.Parameters.AddWithValue("?avatarID", item.Owner.ToString());
452 result.Parameters.AddWithValue("?inventoryName", item.inventoryName); 452 result.Parameters.AddWithValue("?inventoryName", item.Name);
453 result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); 453 result.Parameters.AddWithValue("?inventoryDescription", item.Description);
454 result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); 454 result.Parameters.AddWithValue("?inventoryNextPermissions", item.NextPermissions.ToString());
455 result.Parameters.AddWithValue("?inventoryCurrentPermissions", 455 result.Parameters.AddWithValue("?inventoryCurrentPermissions",
456 item.inventoryCurrentPermissions.ToString()); 456 item.CurrentPermissions.ToString());
457 result.Parameters.AddWithValue("?invType", item.invType); 457 result.Parameters.AddWithValue("?invType", item.InvType);
458 result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToString()); 458 result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
459 result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); 459 result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
460 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); 460 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
461 result.ExecuteNonQuery(); 461 result.ExecuteNonQuery();
462 result.Dispose(); 462 result.Dispose();
463 } 463 }