aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
authorSean Dague2008-04-07 23:27:05 +0000
committerSean Dague2008-04-07 23:27:05 +0000
commit5ee75998ce4d941efd937848d28f3a4dac6ba6cc (patch)
treef29a100cb8ab3715c82f0aec4fee9f968f210405 /OpenSim/Data/MSSQL
parentRefactor InventoryItemBase to do the following: (diff)
downloadopensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.zip
opensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.gz
opensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.bz2
opensim-SC_OLD-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/MSSQL')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs50
1 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 15078aa..f53d9f9 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -370,12 +370,12 @@ namespace OpenSim.Data.MSSQL
370 try 370 try
371 { 371 {
372 InventoryFolderBase folder = new InventoryFolderBase(); 372 InventoryFolderBase folder = new InventoryFolderBase();
373 folder.agentID = new LLUUID((string) reader["agentID"]); 373 folder.AgentID = new LLUUID((string) reader["agentID"]);
374 folder.parentID = new LLUUID((string) reader["parentFolderID"]); 374 folder.ParentID = new LLUUID((string) reader["parentFolderID"]);
375 folder.folderID = new LLUUID((string) reader["folderID"]); 375 folder.ID = new LLUUID((string) reader["folderID"]);
376 folder.name = (string) reader["folderName"]; 376 folder.Name = (string) reader["folderName"];
377 folder.type = (short) reader["type"]; 377 folder.Type = (short) reader["type"];
378 folder.version = (ushort) ((int) reader["version"]); 378 folder.Version = (ushort) ((int) reader["version"]);
379 return folder; 379 return folder;
380 } 380 }
381 catch (Exception e) 381 catch (Exception e)
@@ -557,12 +557,12 @@ namespace OpenSim.Data.MSSQL
557 557
558 558
559 Dictionary<string, string> param = new Dictionary<string, string>(); 559 Dictionary<string, string> param = new Dictionary<string, string>();
560 param["folderID"] = folder.folderID.ToString(); 560 param["folderID"] = folder.ID.ToString();
561 param["agentID"] = folder.agentID.ToString(); 561 param["agentID"] = folder.AgentID.ToString();
562 param["parentFolderID"] = folder.parentID.ToString(); 562 param["parentFolderID"] = folder.ParentID.ToString();
563 param["folderName"] = folder.name; 563 param["folderName"] = folder.Name;
564 param["type"] = Convert.ToString(folder.type); 564 param["type"] = Convert.ToString(folder.Type);
565 param["version"] = Convert.ToString(folder.version); 565 param["version"] = Convert.ToString(folder.Version);
566 566
567 try 567 try
568 { 568 {
@@ -589,13 +589,13 @@ namespace OpenSim.Data.MSSQL
589 "type = @type," + 589 "type = @type," +
590 "version = @version where " + 590 "version = @version where " +
591 "folderID = @keyFolderID;", database.getConnection()); 591 "folderID = @keyFolderID;", database.getConnection());
592 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); 592 SqlParameter param1 = new SqlParameter("@folderID", folder.ID.ToString());
593 SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString()); 593 SqlParameter param2 = new SqlParameter("@agentID", folder.AgentID.ToString());
594 SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); 594 SqlParameter param3 = new SqlParameter("@parentFolderID", folder.ParentID.ToString());
595 SqlParameter param4 = new SqlParameter("@folderName", folder.name); 595 SqlParameter param4 = new SqlParameter("@folderName", folder.Name);
596 SqlParameter param5 = new SqlParameter("@type", folder.type); 596 SqlParameter param5 = new SqlParameter("@type", folder.Type);
597 SqlParameter param6 = new SqlParameter("@version", folder.version); 597 SqlParameter param6 = new SqlParameter("@version", folder.Version);
598 SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); 598 SqlParameter param7 = new SqlParameter("@keyFolderID", folder.ID.ToString());
599 command.Parameters.Add(param1); 599 command.Parameters.Add(param1);
600 command.Parameters.Add(param2); 600 command.Parameters.Add(param2);
601 command.Parameters.Add(param3); 601 command.Parameters.Add(param3);
@@ -623,9 +623,9 @@ namespace OpenSim.Data.MSSQL
623 SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + 623 SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
624 "parentFolderID = @parentFolderID," + 624 "parentFolderID = @parentFolderID," +
625 "folderID = @keyFolderID;", database.getConnection()); 625 "folderID = @keyFolderID;", database.getConnection());
626 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); 626 SqlParameter param1 = new SqlParameter("@folderID", folder.ID.ToString());
627 SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); 627 SqlParameter param2 = new SqlParameter("@parentFolderID", folder.ParentID.ToString());
628 SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); 628 SqlParameter param3 = new SqlParameter("@keyFolderID", folder.ID.ToString());
629 command.Parameters.Add(param1); 629 command.Parameters.Add(param1);
630 command.Parameters.Add(param2); 630 command.Parameters.Add(param2);
631 command.Parameters.Add(param3); 631 command.Parameters.Add(param3);
@@ -660,7 +660,7 @@ namespace OpenSim.Data.MSSQL
660 getInventoryFolders(ref folders, parentID); 660 getInventoryFolders(ref folders, parentID);
661 661
662 for (int i = 0; i < folders.Count; i++) 662 for (int i = 0; i < folders.Count; i++)
663 getInventoryFolders(ref folders, folders[i].folderID); 663 getInventoryFolders(ref folders, folders[i].ID);
664 664
665 return folders; 665 return folders;
666 } 666 }
@@ -716,8 +716,8 @@ namespace OpenSim.Data.MSSQL
716 //Delete all sub-folders 716 //Delete all sub-folders
717 foreach (InventoryFolderBase f in subFolders) 717 foreach (InventoryFolderBase f in subFolders)
718 { 718 {
719 deleteOneFolder(f.folderID); 719 deleteOneFolder(f.ID);
720 deleteItemsInFolder(f.folderID); 720 deleteItemsInFolder(f.ID);
721 } 721 }
722 722
723 //Delete the actual row 723 //Delete the actual row