diff options
author | Justin Clarke Casey | 2008-01-06 01:56:29 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-06 01:56:29 +0000 |
commit | 679923ec871d98e5aa514734b2e23f9a00c58433 (patch) | |
tree | c2591d0a336339dd7ce5ca26d39abde68d0b81be /OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite | |
parent | Prim inventory phase 4. Properly recover the prim folder ID from storage. S... (diff) | |
download | opensim-SC-679923ec871d98e5aa514734b2e23f9a00c58433.zip opensim-SC-679923ec871d98e5aa514734b2e23f9a00c58433.tar.gz opensim-SC-679923ec871d98e5aa514734b2e23f9a00c58433.tar.bz2 opensim-SC-679923ec871d98e5aa514734b2e23f9a00c58433.tar.xz |
Factor out TaskInventoryItem
Diffstat (limited to 'OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 8bad730..b99b819 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -340,11 +340,11 @@ namespace OpenSim.DataStore.MonoSqlite | |||
340 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 340 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
341 | DataRow[] dbItemRows = dbItems.Select(sql); | 341 | DataRow[] dbItemRows = dbItems.Select(sql); |
342 | 342 | ||
343 | IList<SceneObjectPart.TaskInventoryItem> inventory = new List<SceneObjectPart.TaskInventoryItem>(); | 343 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
344 | 344 | ||
345 | foreach (DataRow row in dbItemRows) | 345 | foreach (DataRow row in dbItemRows) |
346 | { | 346 | { |
347 | SceneObjectPart.TaskInventoryItem item = buildItem(row); | 347 | TaskInventoryItem item = buildItem(row); |
348 | inventory.Add(item); | 348 | inventory.Add(item); |
349 | 349 | ||
350 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.name, item.item_id); | 350 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.name, item.item_id); |
@@ -897,9 +897,9 @@ namespace OpenSim.DataStore.MonoSqlite | |||
897 | /// </summary> | 897 | /// </summary> |
898 | /// <param name="row"></param> | 898 | /// <param name="row"></param> |
899 | /// <returns></returns> | 899 | /// <returns></returns> |
900 | private SceneObjectPart.TaskInventoryItem buildItem(DataRow row) | 900 | private TaskInventoryItem buildItem(DataRow row) |
901 | { | 901 | { |
902 | SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem(); | 902 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
903 | 903 | ||
904 | taskItem.item_id = new LLUUID((String)row["itemID"]); | 904 | taskItem.item_id = new LLUUID((String)row["itemID"]); |
905 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 905 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); |
@@ -1069,7 +1069,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
1069 | row["SitTargetOrientZ"] = sitTargetOrient.Z; | 1069 | row["SitTargetOrientZ"] = sitTargetOrient.Z; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | private void fillItemRow(DataRow row, SceneObjectPart.TaskInventoryItem taskItem) | 1072 | private void fillItemRow(DataRow row, TaskInventoryItem taskItem) |
1073 | { | 1073 | { |
1074 | row["itemID"] = taskItem.item_id; | 1074 | row["itemID"] = taskItem.item_id; |
1075 | row["primID"] = taskItem.ParentPartID; | 1075 | row["primID"] = taskItem.ParentPartID; |
@@ -1271,7 +1271,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
1271 | /// <param name="primID"></param> | 1271 | /// <param name="primID"></param> |
1272 | /// <param name="items"></param> | 1272 | /// <param name="items"></param> |
1273 | /// <returns></returns> | 1273 | /// <returns></returns> |
1274 | private void addPrimInventory(LLUUID primID, IDictionary<LLUUID, SceneObjectPart.TaskInventoryItem> items) | 1274 | private void addPrimInventory(LLUUID primID, IDictionary<LLUUID, TaskInventoryItem> items) |
1275 | { | 1275 | { |
1276 | MainLog.Instance.Verbose("DATASTORE", "Entered addPrimInventory with prim ID {0}", primID); | 1276 | MainLog.Instance.Verbose("DATASTORE", "Entered addPrimInventory with prim ID {0}", primID); |
1277 | 1277 | ||
@@ -1283,8 +1283,8 @@ namespace OpenSim.DataStore.MonoSqlite | |||
1283 | 1283 | ||
1284 | // Build structures for manipulation purposes | 1284 | // Build structures for manipulation purposes |
1285 | IDictionary<String, DataRow> dbItemsToRemove = new Dictionary<String, DataRow>(); | 1285 | IDictionary<String, DataRow> dbItemsToRemove = new Dictionary<String, DataRow>(); |
1286 | ICollection<SceneObjectPart.TaskInventoryItem> itemsToAdd | 1286 | ICollection<TaskInventoryItem> itemsToAdd |
1287 | = new List<SceneObjectPart.TaskInventoryItem>(); | 1287 | = new List<TaskInventoryItem>(); |
1288 | 1288 | ||
1289 | foreach (DataRow row in dbItemRows) | 1289 | foreach (DataRow row in dbItemRows) |
1290 | { | 1290 | { |
@@ -1319,7 +1319,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
1319 | } | 1319 | } |
1320 | 1320 | ||
1321 | // Insert items not already present | 1321 | // Insert items not already present |
1322 | foreach (SceneObjectPart.TaskInventoryItem newItem in itemsToAdd) | 1322 | foreach (TaskInventoryItem newItem in itemsToAdd) |
1323 | { | 1323 | { |
1324 | MainLog.Instance.Verbose( | 1324 | MainLog.Instance.Verbose( |
1325 | "DATASTORE", | 1325 | "DATASTORE", |