aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
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/SQLite
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/SQLite')
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs42
1 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index f0ff7c9..e8663b4 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -132,11 +132,11 @@ namespace OpenSim.Data.SQLite
132 { 132 {
133 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; 133 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
134 134
135 DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.folderID)); 135 DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.ID));
136 if (inventoryRow == null) 136 if (inventoryRow == null)
137 { 137 {
138 if (! add) 138 if (! add)
139 m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory folder: {0}", folder.folderID); 139 m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory folder: {0}", folder.ID);
140 140
141 inventoryRow = inventoryFolderTable.NewRow(); 141 inventoryRow = inventoryFolderTable.NewRow();
142 fillFolderRow(inventoryRow, folder); 142 fillFolderRow(inventoryRow, folder);
@@ -145,7 +145,7 @@ namespace OpenSim.Data.SQLite
145 else 145 else
146 { 146 {
147 if (add) 147 if (add)
148 m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory folder that already exists: {0}", folder.folderID); 148 m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory folder that already exists: {0}", folder.ID);
149 149
150 fillFolderRow(inventoryRow, folder); 150 fillFolderRow(inventoryRow, folder);
151 } 151 }
@@ -160,7 +160,7 @@ namespace OpenSim.Data.SQLite
160 { 160 {
161 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; 161 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
162 162
163 DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.folderID)); 163 DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.ID));
164 if (inventoryRow == null) 164 if (inventoryRow == null)
165 { 165 {
166 inventoryRow = inventoryFolderTable.NewRow(); 166 inventoryRow = inventoryFolderTable.NewRow();
@@ -339,7 +339,7 @@ namespace OpenSim.Data.SQLite
339 getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); 339 getInventoryFolders(ref folders, Util.ToRawUuidString(parentID));
340 340
341 for (int i = 0; i < folders.Count; i++) 341 for (int i = 0; i < folders.Count; i++)
342 getInventoryFolders(ref folders, Util.ToRawUuidString(folders[i].folderID)); 342 getInventoryFolders(ref folders, Util.ToRawUuidString(folders[i].ID));
343 343
344 return folders; 344 return folders;
345 } 345 }
@@ -488,10 +488,10 @@ namespace OpenSim.Data.SQLite
488 //Delete all sub-folders 488 //Delete all sub-folders
489 foreach (InventoryFolderBase f in subFolders) 489 foreach (InventoryFolderBase f in subFolders)
490 { 490 {
491 inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.folderID)); 491 inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.ID));
492 if (inventoryRow != null) 492 if (inventoryRow != null)
493 { 493 {
494 deleteItemsInFolder(Util.ToRawUuidString(f.folderID)); 494 deleteItemsInFolder(Util.ToRawUuidString(f.ID));
495 inventoryRow.Delete(); 495 inventoryRow.Delete();
496 } 496 }
497 } 497 }
@@ -590,29 +590,29 @@ namespace OpenSim.Data.SQLite
590 private InventoryFolderBase buildFolder(DataRow row) 590 private InventoryFolderBase buildFolder(DataRow row)
591 { 591 {
592 InventoryFolderBase folder = new InventoryFolderBase(); 592 InventoryFolderBase folder = new InventoryFolderBase();
593 folder.folderID = new LLUUID((string) row["UUID"]); 593 folder.ID = new LLUUID((string) row["UUID"]);
594 folder.name = (string) row["name"]; 594 folder.Name = (string) row["name"];
595 folder.agentID = new LLUUID((string) row["agentID"]); 595 folder.AgentID = new LLUUID((string) row["agentID"]);
596 folder.parentID = new LLUUID((string) row["parentID"]); 596 folder.ParentID = new LLUUID((string) row["parentID"]);
597 folder.type = Convert.ToInt16(row["type"]); 597 folder.Type = Convert.ToInt16(row["type"]);
598 folder.version = Convert.ToUInt16(row["version"]); 598 folder.Version = Convert.ToUInt16(row["version"]);
599 return folder; 599 return folder;
600 } 600 }
601 601
602 private void fillFolderRow(DataRow row, InventoryFolderBase folder) 602 private void fillFolderRow(DataRow row, InventoryFolderBase folder)
603 { 603 {
604 row["UUID"] = Util.ToRawUuidString(folder.folderID); 604 row["UUID"] = Util.ToRawUuidString(folder.ID);
605 row["name"] = folder.name; 605 row["name"] = folder.Name;
606 row["agentID"] = Util.ToRawUuidString(folder.agentID); 606 row["agentID"] = Util.ToRawUuidString(folder.AgentID);
607 row["parentID"] = Util.ToRawUuidString(folder.parentID); 607 row["parentID"] = Util.ToRawUuidString(folder.ParentID);
608 row["type"] = folder.type; 608 row["type"] = folder.Type;
609 row["version"] = folder.version; 609 row["version"] = folder.Version;
610 } 610 }
611 611
612 private void moveFolderRow(DataRow row, InventoryFolderBase folder) 612 private void moveFolderRow(DataRow row, InventoryFolderBase folder)
613 { 613 {
614 row["UUID"] = Util.ToRawUuidString(folder.folderID); 614 row["UUID"] = Util.ToRawUuidString(folder.ID);
615 row["parentID"] = Util.ToRawUuidString(folder.parentID); 615 row["parentID"] = Util.ToRawUuidString(folder.ParentID);
616 } 616 }
617 617
618 /*********************************************************************** 618 /***********************************************************************