mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
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.
This commit is contained in:
@@ -42,6 +42,34 @@ namespace OpenSim.Data.NHibernate
|
||||
|
||||
public NHibernateManager manager;
|
||||
|
||||
/// <summary>
|
||||
/// The plugin being loaded
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin name</returns>
|
||||
public string Name
|
||||
{
|
||||
get { return "NHibernate Inventory Data Interface"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugins version
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin version</returns>
|
||||
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");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the interface
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the interface
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugin being loaded
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin name</returns>
|
||||
public string Name
|
||||
{
|
||||
get { return "NHibernate Inventory Data Interface"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugins version
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin version</returns>
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user