aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs82
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs52
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs62
4 files changed, 102 insertions, 102 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index df7020d..15078aa 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -301,19 +301,19 @@ namespace OpenSim.Data.MSSQL
301 { 301 {
302 InventoryItemBase item = new InventoryItemBase(); 302 InventoryItemBase item = new InventoryItemBase();
303 303
304 item.inventoryID = new LLUUID((string) reader["inventoryID"]); 304 item.ID = new LLUUID((string) reader["inventoryID"]);
305 item.assetID = new LLUUID((string) reader["assetID"]); 305 item.AssetID = new LLUUID((string) reader["assetID"]);
306 item.assetType = (int) reader["assetType"]; 306 item.AssetType = (int) reader["assetType"];
307 item.parentFolderID = new LLUUID((string) reader["parentFolderID"]); 307 item.Folder = new LLUUID((string) reader["parentFolderID"]);
308 item.avatarID = new LLUUID((string) reader["avatarID"]); 308 item.Owner = new LLUUID((string) reader["avatarID"]);
309 item.inventoryName = (string) reader["inventoryName"]; 309 item.Name = (string) reader["inventoryName"];
310 item.inventoryDescription = (string) reader["inventoryDescription"]; 310 item.Description = (string) reader["inventoryDescription"];
311 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); 311 item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]);
312 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); 312 item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]);
313 item.invType = (int) reader["invType"]; 313 item.InvType = (int) reader["invType"];
314 item.creatorsID = new LLUUID((string) reader["creatorID"]); 314 item.Creator = new LLUUID((string) reader["creatorID"]);
315 item.inventoryBasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); 315 item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
316 item.inventoryEveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); 316 item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
317 return item; 317 return item;
318 } 318 }
319 catch (SqlException e) 319 catch (SqlException e)
@@ -425,7 +425,7 @@ namespace OpenSim.Data.MSSQL
425 /// <param name="item">The inventory item</param> 425 /// <param name="item">The inventory item</param>
426 public void addInventoryItem(InventoryItemBase item) 426 public void addInventoryItem(InventoryItemBase item)
427 { 427 {
428 if (getInventoryItem(item.inventoryID) != null) 428 if (getInventoryItem(item.ID) != null)
429 { 429 {
430 updateInventoryItem(item); 430 updateInventoryItem(item);
431 return; 431 return;
@@ -440,19 +440,19 @@ namespace OpenSim.Data.MSSQL
440 try 440 try
441 { 441 {
442 Dictionary<string, string> param = new Dictionary<string, string>(); 442 Dictionary<string, string> param = new Dictionary<string, string>();
443 param["inventoryID"] = item.inventoryID.ToString(); 443 param["inventoryID"] = item.ID.ToString();
444 param["assetID"] = item.assetID.ToString(); 444 param["assetID"] = item.AssetID.ToString();
445 param["assetType"] = item.assetType.ToString(); 445 param["assetType"] = item.AssetType.ToString();
446 param["parentFolderID"] = item.parentFolderID.ToString(); 446 param["parentFolderID"] = item.Folder.ToString();
447 param["avatarID"] = item.avatarID.ToString(); 447 param["avatarID"] = item.Owner.ToString();
448 param["inventoryName"] = item.inventoryName; 448 param["inventoryName"] = item.Name;
449 param["inventoryDescription"] = item.inventoryDescription; 449 param["inventoryDescription"] = item.Description;
450 param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); 450 param["inventoryNextPermissions"] = item.NextPermissions.ToString();
451 param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); 451 param["inventoryCurrentPermissions"] = item.CurrentPermissions.ToString();
452 param["invType"] = Convert.ToString(item.invType); 452 param["invType"] = Convert.ToString(item.InvType);
453 param["creatorID"] = item.creatorsID.ToString(); 453 param["creatorID"] = item.Creator.ToString();
454 param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions); 454 param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions);
455 param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions); 455 param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions);
456 456
457 IDbCommand result = database.Query(sql, param); 457 IDbCommand result = database.Query(sql, param);
458 result.ExecuteNonQuery(); 458 result.ExecuteNonQuery();
@@ -484,20 +484,20 @@ namespace OpenSim.Data.MSSQL
484 "inventoryBasePermissions = @inventoryBasePermissions" + 484 "inventoryBasePermissions = @inventoryBasePermissions" +
485 "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + 485 "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " +
486 "inventoryID = @keyInventoryID;", database.getConnection()); 486 "inventoryID = @keyInventoryID;", database.getConnection());
487 SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString()); 487 SqlParameter param1 = new SqlParameter("@inventoryID", item.ID.ToString());
488 SqlParameter param2 = new SqlParameter("@assetID", item.assetID); 488 SqlParameter param2 = new SqlParameter("@assetID", item.AssetID);
489 SqlParameter param3 = new SqlParameter("@assetType", item.assetType); 489 SqlParameter param3 = new SqlParameter("@assetType", item.AssetType);
490 SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID); 490 SqlParameter param4 = new SqlParameter("@parentFolderID", item.Folder);
491 SqlParameter param5 = new SqlParameter("@avatarID", item.avatarID); 491 SqlParameter param5 = new SqlParameter("@avatarID", item.Owner);
492 SqlParameter param6 = new SqlParameter("@inventoryName", item.inventoryName); 492 SqlParameter param6 = new SqlParameter("@inventoryName", item.Name);
493 SqlParameter param7 = new SqlParameter("@inventoryDescription", item.inventoryDescription); 493 SqlParameter param7 = new SqlParameter("@inventoryDescription", item.Description);
494 SqlParameter param8 = new SqlParameter("@inventoryNextPermissions", item.inventoryNextPermissions); 494 SqlParameter param8 = new SqlParameter("@inventoryNextPermissions", item.NextPermissions);
495 SqlParameter param9 = new SqlParameter("@inventoryCurrentPermissions", item.inventoryCurrentPermissions); 495 SqlParameter param9 = new SqlParameter("@inventoryCurrentPermissions", item.CurrentPermissions);
496 SqlParameter param10 = new SqlParameter("@invType", item.invType); 496 SqlParameter param10 = new SqlParameter("@invType", item.InvType);
497 SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); 497 SqlParameter param11 = new SqlParameter("@creatorID", item.Creator);
498 SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); 498 SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.BasePermissions);
499 SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); 499 SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.EveryOnePermissions);
500 SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString()); 500 SqlParameter param14 = new SqlParameter("@keyInventoryID", item.ID.ToString());
501 command.Parameters.Add(param1); 501 command.Parameters.Add(param1);
502 command.Parameters.Add(param2); 502 command.Parameters.Add(param2);
503 command.Parameters.Add(param3); 503 command.Parameters.Add(param3);
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 }
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index d6cd664..ba1d3e9 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Data.NHibernate
112 /// <param name="item">The item to be created</param> 112 /// <param name="item">The item to be created</param>
113 public void addInventoryItem(InventoryItemBase item) 113 public void addInventoryItem(InventoryItemBase item)
114 { 114 {
115 if (!ExistsItem(item.inventoryID)) { 115 if (!ExistsItem(item.ID)) {
116 using(ISession session = factory.OpenSession()) { 116 using(ISession session = factory.OpenSession()) {
117 using(ITransaction transaction = session.BeginTransaction()) { 117 using(ITransaction transaction = session.BeginTransaction()) {
118 session.Save(item); 118 session.Save(item);
@@ -120,7 +120,7 @@ namespace OpenSim.Data.NHibernate
120 } 120 }
121 } 121 }
122 } else { 122 } else {
123 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists, updating instead", item.inventoryID); 123 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists, updating instead", item.ID);
124 updateInventoryItem(item); 124 updateInventoryItem(item);
125 } 125 }
126 } 126 }
@@ -131,7 +131,7 @@ namespace OpenSim.Data.NHibernate
131 /// <param name="item">The updated item</param> 131 /// <param name="item">The updated item</param>
132 public void updateInventoryItem(InventoryItemBase item) 132 public void updateInventoryItem(InventoryItemBase item)
133 { 133 {
134 if (ExistsItem(item.inventoryID)) { 134 if (ExistsItem(item.ID)) {
135 using(ISession session = factory.OpenSession()) { 135 using(ISession session = factory.OpenSession()) {
136 using(ITransaction transaction = session.BeginTransaction()) { 136 using(ITransaction transaction = session.BeginTransaction()) {
137 session.Update(item); 137 session.Update(item);
@@ -139,7 +139,7 @@ namespace OpenSim.Data.NHibernate
139 } 139 }
140 } 140 }
141 } else { 141 } else {
142 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists", item.inventoryID); 142 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists", item.ID);
143 } 143 }
144 } 144 }
145 145
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index 1554aa3..f0ff7c9 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -91,39 +91,39 @@ namespace OpenSim.Data.SQLite
91 public InventoryItemBase buildItem(DataRow row) 91 public InventoryItemBase buildItem(DataRow row)
92 { 92 {
93 InventoryItemBase item = new InventoryItemBase(); 93 InventoryItemBase item = new InventoryItemBase();
94 item.inventoryID = new LLUUID((string) row["UUID"]); 94 item.ID = new LLUUID((string) row["UUID"]);
95 item.assetID = new LLUUID((string) row["assetID"]); 95 item.AssetID = new LLUUID((string) row["assetID"]);
96 item.assetType = Convert.ToInt32(row["assetType"]); 96 item.AssetType = Convert.ToInt32(row["assetType"]);
97 item.invType = Convert.ToInt32(row["invType"]); 97 item.InvType = Convert.ToInt32(row["invType"]);
98 item.parentFolderID = new LLUUID((string) row["parentFolderID"]); 98 item.Folder = new LLUUID((string) row["parentFolderID"]);
99 item.avatarID = new LLUUID((string) row["avatarID"]); 99 item.Owner = new LLUUID((string) row["avatarID"]);
100 item.creatorsID = new LLUUID((string) row["creatorsID"]); 100 item.Creator = new LLUUID((string) row["creatorsID"]);
101 item.inventoryName = (string) row["inventoryName"]; 101 item.Name = (string) row["inventoryName"];
102 item.inventoryDescription = (string) row["inventoryDescription"]; 102 item.Description = (string) row["inventoryDescription"];
103 103
104 item.inventoryNextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]); 104 item.NextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]);
105 item.inventoryCurrentPermissions = Convert.ToUInt32(row["inventoryCurrentPermissions"]); 105 item.CurrentPermissions = Convert.ToUInt32(row["inventoryCurrentPermissions"]);
106 item.inventoryBasePermissions = Convert.ToUInt32(row["inventoryBasePermissions"]); 106 item.BasePermissions = Convert.ToUInt32(row["inventoryBasePermissions"]);
107 item.inventoryEveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); 107 item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]);
108 return item; 108 return item;
109 } 109 }
110 110
111 private void fillItemRow(DataRow row, InventoryItemBase item) 111 private void fillItemRow(DataRow row, InventoryItemBase item)
112 { 112 {
113 row["UUID"] = Util.ToRawUuidString(item.inventoryID); 113 row["UUID"] = Util.ToRawUuidString(item.ID);
114 row["assetID"] = Util.ToRawUuidString(item.assetID); 114 row["assetID"] = Util.ToRawUuidString(item.AssetID);
115 row["assetType"] = item.assetType; 115 row["assetType"] = item.AssetType;
116 row["invType"] = item.invType; 116 row["invType"] = item.InvType;
117 row["parentFolderID"] = Util.ToRawUuidString(item.parentFolderID); 117 row["parentFolderID"] = Util.ToRawUuidString(item.Folder);
118 row["avatarID"] = Util.ToRawUuidString(item.avatarID); 118 row["avatarID"] = Util.ToRawUuidString(item.Owner);
119 row["creatorsID"] = Util.ToRawUuidString(item.creatorsID); 119 row["creatorsID"] = Util.ToRawUuidString(item.Creator);
120 row["inventoryName"] = item.inventoryName; 120 row["inventoryName"] = item.Name;
121 row["inventoryDescription"] = item.inventoryDescription; 121 row["inventoryDescription"] = item.Description;
122 122
123 row["inventoryNextPermissions"] = item.inventoryNextPermissions; 123 row["inventoryNextPermissions"] = item.NextPermissions;
124 row["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions; 124 row["inventoryCurrentPermissions"] = item.CurrentPermissions;
125 row["inventoryBasePermissions"] = item.inventoryBasePermissions; 125 row["inventoryBasePermissions"] = item.BasePermissions;
126 row["inventoryEveryOnePermissions"] = item.inventoryEveryOnePermissions; 126 row["inventoryEveryOnePermissions"] = item.EveryOnePermissions;
127 } 127 }
128 128
129 private void addFolder(InventoryFolderBase folder, bool add) 129 private void addFolder(InventoryFolderBase folder, bool add)
@@ -182,11 +182,11 @@ namespace OpenSim.Data.SQLite
182 { 182 {
183 DataTable inventoryItemTable = ds.Tables["inventoryitems"]; 183 DataTable inventoryItemTable = ds.Tables["inventoryitems"];
184 184
185 DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.inventoryID)); 185 DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.ID));
186 if (inventoryRow == null) 186 if (inventoryRow == null)
187 { 187 {
188 if (! add) 188 if (! add)
189 m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.inventoryID); 189 m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID);
190 190
191 inventoryRow = inventoryItemTable.NewRow(); 191 inventoryRow = inventoryItemTable.NewRow();
192 fillItemRow(inventoryRow, item); 192 fillItemRow(inventoryRow, item);
@@ -195,7 +195,7 @@ namespace OpenSim.Data.SQLite
195 else 195 else
196 { 196 {
197 if (add) 197 if (add)
198 m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.inventoryID); 198 m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID);
199 199
200 fillItemRow(inventoryRow, item); 200 fillItemRow(inventoryRow, item);
201 } 201 }
@@ -439,7 +439,7 @@ namespace OpenSim.Data.SQLite
439 List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId)); 439 List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId));
440 440
441 foreach (InventoryItemBase i in items) 441 foreach (InventoryItemBase i in items)
442 deleteInventoryItem(Util.ToRawUuidString(i.inventoryID)); 442 deleteInventoryItem(Util.ToRawUuidString(i.ID));
443 } 443 }
444 444
445 /// <summary> 445 /// <summary>