diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle.
* This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big!
* Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateInventoryData.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 657a7b2..20dad1a 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -30,7 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Text.RegularExpressions; | 32 | using System.Text.RegularExpressions; |
33 | using libsecondlife; | 33 | using OpenMetaverse; |
34 | using log4net; | 34 | using log4net; |
35 | using NHibernate; | 35 | using NHibernate; |
36 | using NHibernate.Cfg; | 36 | using NHibernate.Cfg; |
@@ -105,7 +105,7 @@ namespace OpenSim.Data.NHibernate | |||
105 | /// </summary> | 105 | /// </summary> |
106 | /// <param name="item">The UUID of the item to be returned</param> | 106 | /// <param name="item">The UUID of the item to be returned</param> |
107 | /// <returns>A class containing item information</returns> | 107 | /// <returns>A class containing item information</returns> |
108 | public InventoryItemBase getInventoryItem(LLUUID item) | 108 | public InventoryItemBase getInventoryItem(UUID item) |
109 | { | 109 | { |
110 | try | 110 | try |
111 | { | 111 | { |
@@ -163,7 +163,7 @@ namespace OpenSim.Data.NHibernate | |||
163 | /// | 163 | /// |
164 | /// </summary> | 164 | /// </summary> |
165 | /// <param name="item"></param> | 165 | /// <param name="item"></param> |
166 | public void deleteInventoryItem(LLUUID itemID) | 166 | public void deleteInventoryItem(UUID itemID) |
167 | { | 167 | { |
168 | using (ITransaction transaction = session.BeginTransaction()) | 168 | using (ITransaction transaction = session.BeginTransaction()) |
169 | { | 169 | { |
@@ -177,7 +177,7 @@ namespace OpenSim.Data.NHibernate | |||
177 | /// </summary> | 177 | /// </summary> |
178 | /// <param name="folder">The UUID of the folder to be returned</param> | 178 | /// <param name="folder">The UUID of the folder to be returned</param> |
179 | /// <returns>A class containing folder information</returns> | 179 | /// <returns>A class containing folder information</returns> |
180 | public InventoryFolderBase getInventoryFolder(LLUUID folder) | 180 | public InventoryFolderBase getInventoryFolder(UUID folder) |
181 | { | 181 | { |
182 | try | 182 | try |
183 | { | 183 | { |
@@ -235,7 +235,7 @@ namespace OpenSim.Data.NHibernate | |||
235 | /// | 235 | /// |
236 | /// </summary> | 236 | /// </summary> |
237 | /// <param name="folder"></param> | 237 | /// <param name="folder"></param> |
238 | public void deleteInventoryFolder(LLUUID folderID) | 238 | public void deleteInventoryFolder(UUID folderID) |
239 | { | 239 | { |
240 | using (ITransaction transaction = session.BeginTransaction()) | 240 | using (ITransaction transaction = session.BeginTransaction()) |
241 | { | 241 | { |
@@ -245,12 +245,12 @@ namespace OpenSim.Data.NHibernate | |||
245 | } | 245 | } |
246 | 246 | ||
247 | // useful private methods | 247 | // useful private methods |
248 | private bool ExistsItem(LLUUID uuid) | 248 | private bool ExistsItem(UUID uuid) |
249 | { | 249 | { |
250 | return (getInventoryItem(uuid) != null) ? true : false; | 250 | return (getInventoryItem(uuid) != null) ? true : false; |
251 | } | 251 | } |
252 | 252 | ||
253 | private bool ExistsFolder(LLUUID uuid) | 253 | private bool ExistsFolder(UUID uuid) |
254 | { | 254 | { |
255 | return (getInventoryFolder(uuid) != null) ? true : false; | 255 | return (getInventoryFolder(uuid) != null) ? true : false; |
256 | } | 256 | } |
@@ -314,7 +314,7 @@ namespace OpenSim.Data.NHibernate | |||
314 | /// </summary> | 314 | /// </summary> |
315 | /// <param name="folderID">The UUID of the target folder</param> | 315 | /// <param name="folderID">The UUID of the target folder</param> |
316 | /// <returns>A List of InventoryItemBase items</returns> | 316 | /// <returns>A List of InventoryItemBase items</returns> |
317 | public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) | 317 | public List<InventoryItemBase> getInventoryInFolder(UUID folderID) |
318 | { | 318 | { |
319 | // try { | 319 | // try { |
320 | ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); | 320 | ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); |
@@ -332,16 +332,16 @@ namespace OpenSim.Data.NHibernate | |||
332 | // } | 332 | // } |
333 | } | 333 | } |
334 | 334 | ||
335 | public List<InventoryFolderBase> getUserRootFolders(LLUUID user) | 335 | public List<InventoryFolderBase> getUserRootFolders(UUID user) |
336 | { | 336 | { |
337 | return new List<InventoryFolderBase>(); | 337 | return new List<InventoryFolderBase>(); |
338 | } | 338 | } |
339 | 339 | ||
340 | // see InventoryItemBase.getUserRootFolder | 340 | // see InventoryItemBase.getUserRootFolder |
341 | public InventoryFolderBase getUserRootFolder(LLUUID user) | 341 | public InventoryFolderBase getUserRootFolder(UUID user) |
342 | { | 342 | { |
343 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); | 343 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); |
344 | criteria.Add(Expression.Eq("ParentID", LLUUID.Zero)); | 344 | criteria.Add(Expression.Eq("ParentID", UUID.Zero)); |
345 | criteria.Add(Expression.Eq("Owner", user)); | 345 | criteria.Add(Expression.Eq("Owner", user)); |
346 | foreach (InventoryFolderBase folder in criteria.List()) | 346 | foreach (InventoryFolderBase folder in criteria.List()) |
347 | { | 347 | { |
@@ -356,7 +356,7 @@ namespace OpenSim.Data.NHibernate | |||
356 | /// </summary> | 356 | /// </summary> |
357 | /// <param name="folders">list where folders will be appended</param> | 357 | /// <param name="folders">list where folders will be appended</param> |
358 | /// <param name="parentID">ID of parent</param> | 358 | /// <param name="parentID">ID of parent</param> |
359 | private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) | 359 | private void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID) |
360 | { | 360 | { |
361 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); | 361 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); |
362 | criteria.Add(Expression.Eq("ParentID", parentID)); | 362 | criteria.Add(Expression.Eq("ParentID", parentID)); |
@@ -371,7 +371,7 @@ namespace OpenSim.Data.NHibernate | |||
371 | /// </summary> | 371 | /// </summary> |
372 | /// <param name="parentID">The folder to get subfolders for</param> | 372 | /// <param name="parentID">The folder to get subfolders for</param> |
373 | /// <returns>A list of inventory folders</returns> | 373 | /// <returns>A list of inventory folders</returns> |
374 | public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) | 374 | public List<InventoryFolderBase> getInventoryFolders(UUID parentID) |
375 | { | 375 | { |
376 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 376 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
377 | getInventoryFolders(ref folders, parentID); | 377 | getInventoryFolders(ref folders, parentID); |
@@ -379,7 +379,7 @@ namespace OpenSim.Data.NHibernate | |||
379 | } | 379 | } |
380 | 380 | ||
381 | // See IInventoryDataPlugin | 381 | // See IInventoryDataPlugin |
382 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) | 382 | public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) |
383 | { | 383 | { |
384 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 384 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
385 | getInventoryFolders(ref folders, parentID); | 385 | getInventoryFolders(ref folders, parentID); |