diff options
author | Sean Dague | 2008-04-07 23:27:05 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-07 23:27:05 +0000 |
commit | 5ee75998ce4d941efd937848d28f3a4dac6ba6cc (patch) | |
tree | f29a100cb8ab3715c82f0aec4fee9f968f210405 /OpenSim/Data/MySQL/MySQLInventoryData.cs | |
parent | Refactor InventoryItemBase to do the following: (diff) | |
download | opensim-SC-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.zip opensim-SC-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.gz opensim-SC-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.bz2 opensim-SC-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.xz |
more refactoring, this time on InventoryFolderBase
* wrap attributes in properties
* clean up names a little bit
* clean up name styles
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 6bb7a53..6cc8998 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -381,12 +381,12 @@ namespace OpenSim.Data.MySQL | |||
381 | try | 381 | try |
382 | { | 382 | { |
383 | InventoryFolderBase folder = new InventoryFolderBase(); | 383 | InventoryFolderBase folder = new InventoryFolderBase(); |
384 | folder.agentID = new LLUUID((string) reader["agentID"]); | 384 | folder.AgentID = new LLUUID((string) reader["agentID"]); |
385 | folder.parentID = new LLUUID((string) reader["parentFolderID"]); | 385 | folder.ParentID = new LLUUID((string) reader["parentFolderID"]); |
386 | folder.folderID = new LLUUID((string) reader["folderID"]); | 386 | folder.ID = new LLUUID((string) reader["folderID"]); |
387 | folder.name = (string) reader["folderName"]; | 387 | folder.Name = (string) reader["folderName"]; |
388 | folder.type = (short) reader["type"]; | 388 | folder.Type = (short) reader["type"]; |
389 | folder.version = (ushort) ((int) reader["version"]); | 389 | folder.Version = (ushort) ((int) reader["version"]); |
390 | return folder; | 390 | return folder; |
391 | } | 391 | } |
392 | catch (Exception e) | 392 | catch (Exception e) |
@@ -507,12 +507,12 @@ namespace OpenSim.Data.MySQL | |||
507 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; | 507 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; |
508 | 508 | ||
509 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); | 509 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); |
510 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); | 510 | cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString()); |
511 | cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToString()); | 511 | cmd.Parameters.AddWithValue("?agentID", folder.AgentID.ToString()); |
512 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); | 512 | cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString()); |
513 | cmd.Parameters.AddWithValue("?folderName", folder.name); | 513 | cmd.Parameters.AddWithValue("?folderName", folder.Name); |
514 | cmd.Parameters.AddWithValue("?type", (short) folder.type); | 514 | cmd.Parameters.AddWithValue("?type", (short) folder.Type); |
515 | cmd.Parameters.AddWithValue("?version", folder.version); | 515 | cmd.Parameters.AddWithValue("?version", folder.Version); |
516 | 516 | ||
517 | try | 517 | try |
518 | { | 518 | { |
@@ -545,8 +545,8 @@ namespace OpenSim.Data.MySQL | |||
545 | "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; | 545 | "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; |
546 | 546 | ||
547 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); | 547 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); |
548 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); | 548 | cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString()); |
549 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); | 549 | cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString()); |
550 | 550 | ||
551 | try | 551 | try |
552 | { | 552 | { |
@@ -581,7 +581,7 @@ namespace OpenSim.Data.MySQL | |||
581 | getInventoryFolders(ref folders, parentID); | 581 | getInventoryFolders(ref folders, parentID); |
582 | 582 | ||
583 | for (int i = 0; i < folders.Count; i++) | 583 | for (int i = 0; i < folders.Count; i++) |
584 | getInventoryFolders(ref folders, folders[i].folderID); | 584 | getInventoryFolders(ref folders, folders[i].ID); |
585 | 585 | ||
586 | return folders; | 586 | return folders; |
587 | } | 587 | } |
@@ -637,8 +637,8 @@ namespace OpenSim.Data.MySQL | |||
637 | //Delete all sub-folders | 637 | //Delete all sub-folders |
638 | foreach (InventoryFolderBase f in subFolders) | 638 | foreach (InventoryFolderBase f in subFolders) |
639 | { | 639 | { |
640 | deleteOneFolder(f.folderID); | 640 | deleteOneFolder(f.ID); |
641 | deleteItemsInFolder(f.folderID); | 641 | deleteItemsInFolder(f.ID); |
642 | } | 642 | } |
643 | 643 | ||
644 | //Delete the actual row | 644 | //Delete the actual row |