From a583d8ad70daad8c755c2f43e2f2af7bc5b7ee4d Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Sat, 14 Feb 2009 19:47:02 +0000
Subject: Thank you kindly, TLaukkan (Tommil) for a patch that: * Created value
object for EstateRegionLink for storing the estate region relationship. *
Refactored slightly NHibernateManager and NHibernateXXXXData implementations
for accesing nhibernate generated ID on insert. ** Changed
NHibernateManager.Save method name to Insert as it does Insert. ** Changed
NHibernateManager.Save return value object as ID can be both UUID and uint
currently. ** Changed NHibernateManager.Load method Id parameter to object as
it can be both UUID and uint. * Created NHibernateEstateData implementation.
This is the actual estate storage. * Created NHibernate mapping files for
both EstateSettings and EstateRegionLink * Created
MigrationSyntaxDifferences.txt files to write notes about differences in
migration scripts between different databases. * Created estate storage
migration scripts for all four databases. * Created estate unit test classes
for all four databases. * Updated one missing field to BasicEstateTest.cs *
Tested NHibernate unit tests with NUnit GUI. Asset databases fail but that is
not related to this patch. * Tested build with both Visual Studio and nant. *
Executed build tests with nant succesfully.
---
OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 74 +++++++++++-----------
1 file changed, 37 insertions(+), 37 deletions(-)
(limited to 'OpenSim/Data/NHibernate/NHibernateInventoryData.cs')
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index 0129800..7657ae5 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -42,6 +42,34 @@ namespace OpenSim.Data.NHibernate
public NHibernateManager manager;
+ ///
+ /// The plugin being loaded
+ ///
+ /// A string containing the plugin name
+ public string Name
+ {
+ get { return "NHibernate Inventory Data Interface"; }
+ }
+
+ ///
+ /// The plugins version
+ ///
+ /// A string containing the plugin version
+ public string Version
+ {
+ get
+ {
+ Module module = GetType().Module;
+ // string dllName = module.Assembly.ManifestModule.Name;
+ Version dllVersion = module.Assembly.GetName().Version;
+
+
+ return
+ string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
+ dllVersion.Revision);
+ }
+ }
+
public void Initialise()
{
m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!");
@@ -57,6 +85,13 @@ namespace OpenSim.Data.NHibernate
manager = new NHibernateManager(connect, "InventoryStore");
}
+ ///
+ /// Closes the interface
+ ///
+ public void Dispose()
+ {
+ }
+
/*****************************************************************
*
* Basic CRUD operations on Data
@@ -92,7 +127,7 @@ namespace OpenSim.Data.NHibernate
{
if (!ExistsItem(item.ID))
{
- manager.Save(item);
+ manager.Insert(item);
}
else
{
@@ -161,7 +196,7 @@ namespace OpenSim.Data.NHibernate
{
if (!ExistsFolder(folder.ID))
{
- manager.Save(folder);
+ manager.Insert(folder);
}
else
{
@@ -220,41 +255,6 @@ namespace OpenSim.Data.NHibernate
// TODO: DataSet commit
}
- ///
- /// Closes the interface
- ///
- public void Dispose()
- {
- }
-
- ///
- /// The plugin being loaded
- ///
- /// A string containing the plugin name
- public string Name
- {
- get { return "NHibernate Inventory Data Interface"; }
- }
-
- ///
- /// The plugins version
- ///
- /// A string containing the plugin version
- public string Version
- {
- get
- {
- Module module = GetType().Module;
- // string dllName = module.Assembly.ManifestModule.Name;
- Version dllVersion = module.Assembly.GetName().Version;
-
-
- return
- string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
- dllVersion.Revision);
- }
- }
-
// Move seems to be just update
public void moveInventoryFolder(InventoryFolderBase folder)
--
cgit v1.1