Merge branch 'master' into vehicles
commit
c4969d47d9
|
@ -30,24 +30,36 @@ using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
|
using Nini.Config;
|
||||||
using OpenSim;
|
using OpenSim;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.RegionModulesController
|
namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
{
|
{
|
||||||
public class RegionModulesControllerPlugin : IRegionModulesController, IApplicationPlugin
|
public class RegionModulesControllerPlugin : IRegionModulesController,
|
||||||
|
IApplicationPlugin
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// Logger
|
||||||
|
private static readonly ILog m_log =
|
||||||
|
LogManager.GetLogger(
|
||||||
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private OpenSimBase m_openSim; // for getting the config
|
// Config access
|
||||||
|
private OpenSimBase m_openSim;
|
||||||
|
|
||||||
|
// Our name
|
||||||
private string m_name;
|
private string m_name;
|
||||||
|
|
||||||
private List<Type> m_nonSharedModules = new List<Type>();
|
// Internal lists to collect information about modules present
|
||||||
private List<Type> m_sharedModules = new List<Type>();
|
private List<TypeExtensionNode> m_nonSharedModules =
|
||||||
|
new List<TypeExtensionNode>();
|
||||||
|
private List<TypeExtensionNode> m_sharedModules =
|
||||||
|
new List<TypeExtensionNode>();
|
||||||
|
|
||||||
private List<ISharedRegionModule> m_sharedInstances = new List<ISharedRegionModule>();
|
// List of shared module instances, for adding to Scenes
|
||||||
|
private List<ISharedRegionModule> m_sharedInstances =
|
||||||
|
new List<ISharedRegionModule>();
|
||||||
|
|
||||||
#region IApplicationPlugin implementation
|
#region IApplicationPlugin implementation
|
||||||
|
|
||||||
|
@ -57,40 +69,136 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
m_openSim = openSim;
|
m_openSim = openSim;
|
||||||
openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this);
|
openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this);
|
||||||
|
|
||||||
|
// Who we are
|
||||||
string id = AddinManager.CurrentAddin.Id;
|
string id = AddinManager.CurrentAddin.Id;
|
||||||
int pos = id.LastIndexOf(".");
|
|
||||||
if (pos == -1) m_name = id;
|
|
||||||
else m_name = id.Substring(pos + 1);
|
|
||||||
|
|
||||||
//ExtensionNodeList list = AddinManager.GetExtensionNodes("/OpenSim/RegionModules");
|
// Make friendly name
|
||||||
// load all the (new) region-module classes
|
int pos = id.LastIndexOf(".");
|
||||||
foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/OpenSim/RegionModules"))
|
if (pos == -1)
|
||||||
|
m_name = id;
|
||||||
|
else
|
||||||
|
m_name = id.Substring(pos + 1);
|
||||||
|
|
||||||
|
// The [Modules] section in the ini file
|
||||||
|
IConfig modulesConfig =
|
||||||
|
openSim.ConfigSource.Source.Configs["Modules"];
|
||||||
|
if (modulesConfig == null)
|
||||||
|
modulesConfig = openSim.ConfigSource.Source.AddConfig("Modules");
|
||||||
|
|
||||||
|
// Scan modules and load all that aren't disabled
|
||||||
|
foreach (TypeExtensionNode node in
|
||||||
|
AddinManager.GetExtensionNodes("/OpenSim/RegionModules"))
|
||||||
{
|
{
|
||||||
// TODO why does node.Type.isSubclassOf(typeof(ISharedRegionModule)) not work?
|
|
||||||
if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null)
|
if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null)
|
||||||
{
|
{
|
||||||
|
// Get the config string
|
||||||
|
string moduleString =
|
||||||
|
modulesConfig.GetString("Setup_" + node.Id, String.Empty);
|
||||||
|
|
||||||
|
// We have a selector
|
||||||
|
if (moduleString != String.Empty)
|
||||||
|
{
|
||||||
|
// Allow disabling modules even if they don't have
|
||||||
|
// support for it
|
||||||
|
if (moduleString == "disabled")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Split off port, if present
|
||||||
|
string[] moduleParts = moduleString.Split(new char[] {'/'}, 2);
|
||||||
|
// Format is [port/][class]
|
||||||
|
string className = moduleParts[0];
|
||||||
|
if (moduleParts.Length > 1)
|
||||||
|
className = moduleParts[1];
|
||||||
|
|
||||||
|
// Match the class name if given
|
||||||
|
if (className != String.Empty &&
|
||||||
|
node.Type.ToString() != className)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type);
|
m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type);
|
||||||
m_sharedModules.Add(node.Type);
|
m_sharedModules.Add(node);
|
||||||
}
|
}
|
||||||
else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null)
|
else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null)
|
||||||
{
|
{
|
||||||
|
// Get the config string
|
||||||
|
string moduleString =
|
||||||
|
modulesConfig.GetString("Setup_" + node.Id, String.Empty);
|
||||||
|
|
||||||
|
// We have a selector
|
||||||
|
if (moduleString != String.Empty)
|
||||||
|
{
|
||||||
|
// Allow disabling modules even if they don't have
|
||||||
|
// support for it
|
||||||
|
if (moduleString == "disabled")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Split off port, if present
|
||||||
|
string[] moduleParts = moduleString.Split(new char[] {'/'}, 2);
|
||||||
|
// Format is [port/][class]
|
||||||
|
string className = moduleParts[0];
|
||||||
|
if (moduleParts.Length > 1)
|
||||||
|
className = moduleParts[1];
|
||||||
|
|
||||||
|
// Match the class name if given
|
||||||
|
if (className != String.Empty &&
|
||||||
|
node.Type.ToString() != className)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type);
|
m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type);
|
||||||
m_nonSharedModules.Add(node.Type);
|
m_nonSharedModules.Add(node);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type);
|
m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// now we've got all the region-module classes loaded, create one instance of every ISharedRegionModule,
|
// Load and init the module. We try a constructor with a port
|
||||||
// initialize and postinitialize it. This Initialise we are in is called before LoadRegion.PostInitialise
|
// if a port was given, fall back to one without if there is
|
||||||
// is called (which loads the regions), so we don't have any regions in the server yet.
|
// no port or the more specific constructor fails.
|
||||||
foreach (Type type in m_sharedModules)
|
// This will be removed, so that any module capable of using a port
|
||||||
|
// must provide a constructor with a port in the future.
|
||||||
|
// For now, we do this so migration is easy.
|
||||||
|
//
|
||||||
|
foreach (TypeExtensionNode node in m_sharedModules)
|
||||||
{
|
{
|
||||||
ISharedRegionModule module = (ISharedRegionModule)Activator.CreateInstance(type);
|
Object[] ctorArgs = new Object[] {(uint)0};
|
||||||
|
|
||||||
|
// Read the config again
|
||||||
|
string moduleString =
|
||||||
|
modulesConfig.GetString("Setup_" + node.Id, String.Empty);
|
||||||
|
|
||||||
|
// Get the port number, if there is one
|
||||||
|
if (moduleString != String.Empty)
|
||||||
|
{
|
||||||
|
// Get the port number from the string
|
||||||
|
string[] moduleParts = moduleString.Split(new char[] {'/'},
|
||||||
|
2);
|
||||||
|
if (moduleParts.Length > 1)
|
||||||
|
ctorArgs[0] = Convert.ToUInt32(moduleParts[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try loading and initilaizing the module, using the
|
||||||
|
// port if appropriate
|
||||||
|
ISharedRegionModule module = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
module = (ISharedRegionModule)Activator.CreateInstance(
|
||||||
|
node.Type, ctorArgs);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
module = (ISharedRegionModule)Activator.CreateInstance(
|
||||||
|
node.Type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OK, we're up and running
|
||||||
m_sharedInstances.Add(module);
|
m_sharedInstances.Add(module);
|
||||||
module.Initialise(openSim.ConfigSource.Source);
|
module.Initialise(openSim.ConfigSource.Source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Immediately run PostInitialise on shared modules
|
||||||
foreach (ISharedRegionModule module in m_sharedInstances)
|
foreach (ISharedRegionModule module in m_sharedInstances)
|
||||||
{
|
{
|
||||||
module.PostInitialise();
|
module.PostInitialise();
|
||||||
|
@ -105,6 +213,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
|
|
||||||
#region IPlugin implementation
|
#region IPlugin implementation
|
||||||
|
|
||||||
|
// We don't do that here
|
||||||
|
//
|
||||||
public void Initialise ()
|
public void Initialise ()
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
|
@ -114,9 +224,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
|
|
||||||
#region IDisposable implementation
|
#region IDisposable implementation
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
//
|
||||||
public void Dispose ()
|
public void Dispose ()
|
||||||
{
|
{
|
||||||
// we expect that all regions have been removed already
|
// We expect that all regions have been removed already
|
||||||
while (m_sharedInstances.Count > 0)
|
while (m_sharedInstances.Count > 0)
|
||||||
{
|
{
|
||||||
m_sharedInstances[0].Close();
|
m_sharedInstances[0].Close();
|
||||||
|
@ -147,6 +259,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
|
|
||||||
#region IRegionModulesController implementation
|
#region IRegionModulesController implementation
|
||||||
|
|
||||||
|
// The root of all evil.
|
||||||
|
// This is where we handle adding the modules to scenes when they
|
||||||
|
// load. This means that here we deal with replaceable interfaces,
|
||||||
|
// nonshared modules, etc.
|
||||||
|
//
|
||||||
public void AddRegionToModules (Scene scene)
|
public void AddRegionToModules (Scene scene)
|
||||||
{
|
{
|
||||||
Dictionary<Type, ISharedRegionModule> deferredSharedModules =
|
Dictionary<Type, ISharedRegionModule> deferredSharedModules =
|
||||||
|
@ -154,12 +271,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
Dictionary<Type, INonSharedRegionModule> deferredNonSharedModules =
|
Dictionary<Type, INonSharedRegionModule> deferredNonSharedModules =
|
||||||
new Dictionary<Type, INonSharedRegionModule>();
|
new Dictionary<Type, INonSharedRegionModule>();
|
||||||
|
|
||||||
|
// We need this to see if a module has already been loaded and
|
||||||
|
// has defined a replaceable interface. It's a generic call,
|
||||||
|
// so this can't be used directly. It will be used later
|
||||||
Type s = scene.GetType();
|
Type s = scene.GetType();
|
||||||
MethodInfo mi = s.GetMethod("RequestModuleInterface");
|
MethodInfo mi = s.GetMethod("RequestModuleInterface");
|
||||||
|
|
||||||
List<ISharedRegionModule> sharedlist = new List<ISharedRegionModule>();
|
// This will hold the shared modules we actually load
|
||||||
|
List<ISharedRegionModule> sharedlist =
|
||||||
|
new List<ISharedRegionModule>();
|
||||||
|
|
||||||
|
// Iterate over the shared modules that have been loaded
|
||||||
|
// Add them to the new Scene
|
||||||
foreach (ISharedRegionModule module in m_sharedInstances)
|
foreach (ISharedRegionModule module in m_sharedInstances)
|
||||||
{
|
{
|
||||||
|
// Here is where we check if a replaceable interface
|
||||||
|
// is defined. If it is, the module is checked against
|
||||||
|
// the interfaces already defined. If the interface is
|
||||||
|
// defined, we simply skip the module. Else, if the module
|
||||||
|
// defines a replaceable interface, we add it to the deferred
|
||||||
|
// list.
|
||||||
Type replaceableInterface = module.ReplaceableInterface;
|
Type replaceableInterface = module.ReplaceableInterface;
|
||||||
if (replaceableInterface != null)
|
if (replaceableInterface != null)
|
||||||
{
|
{
|
||||||
|
@ -185,11 +316,41 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
sharedlist.Add(module);
|
sharedlist.Add(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<INonSharedRegionModule> list = new List<INonSharedRegionModule>();
|
IConfig modulesConfig =
|
||||||
foreach (Type type in m_nonSharedModules)
|
m_openSim.ConfigSource.Source.Configs["Modules"];
|
||||||
{
|
|
||||||
INonSharedRegionModule module = (INonSharedRegionModule)Activator.CreateInstance(type);
|
|
||||||
|
|
||||||
|
// Scan for, and load, nonshared modules
|
||||||
|
List<INonSharedRegionModule> list = new List<INonSharedRegionModule>();
|
||||||
|
foreach (TypeExtensionNode node in m_nonSharedModules)
|
||||||
|
{
|
||||||
|
Object[] ctorArgs = new Object[] {0};
|
||||||
|
|
||||||
|
// Read the config
|
||||||
|
string moduleString =
|
||||||
|
modulesConfig.GetString("Setup_" + node.Id, String.Empty);
|
||||||
|
|
||||||
|
// Get the port number, if there is one
|
||||||
|
if (moduleString != String.Empty)
|
||||||
|
{
|
||||||
|
// Get the port number from the string
|
||||||
|
string[] moduleParts = moduleString.Split(new char[] {'/'},
|
||||||
|
2);
|
||||||
|
if (moduleParts.Length > 1)
|
||||||
|
ctorArgs[0] = Convert.ToUInt32(moduleParts[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Actually load it
|
||||||
|
INonSharedRegionModule module = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
module = (INonSharedRegionModule)Activator.CreateInstance(node.Type, ctorArgs);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
module = (INonSharedRegionModule)Activator.CreateInstance(node.Type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for replaceable interfaces
|
||||||
Type replaceableInterface = module.ReplaceableInterface;
|
Type replaceableInterface = module.ReplaceableInterface;
|
||||||
if (replaceableInterface != null)
|
if (replaceableInterface != null)
|
||||||
{
|
{
|
||||||
|
@ -209,11 +370,16 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1}",
|
m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1}",
|
||||||
scene.RegionInfo.RegionName, module.Name);
|
scene.RegionInfo.RegionName, module.Name);
|
||||||
|
|
||||||
|
// Initialise the module
|
||||||
module.Initialise(m_openSim.ConfigSource.Source);
|
module.Initialise(m_openSim.ConfigSource.Source);
|
||||||
|
|
||||||
list.Add(module);
|
list.Add(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now add the modules that we found to the scene. If a module
|
||||||
|
// wishes to override a replaceable interface, it needs to
|
||||||
|
// register it in Initialise, so that the deferred module
|
||||||
|
// won't load.
|
||||||
foreach (INonSharedRegionModule module in list)
|
foreach (INonSharedRegionModule module in list)
|
||||||
{
|
{
|
||||||
module.AddRegion(scene);
|
module.AddRegion(scene);
|
||||||
|
@ -223,9 +389,9 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
// Now all modules without a replaceable base interface are loaded
|
// Now all modules without a replaceable base interface are loaded
|
||||||
// Replaceable modules have either been skipped, or omitted.
|
// Replaceable modules have either been skipped, or omitted.
|
||||||
// Now scan the deferred modules here
|
// Now scan the deferred modules here
|
||||||
|
|
||||||
foreach (ISharedRegionModule module in deferredSharedModules.Values)
|
foreach (ISharedRegionModule module in deferredSharedModules.Values)
|
||||||
{
|
{
|
||||||
|
// Determine if the interface has been replaced
|
||||||
Type replaceableInterface = module.ReplaceableInterface;
|
Type replaceableInterface = module.ReplaceableInterface;
|
||||||
MethodInfo mii = mi.MakeGenericMethod(replaceableInterface);
|
MethodInfo mii = mi.MakeGenericMethod(replaceableInterface);
|
||||||
|
|
||||||
|
@ -238,15 +404,20 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to shared module {1} (deferred)",
|
m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to shared module {1} (deferred)",
|
||||||
scene.RegionInfo.RegionName, module.Name);
|
scene.RegionInfo.RegionName, module.Name);
|
||||||
|
|
||||||
|
// Not replaced, load the module
|
||||||
module.AddRegion(scene);
|
module.AddRegion(scene);
|
||||||
scene.AddRegionModule(module.Name, module);
|
scene.AddRegionModule(module.Name, module);
|
||||||
|
|
||||||
sharedlist.Add(module);
|
sharedlist.Add(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<INonSharedRegionModule> deferredlist = new List<INonSharedRegionModule>();
|
// Same thing for nonshared modules, load them unless overridden
|
||||||
|
List<INonSharedRegionModule> deferredlist =
|
||||||
|
new List<INonSharedRegionModule>();
|
||||||
|
|
||||||
foreach (INonSharedRegionModule module in deferredNonSharedModules.Values)
|
foreach (INonSharedRegionModule module in deferredNonSharedModules.Values)
|
||||||
{
|
{
|
||||||
|
// Check interface override
|
||||||
Type replaceableInterface = module.ReplaceableInterface;
|
Type replaceableInterface = module.ReplaceableInterface;
|
||||||
if (replaceableInterface != null)
|
if (replaceableInterface != null)
|
||||||
{
|
{
|
||||||
|
@ -268,6 +439,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||||
deferredlist.Add(module);
|
deferredlist.Add(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Finally, load valid deferred modules
|
||||||
foreach (INonSharedRegionModule module in deferredlist)
|
foreach (INonSharedRegionModule module in deferredlist)
|
||||||
{
|
{
|
||||||
module.AddRegion(scene);
|
module.AddRegion(scene);
|
||||||
|
|
|
@ -50,8 +50,16 @@ namespace OpenSim.Client.Linden
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLProxyLoginModule : ISharedRegionModule
|
public class LLProxyLoginModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
|
private uint m_port = 0;
|
||||||
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
public LLProxyLoginModule(uint port)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[CLIENT]: LLProxyLoginModule port {0}", port);
|
||||||
|
m_port = port;
|
||||||
|
}
|
||||||
|
|
||||||
protected bool RegionLoginsEnabled
|
protected bool RegionLoginsEnabled
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -148,8 +156,8 @@ namespace OpenSim.Client.Linden
|
||||||
protected void AddHttpHandlers()
|
protected void AddHttpHandlers()
|
||||||
{
|
{
|
||||||
//we will add our handlers to the first scene we received, as all scenes share a http server. But will this ever change?
|
//we will add our handlers to the first scene we received, as all scenes share a http server. But will this ever change?
|
||||||
MainServer.Instance.AddXmlRPCHandler("expect_user", ExpectUser, false);
|
MainServer.GetHttpServer(m_port).AddXmlRPCHandler("expect_user", ExpectUser, false);
|
||||||
MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser, false);
|
MainServer.GetHttpServer(m_port).AddXmlRPCHandler("logoff_user", LogOffUser, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void AddScene(Scene scene)
|
protected void AddScene(Scene scene)
|
||||||
|
|
|
@ -996,19 +996,19 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
// Need to translate to MXP somehow
|
// Need to translate to MXP somehow
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation)
|
public void SendAvatarData(SendAvatarData data)
|
||||||
{
|
{
|
||||||
//ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID);
|
//ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID);
|
||||||
UUID ownerID = avatarID;
|
UUID ownerID = data.AvatarID;
|
||||||
MXPSendAvatarData(firstName + " " + lastName, ownerID, UUID.Zero, avatarID, avatarLocalID, position, rotation);
|
MXPSendAvatarData(data.FirstName + " " + data.LastName, ownerID, UUID.Zero, data.AvatarID, data.AvatarLocalID, data.Position, data.Rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID uuid)
|
public void SendAvatarTerseUpdate(SendAvatarTerseData data)
|
||||||
{
|
{
|
||||||
MovementEventMessage me = new MovementEventMessage();
|
MovementEventMessage me = new MovementEventMessage();
|
||||||
me.ObjectIndex = localID;
|
me.ObjectIndex = data.LocalID;
|
||||||
me.Location =ToOmVector(position);
|
me.Location = ToOmVector(data.Position);
|
||||||
me.Orientation = ToOmQuaternion(rotation);
|
me.Orientation = ToOmQuaternion(data.Rotation);
|
||||||
|
|
||||||
Session.Send(me);
|
Session.Send(me);
|
||||||
}
|
}
|
||||||
|
@ -1028,25 +1028,26 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
// Need to translate to MXP somehow
|
// Need to translate to MXP somehow
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
|
public void SendPrimitiveToClient(SendPrimitiveData data)
|
||||||
{
|
{
|
||||||
MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation, flags,text,color,parentID,particleSystem,clickAction,material,textureanim);
|
MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel,
|
||||||
|
data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction,
|
||||||
|
data.material, data.textureanim);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material)
|
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||||
{
|
|
||||||
MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation, flags, text, color, parentID, particleSystem, clickAction, material, new byte[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint)
|
|
||||||
{
|
{
|
||||||
MovementEventMessage me = new MovementEventMessage();
|
MovementEventMessage me = new MovementEventMessage();
|
||||||
me.ObjectIndex = localID;
|
me.ObjectIndex = data.LocalID;
|
||||||
me.Location = ToOmVector(position);
|
me.Location = ToOmVector(data.Position);
|
||||||
me.Orientation = ToOmQuaternion(rotation);
|
me.Orientation = ToOmQuaternion(data.Rotation);
|
||||||
Session.Send(me);
|
Session.Send(me);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void FlushPrimUpdates()
|
public void FlushPrimUpdates()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,12 +561,12 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
|
public void SendAvatarData(SendAvatarData data)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID uuid)
|
public void SendAvatarTerseUpdate(SendAvatarTerseData data)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
@ -586,17 +586,17 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
|
public void SendPrimitiveToClient(SendPrimitiveData data)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material)
|
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint)
|
public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,12 +68,20 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
// Clean dropped attachments
|
// Clean dropped attachments
|
||||||
//
|
//
|
||||||
MySqlCommand cmd = m_Connection.CreateCommand();
|
try
|
||||||
cmd.CommandText = "delete from prims, primshapes using prims " +
|
{
|
||||||
"left join primshapes on prims.uuid = primshapes.uuid " +
|
using (MySqlCommand cmd = m_Connection.CreateCommand())
|
||||||
"where PCode = 9 and State <> 0";
|
{
|
||||||
ExecuteNonQuery(cmd);
|
cmd.CommandText = "delete from prims, primshapes using prims " +
|
||||||
cmd.Dispose();
|
"left join primshapes on prims.uuid = primshapes.uuid " +
|
||||||
|
"where PCode = 9 and State <> 0";
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (MySqlException ex)
|
||||||
|
{
|
||||||
|
m_log.Error("[REGION DB]: Error cleaning up dropped attachments: " + ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IDataReader ExecuteReader(MySqlCommand c)
|
private IDataReader ExecuteReader(MySqlCommand c)
|
||||||
|
@ -395,25 +403,23 @@ namespace OpenSim.Data.MySQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
|
public List<SceneObjectGroup> LoadObjects(UUID regionID)
|
||||||
{
|
{
|
||||||
UUID lastGroupID = UUID.Zero;
|
const int ROWS_PER_QUERY = 5000;
|
||||||
|
|
||||||
|
Dictionary<UUID, SceneObjectPart> prims = new Dictionary<UUID, SceneObjectPart>(ROWS_PER_QUERY);
|
||||||
Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
|
Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
|
||||||
Dictionary<UUID, SceneObjectPart> prims = new Dictionary<UUID, SceneObjectPart>();
|
int count = 0;
|
||||||
SceneObjectGroup grp = null;
|
|
||||||
|
#region Prim Loading
|
||||||
|
|
||||||
lock (m_Connection)
|
lock (m_Connection)
|
||||||
{
|
{
|
||||||
using (MySqlCommand cmd = m_Connection.CreateCommand())
|
using (MySqlCommand cmd = m_Connection.CreateCommand())
|
||||||
{
|
{
|
||||||
cmd.CommandText = "select *, " +
|
cmd.CommandText =
|
||||||
"case when prims.UUID = SceneGroupID " +
|
"SELECT * FROM prims LEFT JOIN primshapes ON prims.UUID = primshapes.UUID WHERE RegionUUID = ?RegionUUID";
|
||||||
"then 0 else 1 end as sort from prims " +
|
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
|
||||||
"left join primshapes on prims.UUID = primshapes.UUID " +
|
|
||||||
"where RegionUUID = ?RegionUUID " +
|
|
||||||
"order by SceneGroupID asc, sort asc, LinkNumber asc";
|
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("RegionUUID", regionUUID.ToString());
|
|
||||||
|
|
||||||
using (IDataReader reader = ExecuteReader(cmd))
|
using (IDataReader reader = ExecuteReader(cmd))
|
||||||
{
|
{
|
||||||
|
@ -425,52 +431,61 @@ namespace OpenSim.Data.MySQL
|
||||||
else
|
else
|
||||||
prim.Shape = BuildShape(reader);
|
prim.Shape = BuildShape(reader);
|
||||||
|
|
||||||
|
UUID parentID = new UUID(reader["SceneGroupID"].ToString());
|
||||||
|
if (parentID != prim.UUID)
|
||||||
|
prim.ParentUUID = parentID;
|
||||||
|
|
||||||
prims[prim.UUID] = prim;
|
prims[prim.UUID] = prim;
|
||||||
|
|
||||||
UUID groupID = new UUID(reader["SceneGroupID"].ToString());
|
++count;
|
||||||
|
if (count % ROWS_PER_QUERY == 0)
|
||||||
if (groupID != lastGroupID) // New SOG
|
m_log.Debug("[REGION DB]: Loaded " + count + " prims...");
|
||||||
{
|
|
||||||
if (grp != null)
|
|
||||||
objects[grp.UUID] = grp;
|
|
||||||
|
|
||||||
lastGroupID = groupID;
|
|
||||||
|
|
||||||
// There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are
|
|
||||||
// recorded as the root prim (for which the UUID must equal the persisted group UUID). In
|
|
||||||
// this case, force the UUID to be the same as the group UUID so that at least these can be
|
|
||||||
// deleted (we need to change the UUID so that any other prims in the linkset can also be
|
|
||||||
// deleted).
|
|
||||||
if (prim.UUID != groupID && groupID != UUID.Zero)
|
|
||||||
{
|
|
||||||
m_log.WarnFormat(
|
|
||||||
"[REGION DB]: Found root prim {0} {1} at {2} where group was actually {3}. Forcing UUID to group UUID",
|
|
||||||
prim.Name, prim.UUID, prim.GroupPosition, groupID);
|
|
||||||
|
|
||||||
prim.UUID = groupID;
|
|
||||||
}
|
|
||||||
|
|
||||||
grp = new SceneObjectGroup(prim);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Black magic to preserve link numbers
|
|
||||||
//
|
|
||||||
int link = prim.LinkNum;
|
|
||||||
|
|
||||||
grp.AddPart(prim);
|
|
||||||
|
|
||||||
if (link != 0)
|
|
||||||
prim.LinkNum = link;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grp != null)
|
|
||||||
objects[grp.UUID] = grp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion Prim Loading
|
||||||
|
|
||||||
|
#region SceneObjectGroup Creation
|
||||||
|
|
||||||
|
// Create all of the SOGs from the root prims first
|
||||||
|
foreach (SceneObjectPart prim in prims.Values)
|
||||||
|
{
|
||||||
|
if (prim.ParentUUID == UUID.Zero)
|
||||||
|
objects[prim.UUID] = new SceneObjectGroup(prim);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add all of the children objects to the SOGs
|
||||||
|
foreach (SceneObjectPart prim in prims.Values)
|
||||||
|
{
|
||||||
|
SceneObjectGroup sog;
|
||||||
|
if (prim.UUID != prim.ParentUUID)
|
||||||
|
{
|
||||||
|
if (objects.TryGetValue(prim.ParentUUID, out sog))
|
||||||
|
{
|
||||||
|
int originalLinkNum = prim.LinkNum;
|
||||||
|
|
||||||
|
sog.AddPart(prim);
|
||||||
|
|
||||||
|
// SceneObjectGroup.AddPart() tries to be smart and automatically set the LinkNum.
|
||||||
|
// We override that here
|
||||||
|
if (originalLinkNum != 0)
|
||||||
|
prim.LinkNum = originalLinkNum;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.Warn("[REGION DB]: Database contains an orphan child prim " + prim.UUID + " pointing to missing parent " + prim.ParentUUID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion SceneObjectGroup Creation
|
||||||
|
|
||||||
|
m_log.DebugFormat("[REGION DB]: Loaded {0} objects using {1} prims", objects.Count, prims.Count);
|
||||||
|
|
||||||
|
#region Prim Inventory Loading
|
||||||
|
|
||||||
// Instead of attempting to LoadItems on every prim,
|
// Instead of attempting to LoadItems on every prim,
|
||||||
// most of which probably have no items... get a
|
// most of which probably have no items... get a
|
||||||
// list from DB of all prims which have items and
|
// list from DB of all prims which have items and
|
||||||
|
@ -480,7 +495,7 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
using (MySqlCommand itemCmd = m_Connection.CreateCommand())
|
using (MySqlCommand itemCmd = m_Connection.CreateCommand())
|
||||||
{
|
{
|
||||||
itemCmd.CommandText = "select distinct primID from primitems";
|
itemCmd.CommandText = "SELECT DISTINCT primID FROM primitems";
|
||||||
using (IDataReader itemReader = ExecuteReader(itemCmd))
|
using (IDataReader itemReader = ExecuteReader(itemCmd))
|
||||||
{
|
{
|
||||||
while (itemReader.Read())
|
while (itemReader.Read())
|
||||||
|
@ -489,9 +504,7 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
UUID primID = new UUID(itemReader["primID"].ToString());
|
UUID primID = new UUID(itemReader["primID"].ToString());
|
||||||
if (prims.ContainsKey(primID))
|
if (prims.ContainsKey(primID))
|
||||||
{
|
|
||||||
primsWithInventory.Add(prims[primID]);
|
primsWithInventory.Add(prims[primID]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -499,9 +512,14 @@ namespace OpenSim.Data.MySQL
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (SceneObjectPart prim in primsWithInventory)
|
foreach (SceneObjectPart prim in primsWithInventory)
|
||||||
|
{
|
||||||
LoadItems(prim);
|
LoadItems(prim);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Prim Inventory Loading
|
||||||
|
|
||||||
|
m_log.DebugFormat("[REGION DB]: Loaded inventory from {0} objects", primsWithInventory.Count);
|
||||||
|
|
||||||
m_log.DebugFormat("[REGION DB]: Loaded {0} objects using {1} prims", objects.Count, prims.Count);
|
|
||||||
return new List<SceneObjectGroup>(objects.Values);
|
return new List<SceneObjectGroup>(objects.Values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -798,137 +816,137 @@ namespace OpenSim.Data.MySQL
|
||||||
private SceneObjectPart BuildPrim(IDataReader row)
|
private SceneObjectPart BuildPrim(IDataReader row)
|
||||||
{
|
{
|
||||||
SceneObjectPart prim = new SceneObjectPart();
|
SceneObjectPart prim = new SceneObjectPart();
|
||||||
prim.UUID = new UUID((String) row["UUID"]);
|
prim.UUID = new UUID((string)row["UUID"]);
|
||||||
// explicit conversion of integers is required, which sort
|
// explicit conversion of integers is required, which sort
|
||||||
// of sucks. No idea if there is a shortcut here or not.
|
// of sucks. No idea if there is a shortcut here or not.
|
||||||
prim.CreationDate = Convert.ToInt32(row["CreationDate"]);
|
prim.CreationDate = (int)row["CreationDate"];
|
||||||
if (row["Name"] != DBNull.Value)
|
if (row["Name"] != DBNull.Value)
|
||||||
prim.Name = (String)row["Name"];
|
prim.Name = (string)row["Name"];
|
||||||
else
|
else
|
||||||
prim.Name = string.Empty;
|
prim.Name = String.Empty;
|
||||||
// various text fields
|
// Various text fields
|
||||||
prim.Text = (String) row["Text"];
|
prim.Text = (string)row["Text"];
|
||||||
prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]),
|
prim.Color = Color.FromArgb((int)row["ColorA"],
|
||||||
Convert.ToInt32(row["ColorR"]),
|
(int)row["ColorR"],
|
||||||
Convert.ToInt32(row["ColorG"]),
|
(int)row["ColorG"],
|
||||||
Convert.ToInt32(row["ColorB"]));
|
(int)row["ColorB"]);
|
||||||
prim.Description = (String) row["Description"];
|
prim.Description = (string)row["Description"];
|
||||||
prim.SitName = (String) row["SitName"];
|
prim.SitName = (string)row["SitName"];
|
||||||
prim.TouchName = (String) row["TouchName"];
|
prim.TouchName = (string)row["TouchName"];
|
||||||
// permissions
|
// Permissions
|
||||||
prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
|
prim.ObjectFlags = (uint)(int)row["ObjectFlags"];
|
||||||
prim.CreatorID = new UUID((String) row["CreatorID"]);
|
prim.CreatorID = new UUID((string)row["CreatorID"]);
|
||||||
prim.OwnerID = new UUID((String) row["OwnerID"]);
|
prim.OwnerID = new UUID((string)row["OwnerID"]);
|
||||||
prim.GroupID = new UUID((String) row["GroupID"]);
|
prim.GroupID = new UUID((string)row["GroupID"]);
|
||||||
prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
|
prim.LastOwnerID = new UUID((string)row["LastOwnerID"]);
|
||||||
prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
|
prim.OwnerMask = (uint)(int)row["OwnerMask"];
|
||||||
prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
|
prim.NextOwnerMask = (uint)(int)row["NextOwnerMask"];
|
||||||
prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
|
prim.GroupMask = (uint)(int)row["GroupMask"];
|
||||||
prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
|
prim.EveryoneMask = (uint)(int)row["EveryoneMask"];
|
||||||
prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
|
prim.BaseMask = (uint)(int)row["BaseMask"];
|
||||||
// vectors
|
// Vectors
|
||||||
prim.OffsetPosition = new Vector3(
|
prim.OffsetPosition = new Vector3(
|
||||||
Convert.ToSingle(row["PositionX"]),
|
(float)(double)row["PositionX"],
|
||||||
Convert.ToSingle(row["PositionY"]),
|
(float)(double)row["PositionY"],
|
||||||
Convert.ToSingle(row["PositionZ"])
|
(float)(double)row["PositionZ"]
|
||||||
);
|
);
|
||||||
prim.GroupPosition = new Vector3(
|
prim.GroupPosition = new Vector3(
|
||||||
Convert.ToSingle(row["GroupPositionX"]),
|
(float)(double)row["GroupPositionX"],
|
||||||
Convert.ToSingle(row["GroupPositionY"]),
|
(float)(double)row["GroupPositionY"],
|
||||||
Convert.ToSingle(row["GroupPositionZ"])
|
(float)(double)row["GroupPositionZ"]
|
||||||
);
|
);
|
||||||
prim.Velocity = new Vector3(
|
prim.Velocity = new Vector3(
|
||||||
Convert.ToSingle(row["VelocityX"]),
|
(float)(double)row["VelocityX"],
|
||||||
Convert.ToSingle(row["VelocityY"]),
|
(float)(double)row["VelocityY"],
|
||||||
Convert.ToSingle(row["VelocityZ"])
|
(float)(double)row["VelocityZ"]
|
||||||
);
|
);
|
||||||
prim.AngularVelocity = new Vector3(
|
prim.AngularVelocity = new Vector3(
|
||||||
Convert.ToSingle(row["AngularVelocityX"]),
|
(float)(double)row["AngularVelocityX"],
|
||||||
Convert.ToSingle(row["AngularVelocityY"]),
|
(float)(double)row["AngularVelocityY"],
|
||||||
Convert.ToSingle(row["AngularVelocityZ"])
|
(float)(double)row["AngularVelocityZ"]
|
||||||
);
|
);
|
||||||
prim.Acceleration = new Vector3(
|
prim.Acceleration = new Vector3(
|
||||||
Convert.ToSingle(row["AccelerationX"]),
|
(float)(double)row["AccelerationX"],
|
||||||
Convert.ToSingle(row["AccelerationY"]),
|
(float)(double)row["AccelerationY"],
|
||||||
Convert.ToSingle(row["AccelerationZ"])
|
(float)(double)row["AccelerationZ"]
|
||||||
);
|
);
|
||||||
// quaternions
|
// quaternions
|
||||||
prim.RotationOffset = new Quaternion(
|
prim.RotationOffset = new Quaternion(
|
||||||
Convert.ToSingle(row["RotationX"]),
|
(float)(double)row["RotationX"],
|
||||||
Convert.ToSingle(row["RotationY"]),
|
(float)(double)row["RotationY"],
|
||||||
Convert.ToSingle(row["RotationZ"]),
|
(float)(double)row["RotationZ"],
|
||||||
Convert.ToSingle(row["RotationW"])
|
(float)(double)row["RotationW"]
|
||||||
);
|
);
|
||||||
prim.SitTargetPositionLL = new Vector3(
|
prim.SitTargetPositionLL = new Vector3(
|
||||||
Convert.ToSingle(row["SitTargetOffsetX"]),
|
(float)(double)row["SitTargetOffsetX"],
|
||||||
Convert.ToSingle(row["SitTargetOffsetY"]),
|
(float)(double)row["SitTargetOffsetY"],
|
||||||
Convert.ToSingle(row["SitTargetOffsetZ"])
|
(float)(double)row["SitTargetOffsetZ"]
|
||||||
);
|
);
|
||||||
prim.SitTargetOrientationLL = new Quaternion(
|
prim.SitTargetOrientationLL = new Quaternion(
|
||||||
Convert.ToSingle(row["SitTargetOrientX"]),
|
(float)(double)row["SitTargetOrientX"],
|
||||||
Convert.ToSingle(row["SitTargetOrientY"]),
|
(float)(double)row["SitTargetOrientY"],
|
||||||
Convert.ToSingle(row["SitTargetOrientZ"]),
|
(float)(double)row["SitTargetOrientZ"],
|
||||||
Convert.ToSingle(row["SitTargetOrientW"])
|
(float)(double)row["SitTargetOrientW"]
|
||||||
);
|
);
|
||||||
|
|
||||||
prim.PayPrice[0] = Convert.ToInt32(row["PayPrice"]);
|
prim.PayPrice[0] = (int)row["PayPrice"];
|
||||||
prim.PayPrice[1] = Convert.ToInt32(row["PayButton1"]);
|
prim.PayPrice[1] = (int)row["PayButton1"];
|
||||||
prim.PayPrice[2] = Convert.ToInt32(row["PayButton2"]);
|
prim.PayPrice[2] = (int)row["PayButton2"];
|
||||||
prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]);
|
prim.PayPrice[3] = (int)row["PayButton3"];
|
||||||
prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]);
|
prim.PayPrice[4] = (int)row["PayButton4"];
|
||||||
|
|
||||||
prim.Sound = new UUID(row["LoopedSound"].ToString());
|
prim.Sound = new UUID(row["LoopedSound"].ToString());
|
||||||
prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
|
prim.SoundGain = (float)(double)row["LoopedSoundGain"];
|
||||||
prim.SoundFlags = 1; // If it's persisted at all, it's looped
|
prim.SoundFlags = 1; // If it's persisted at all, it's looped
|
||||||
|
|
||||||
if (!(row["TextureAnimation"] is DBNull))
|
if (!(row["TextureAnimation"] is DBNull))
|
||||||
prim.TextureAnimation = (Byte[])row["TextureAnimation"];
|
prim.TextureAnimation = (byte[])row["TextureAnimation"];
|
||||||
if (!(row["ParticleSystem"] is DBNull))
|
if (!(row["ParticleSystem"] is DBNull))
|
||||||
prim.ParticleSystem = (Byte[])row["ParticleSystem"];
|
prim.ParticleSystem = (byte[])row["ParticleSystem"];
|
||||||
|
|
||||||
prim.RotationalVelocity = new Vector3(
|
prim.RotationalVelocity = new Vector3(
|
||||||
Convert.ToSingle(row["OmegaX"]),
|
(float)(double)row["OmegaX"],
|
||||||
Convert.ToSingle(row["OmegaY"]),
|
(float)(double)row["OmegaY"],
|
||||||
Convert.ToSingle(row["OmegaZ"])
|
(float)(double)row["OmegaZ"]
|
||||||
);
|
);
|
||||||
|
|
||||||
prim.SetCameraEyeOffset(new Vector3(
|
prim.SetCameraEyeOffset(new Vector3(
|
||||||
Convert.ToSingle(row["CameraEyeOffsetX"]),
|
(float)(double)row["CameraEyeOffsetX"],
|
||||||
Convert.ToSingle(row["CameraEyeOffsetY"]),
|
(float)(double)row["CameraEyeOffsetY"],
|
||||||
Convert.ToSingle(row["CameraEyeOffsetZ"])
|
(float)(double)row["CameraEyeOffsetZ"]
|
||||||
));
|
));
|
||||||
|
|
||||||
prim.SetCameraAtOffset(new Vector3(
|
prim.SetCameraAtOffset(new Vector3(
|
||||||
Convert.ToSingle(row["CameraAtOffsetX"]),
|
(float)(double)row["CameraAtOffsetX"],
|
||||||
Convert.ToSingle(row["CameraAtOffsetY"]),
|
(float)(double)row["CameraAtOffsetY"],
|
||||||
Convert.ToSingle(row["CameraAtOffsetZ"])
|
(float)(double)row["CameraAtOffsetZ"]
|
||||||
));
|
));
|
||||||
|
|
||||||
if (Convert.ToInt16(row["ForceMouselook"]) != 0)
|
if ((sbyte)row["ForceMouselook"] != 0)
|
||||||
prim.SetForceMouselook(true);
|
prim.SetForceMouselook(true);
|
||||||
|
|
||||||
prim.ScriptAccessPin = Convert.ToInt32(row["ScriptAccessPin"]);
|
prim.ScriptAccessPin = (int)row["ScriptAccessPin"];
|
||||||
|
|
||||||
if (Convert.ToInt16(row["AllowedDrop"]) != 0)
|
if ((sbyte)row["AllowedDrop"] != 0)
|
||||||
prim.AllowedDrop = true;
|
prim.AllowedDrop = true;
|
||||||
|
|
||||||
if (Convert.ToInt16(row["DieAtEdge"]) != 0)
|
if ((sbyte)row["DieAtEdge"] != 0)
|
||||||
prim.DIE_AT_EDGE = true;
|
prim.DIE_AT_EDGE = true;
|
||||||
|
|
||||||
prim.SalePrice = Convert.ToInt32(row["SalePrice"]);
|
prim.SalePrice = (int)row["SalePrice"];
|
||||||
prim.ObjectSaleType = unchecked((byte)Convert.ToSByte(row["SaleType"]));
|
prim.ObjectSaleType = unchecked((byte)(sbyte)row["SaleType"]);
|
||||||
|
|
||||||
prim.Material = unchecked((byte)Convert.ToSByte(row["Material"]));
|
prim.Material = unchecked((byte)(sbyte)row["Material"]);
|
||||||
|
|
||||||
if (!(row["ClickAction"] is DBNull))
|
if (!(row["ClickAction"] is DBNull))
|
||||||
prim.ClickAction = unchecked((byte)Convert.ToSByte(row["ClickAction"]));
|
prim.ClickAction = unchecked((byte)(sbyte)row["ClickAction"]);
|
||||||
|
|
||||||
prim.CollisionSound = new UUID(row["CollisionSound"].ToString());
|
prim.CollisionSound = new UUID(row["CollisionSound"].ToString());
|
||||||
prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]);
|
prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"];
|
||||||
|
|
||||||
if (Convert.ToInt16(row["PassTouches"]) != 0)
|
if ((sbyte)row["PassTouches"] != 0)
|
||||||
prim.PassTouches = true;
|
prim.PassTouches = true;
|
||||||
prim.LinkNum = Convert.ToInt32(row["LinkNumber"]);
|
prim.LinkNum = (int)row["LinkNumber"];
|
||||||
|
|
||||||
return prim;
|
return prim;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,104 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class ColorUserType : IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object color1, object color2)
|
|
||||||
{
|
|
||||||
return color1.Equals(color2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object color)
|
|
||||||
{
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object color)
|
|
||||||
{
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object color)
|
|
||||||
{
|
|
||||||
return (color == null) ? 0 : color.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
Color color=Color.Empty;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
color = Color.FromArgb(rs.GetInt32(ord));
|
|
||||||
}
|
|
||||||
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
Color color = (Color)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = color.ToArgb();
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(Color); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,76 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using OpenMetaverse;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
public class EstateRegionLink
|
|
||||||
{
|
|
||||||
private UUID estateRegionLinkID;
|
|
||||||
public UUID EstateRegionLinkID
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return estateRegionLinkID;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
estateRegionLinkID = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private uint estateID;
|
|
||||||
public uint EstateID
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return estateID;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
estateID = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private UUID regionID;
|
|
||||||
public UUID RegionID
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return regionID;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
regionID = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,119 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
using OpenMetaverse;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class QuaternionUserType: IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object quat1, object quat2)
|
|
||||||
{
|
|
||||||
return quat1.Equals(quat2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object quat)
|
|
||||||
{
|
|
||||||
Quaternion q = (Quaternion)quat;
|
|
||||||
return new Quaternion(q);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object quat)
|
|
||||||
{
|
|
||||||
return quat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object quat)
|
|
||||||
{
|
|
||||||
return (quat == null) ? 0 : quat.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object quat = null;
|
|
||||||
|
|
||||||
int x = rs.GetOrdinal(names[0]);
|
|
||||||
int y = rs.GetOrdinal(names[1]);
|
|
||||||
int z = rs.GetOrdinal(names[2]);
|
|
||||||
int w = rs.GetOrdinal(names[3]);
|
|
||||||
if (!rs.IsDBNull(x))
|
|
||||||
{
|
|
||||||
float X = (Single)Convert.ToDouble(rs[x].ToString());
|
|
||||||
float Y = (Single)Convert.ToDouble(rs[y].ToString());
|
|
||||||
float Z = (Single)Convert.ToDouble(rs[z].ToString());
|
|
||||||
float W = (Single)Convert.ToDouble(rs[w].ToString());
|
|
||||||
quat = new Quaternion(X, Y, Z, W);
|
|
||||||
}
|
|
||||||
return quat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
Quaternion quat = (Quaternion)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = quat.X;
|
|
||||||
((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y;
|
|
||||||
((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z;
|
|
||||||
((IDataParameter)cmd.Parameters[index + 3]).Value = quat.W;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(Quaternion); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] {
|
|
||||||
NHibernateUtil.Single.SqlType,
|
|
||||||
NHibernateUtil.Single.SqlType,
|
|
||||||
NHibernateUtil.Single.SqlType,
|
|
||||||
NHibernateUtil.Single.SqlType
|
|
||||||
}; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,105 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
using OpenMetaverse;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class UUIDUserType: IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object uuid1, object uuid2)
|
|
||||||
{
|
|
||||||
return uuid1.Equals(uuid2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object uuid)
|
|
||||||
{
|
|
||||||
return uuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object uuid)
|
|
||||||
{
|
|
||||||
return uuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object uuid)
|
|
||||||
{
|
|
||||||
return (uuid == null) ? 0 : uuid.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object uuid = null;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
string first = (string)rs.GetString(ord);
|
|
||||||
uuid = new UUID(first);
|
|
||||||
}
|
|
||||||
|
|
||||||
return uuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
UUID uuid = (UUID)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(UUID); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.String.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,110 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
using OpenMetaverse;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class Vector3UserType: IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object vector1, object vector2)
|
|
||||||
{
|
|
||||||
return vector1.Equals(vector2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object vector)
|
|
||||||
{
|
|
||||||
return new Vector3((Vector3) vector);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object vector)
|
|
||||||
{
|
|
||||||
return vector;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object vector)
|
|
||||||
{
|
|
||||||
return (vector == null) ? 0 : vector.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object vector = null;
|
|
||||||
|
|
||||||
int x = rs.GetOrdinal(names[0]);
|
|
||||||
int y = rs.GetOrdinal(names[1]);
|
|
||||||
int z = rs.GetOrdinal(names[2]);
|
|
||||||
if (!rs.IsDBNull(x) && !rs.IsDBNull(y) && !rs.IsDBNull(z))
|
|
||||||
{
|
|
||||||
float X = (Single)Convert.ToDouble(rs[x].ToString());
|
|
||||||
float Y = (Single)Convert.ToDouble(rs[y].ToString());
|
|
||||||
float Z = (Single)Convert.ToDouble(rs[z].ToString());
|
|
||||||
vector = new Vector3(X, Y, Z);
|
|
||||||
}
|
|
||||||
return vector;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
Vector3 vector = (Vector3)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = vector.X;
|
|
||||||
((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y;
|
|
||||||
((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(Vector3); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Single.SqlType, NHibernateUtil.Single.SqlType, NHibernateUtil.Single.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
This directory contains migration scripts for migrating from other
|
|
||||||
database backends in OpenSim to the NHibernate version of that same
|
|
||||||
database driver.
|
|
|
@ -1,5 +0,0 @@
|
||||||
-- The following converts the UUID from XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
||||||
-- to XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. This puts it in Guid native format
|
|
||||||
-- for .NET, and the prefered format for LLUUID.
|
|
||||||
|
|
||||||
update assets set UUID = SUBSTR(UUID,1,8) || "-" || SUBSTR(UUID,9,4) || "-" || SUBSTR(UUID,13,4) || "-" || SUBSTR(UUID,17,4) || "-" || SUBSTR(UUID,21,12) where UUID not like '%-%';
|
|
|
@ -1,43 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
# -- CREATE TABLE inventoryitems(UUID varchar(255) primary key,
|
|
||||||
# -- assetID varchar(255),
|
|
||||||
# -- assetType integer,
|
|
||||||
# -- invType integer,
|
|
||||||
# -- parentFolderID varchar(255),
|
|
||||||
# -- avatarID varchar(255),
|
|
||||||
# -- creatorsID varchar(255),
|
|
||||||
# -- inventoryName varchar(255),
|
|
||||||
# -- inventoryDescription varchar(255),
|
|
||||||
# -- inventoryNextPermissions integer,
|
|
||||||
# -- inventoryCurrentPermissions integer,
|
|
||||||
# -- inventoryBasePermissions integer,
|
|
||||||
# -- inventoryEveryOnePermissions integer);
|
|
||||||
|
|
||||||
# -- CREATE TABLE inventoryfolders(UUID varchar(255) primary key,
|
|
||||||
# -- name varchar(255),
|
|
||||||
# -- agentID varchar(255),
|
|
||||||
# -- parentID varchar(255),
|
|
||||||
# -- type integer,
|
|
||||||
# -- version integer);
|
|
||||||
|
|
||||||
my $items = "INSERT INTO InventoryItems(ID, AssetID, AssetType, InvType, Folder, Owner, Creator, Name, Description, NextPermissions, CurrentPermissions, BasePermissions, EveryOnePermissions) ";
|
|
||||||
my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) ";
|
|
||||||
|
|
||||||
open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration";
|
|
||||||
open(WRITE,"| sqlite3 Inventory.db");
|
|
||||||
|
|
||||||
while(my $line = <SQLITE>) {
|
|
||||||
$line =~ s/([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})/$1-$2-$3-$4-$5/g;
|
|
||||||
if($line =~ s/(INSERT INTO "inventoryitems")/$items/) {
|
|
||||||
print $line;
|
|
||||||
print WRITE $line;
|
|
||||||
}
|
|
||||||
if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) {
|
|
||||||
print $line;
|
|
||||||
print WRITE $line;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
close(WRITE);
|
|
||||||
close(SQLITE);
|
|
|
@ -1,135 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using log4net;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A User storage interface for the DB4o database system
|
|
||||||
/// </summary>
|
|
||||||
public class NHibernateAssetData : AssetDataBase
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private NHibernateManager manager;
|
|
||||||
public NHibernateManager Manager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return manager;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override public void Dispose() { }
|
|
||||||
|
|
||||||
public override void Initialise()
|
|
||||||
{
|
|
||||||
m_log.Info("[NHibernateGridData]: " + Name + " cannot be default-initialized!");
|
|
||||||
throw new PluginNotInitialisedException(Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialise(string connect)
|
|
||||||
{
|
|
||||||
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateAssetData");
|
|
||||||
manager = new NHibernateManager(connect, "AssetStore");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override public AssetBase GetAsset(UUID uuid)
|
|
||||||
{
|
|
||||||
return (AssetBase)manager.Get(typeof(AssetBase), uuid);
|
|
||||||
}
|
|
||||||
|
|
||||||
override public void StoreAsset(AssetBase asset)
|
|
||||||
{
|
|
||||||
AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID);
|
|
||||||
if (temp == null)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID);
|
|
||||||
manager.Insert(asset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID);
|
|
||||||
manager.Update(asset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// private void LogAssetLoad(AssetBase asset)
|
|
||||||
// {
|
|
||||||
// string temporary = asset.Temporary ? "Temporary" : "Stored";
|
|
||||||
// string local = asset.Local ? "Local" : "Remote";
|
|
||||||
|
|
||||||
// int assetLength = (asset.Data != null) ? asset.Data.Length : 0;
|
|
||||||
|
|
||||||
// m_log.Info("[SQLITE]: " +
|
|
||||||
// string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
|
|
||||||
// asset.FullID, asset.Name, asset.Description, asset.Type,
|
|
||||||
// asset.InvType, temporary, local, assetLength));
|
|
||||||
// }
|
|
||||||
|
|
||||||
override public bool ExistsAsset(UUID uuid)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid);
|
|
||||||
return (GetAsset(uuid) != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns a list of AssetMetadata objects. The list is a subset of
|
|
||||||
/// the entire data set offset by <paramref name="start" /> containing
|
|
||||||
/// <paramref name="count" /> elements.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="start">The number of results to discard from the total data set.</param>
|
|
||||||
/// <param name="count">The number of rows the returned list should contain.</param>
|
|
||||||
/// <returns>A list of AssetMetadata objects.</returns>
|
|
||||||
public override List<AssetMetadata> FetchAssetMetadataSet(int start, int count)
|
|
||||||
{
|
|
||||||
List<AssetMetadata> retList = new List<AssetMetadata>(count);
|
|
||||||
return retList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteAsset(UUID uuid)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Name {
|
|
||||||
get { return "NHibernate"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Version {
|
|
||||||
get { return "0.1"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,168 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.Criterion;
|
|
||||||
using System.Collections;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A User storage interface for the DB4o database system
|
|
||||||
/// </summary>
|
|
||||||
public class NHibernateEstateData : IEstateDataStore
|
|
||||||
{
|
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private NHibernateManager manager;
|
|
||||||
public NHibernateManager Manager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return manager;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get { return "NHibernateEstateData"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Version
|
|
||||||
{
|
|
||||||
get { return "0.1"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Startup and shutdown.
|
|
||||||
|
|
||||||
public void Initialise()
|
|
||||||
{
|
|
||||||
m_log.Info("[NHIBERNATE]: " + Name + " cannot be default-initialized!");
|
|
||||||
throw new PluginNotInitialisedException(Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Initialise(string connect)
|
|
||||||
{
|
|
||||||
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] Initializing " + Name + ".");
|
|
||||||
manager = new NHibernateManager(connect, "EstateStore");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() { }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEstateDataStore Members
|
|
||||||
|
|
||||||
public EstateSettings LoadEstateSettings(UUID regionID)
|
|
||||||
{
|
|
||||||
EstateRegionLink link = LoadEstateRegionLink(regionID);
|
|
||||||
|
|
||||||
// Ensure that estate settings exist for the link
|
|
||||||
if (link != null)
|
|
||||||
{
|
|
||||||
if (manager.GetWithStatefullSession(typeof(EstateSettings), link.EstateID) == null)
|
|
||||||
{
|
|
||||||
// Delete broken link
|
|
||||||
manager.Delete(link);
|
|
||||||
link = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If estate link does not exist create estate settings and link it to region.
|
|
||||||
if (link == null)
|
|
||||||
{
|
|
||||||
EstateSettings estateSettings = new EstateSettings();
|
|
||||||
//estateSettings.EstateOwner = UUID.Random();
|
|
||||||
//estateSettings.BlockDwell = false;
|
|
||||||
object identifier = manager.Insert(estateSettings);
|
|
||||||
|
|
||||||
if (identifier == null)
|
|
||||||
{
|
|
||||||
// Saving failed. Error is logged in the manager.
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint estateID = (uint)identifier;
|
|
||||||
link = new EstateRegionLink();
|
|
||||||
link.EstateRegionLinkID = UUID.Random();
|
|
||||||
link.RegionID = regionID;
|
|
||||||
link.EstateID = estateID;
|
|
||||||
manager.InsertWithStatefullSession(link);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load estate settings according to the existing or created link.
|
|
||||||
return (EstateSettings)manager.GetWithStatefullSession(typeof(EstateSettings), link.EstateID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StoreEstateSettings(EstateSettings estateSettings)
|
|
||||||
{
|
|
||||||
// Estates are always updated when stored.
|
|
||||||
// Insert is always done via. load method as with the current API
|
|
||||||
// this is explicitly the only way to create region link.
|
|
||||||
manager.UpdateWithStatefullSession(estateSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Utility Methods
|
|
||||||
private EstateRegionLink LoadEstateRegionLink(UUID regionID)
|
|
||||||
{
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(EstateRegionLink));
|
|
||||||
criteria.Add(Expression.Eq("RegionID", regionID));
|
|
||||||
IList links = criteria.List();
|
|
||||||
|
|
||||||
// Fail fast if more than one estate links exist
|
|
||||||
if (links.Count > 1)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE]: Region had more than one estate linked: " + regionID);
|
|
||||||
throw new Exception("[NHIBERNATE]: Region had more than one estate linked: " + regionID);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (links.Count == 1)
|
|
||||||
{
|
|
||||||
return (EstateRegionLink)links[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,236 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.Criterion;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A GridData Interface to the NHibernate database
|
|
||||||
/// </summary>
|
|
||||||
public class NHibernateGridData : GridDataBase
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private NHibernateManager manager;
|
|
||||||
public NHibernateManager Manager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return manager;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialise()
|
|
||||||
{
|
|
||||||
m_log.Info("[NHibernateGridData]: " + Name + " cannot be default-initialized!");
|
|
||||||
throw new PluginNotInitialisedException(Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialise(string connect)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateGridData");
|
|
||||||
manager = new NHibernateManager(connect, "GridStore");
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* Public Interface Functions
|
|
||||||
*
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
public override void Dispose() { }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The plugin being loaded
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>A string containing the plugin name</returns>
|
|
||||||
public override string Name
|
|
||||||
{
|
|
||||||
get { return "NHibernate Grid Data Interface"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The plugins version
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>A string containing the plugin version</returns>
|
|
||||||
public override string Version
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
Module module = GetType().Module;
|
|
||||||
Version dllVersion = module.Assembly.GetName().Version;
|
|
||||||
|
|
||||||
return string.Format("{0}.{1}.{2}.{3}",
|
|
||||||
dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey)
|
|
||||||
{
|
|
||||||
bool throwHissyFit = false; // Should be true by 1.0
|
|
||||||
|
|
||||||
if (throwHissyFit)
|
|
||||||
throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
|
|
||||||
|
|
||||||
RegionProfileData data = GetProfileByUUID(UUID);
|
|
||||||
|
|
||||||
return (regionHandle == data.regionHandle && simrecvkey == data.regionSecret);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ReservationData GetReservationAtPoint(uint x, uint y)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override DataResponse StoreProfile(RegionProfileData profile)
|
|
||||||
{
|
|
||||||
if (manager.Get(typeof(RegionProfileData), profile.Uuid) == null)
|
|
||||||
{
|
|
||||||
manager.Insert(profile);
|
|
||||||
return DataResponse.RESPONSE_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
manager.Update(profile);
|
|
||||||
return DataResponse.RESPONSE_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override DataResponse DeleteProfile(string uuid)
|
|
||||||
{
|
|
||||||
RegionProfileData regionProfileData = (RegionProfileData)manager.Get(typeof(RegionProfileData), new UUID(uuid));
|
|
||||||
if (regionProfileData != null)
|
|
||||||
{
|
|
||||||
manager.Delete(regionProfileData);
|
|
||||||
return DataResponse.RESPONSE_OK;
|
|
||||||
}
|
|
||||||
return DataResponse.RESPONSE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RegionProfileData GetProfileByUUID(UUID UUID)
|
|
||||||
{
|
|
||||||
return (RegionProfileData)manager.Get(typeof(RegionProfileData), UUID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RegionProfileData GetProfileByHandle(ulong regionHandle)
|
|
||||||
{
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
|
|
||||||
criteria.Add(Expression.Eq("RegionHandle", regionHandle));
|
|
||||||
|
|
||||||
IList regions = criteria.List();
|
|
||||||
|
|
||||||
if (regions.Count == 1)
|
|
||||||
{
|
|
||||||
return (RegionProfileData)regions[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RegionProfileData GetProfileByString(string regionName)
|
|
||||||
{
|
|
||||||
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
|
|
||||||
criteria.Add(Expression.Eq("RegionName", regionName));
|
|
||||||
|
|
||||||
IList regions = criteria.List();
|
|
||||||
|
|
||||||
if (regions.Count == 1)
|
|
||||||
{
|
|
||||||
return (RegionProfileData)regions[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax)
|
|
||||||
{
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
|
|
||||||
criteria.Add(Expression.Ge("RegionLocX", Xmin));
|
|
||||||
criteria.Add(Expression.Ge("RegionLocY", Ymin));
|
|
||||||
criteria.Add(Expression.Le("RegionLocX", Xmax));
|
|
||||||
criteria.Add(Expression.Le("RegionLocY", Ymax));
|
|
||||||
|
|
||||||
IList regions = criteria.List();
|
|
||||||
RegionProfileData[] regionArray = new RegionProfileData[regions.Count];
|
|
||||||
|
|
||||||
for (int i=0;i<regionArray.Length;i++)
|
|
||||||
{
|
|
||||||
regionArray[i] = (RegionProfileData)regions[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return regionArray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override List<RegionProfileData> GetRegionsByName(string namePrefix, uint maxNum)
|
|
||||||
{
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
|
|
||||||
criteria.SetMaxResults((int)maxNum);
|
|
||||||
|
|
||||||
criteria.Add(Expression.Like("RegionName", namePrefix, MatchMode.Start));
|
|
||||||
|
|
||||||
IList regions = criteria.List();
|
|
||||||
List<RegionProfileData> regionList = new List<RegionProfileData>();
|
|
||||||
|
|
||||||
foreach (RegionProfileData regionProfileData in regions)
|
|
||||||
{
|
|
||||||
regionList.Add(regionProfileData);
|
|
||||||
}
|
|
||||||
|
|
||||||
return regionList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,382 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.Criterion;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
public class NHibernateInventoryData: IInventoryDataPlugin
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private NHibernateManager manager;
|
|
||||||
public NHibernateManager Manager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return 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!");
|
|
||||||
throw new PluginNotInitialisedException (Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initialises the interface
|
|
||||||
/// </summary>
|
|
||||||
public void Initialise(string connect)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateInventoryData");
|
|
||||||
manager = new NHibernateManager(connect, "InventoryStore");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Closes the interface
|
|
||||||
/// </summary>
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
*
|
|
||||||
* Basic CRUD operations on Data
|
|
||||||
*
|
|
||||||
****************************************************************/
|
|
||||||
|
|
||||||
// READ
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns an inventory item by its UUID
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item">The UUID of the item to be returned</param>
|
|
||||||
/// <returns>A class containing item information</returns>
|
|
||||||
public InventoryItemBase getInventoryItem(UUID item)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] getInventoryItem {0}", item);
|
|
||||||
return (InventoryItemBase)manager.Get(typeof(InventoryItemBase), item);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("Couldn't find inventory item: {0}", item);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new inventory item based on item
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item">The item to be created</param>
|
|
||||||
public void addInventoryItem(InventoryItemBase item)
|
|
||||||
{
|
|
||||||
if (!ExistsItem(item.ID))
|
|
||||||
{
|
|
||||||
manager.Insert(item);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Item {0} that already exists, updating instead", item.ID);
|
|
||||||
updateInventoryItem(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updates an inventory item with item (updates based on ID)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item">The updated item</param>
|
|
||||||
public void updateInventoryItem(InventoryItemBase item)
|
|
||||||
{
|
|
||||||
if (ExistsItem(item.ID))
|
|
||||||
{
|
|
||||||
manager.Update(item);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Item {0} that already exists", item.ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item"></param>
|
|
||||||
public void deleteInventoryItem(UUID itemID)
|
|
||||||
{
|
|
||||||
InventoryItemBase item = (InventoryItemBase)manager.Get(typeof(InventoryItemBase), itemID);
|
|
||||||
if (item != null)
|
|
||||||
{
|
|
||||||
manager.Delete(item);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Error deleting InventoryItemBase {0}", itemID);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public InventoryItemBase queryInventoryItem(UUID itemID)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public InventoryFolderBase queryInventoryFolder(UUID folderID)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns an inventory folder by its UUID
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="folder">The UUID of the folder to be returned</param>
|
|
||||||
/// <returns>A class containing folder information</returns>
|
|
||||||
public InventoryFolderBase getInventoryFolder(UUID folder)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return (InventoryFolderBase)manager.Get(typeof(InventoryFolderBase), folder);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Couldn't find inventory item: {0}", folder);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new inventory folder based on folder
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="folder">The folder to be created</param>
|
|
||||||
public void addInventoryFolder(InventoryFolderBase folder)
|
|
||||||
{
|
|
||||||
if (!ExistsFolder(folder.ID))
|
|
||||||
{
|
|
||||||
manager.Insert(folder);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Folder {0} that already exists, updating instead", folder.ID);
|
|
||||||
updateInventoryFolder(folder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updates an inventory folder with folder (updates based on ID)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="folder">The updated folder</param>
|
|
||||||
public void updateInventoryFolder(InventoryFolderBase folder)
|
|
||||||
{
|
|
||||||
if (ExistsFolder(folder.ID))
|
|
||||||
{
|
|
||||||
manager.Update(folder);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Folder {0} that already exists", folder.ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="folder"></param>
|
|
||||||
public void deleteInventoryFolder(UUID folderID)
|
|
||||||
{
|
|
||||||
InventoryFolderBase item = (InventoryFolderBase)manager.Get(typeof(InventoryFolderBase), folderID);
|
|
||||||
if (item != null)
|
|
||||||
{
|
|
||||||
manager.Delete(item);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Error deleting InventoryFolderBase {0}", folderID);
|
|
||||||
}
|
|
||||||
manager.Delete(folderID);
|
|
||||||
}
|
|
||||||
|
|
||||||
// useful private methods
|
|
||||||
private bool ExistsItem(UUID uuid)
|
|
||||||
{
|
|
||||||
return (getInventoryItem(uuid) != null) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool ExistsFolder(UUID uuid)
|
|
||||||
{
|
|
||||||
return (getInventoryFolder(uuid) != null) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Shutdown()
|
|
||||||
{
|
|
||||||
// TODO: DataSet commit
|
|
||||||
}
|
|
||||||
|
|
||||||
// Move seems to be just update
|
|
||||||
|
|
||||||
public void moveInventoryFolder(InventoryFolderBase folder)
|
|
||||||
{
|
|
||||||
updateInventoryFolder(folder);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void moveInventoryItem(InventoryItemBase item)
|
|
||||||
{
|
|
||||||
updateInventoryItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns a list of inventory items contained within the specified folder
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="folderID">The UUID of the target folder</param>
|
|
||||||
/// <returns>A List of InventoryItemBase items</returns>
|
|
||||||
public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
|
|
||||||
{
|
|
||||||
// try {
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryItemBase));
|
|
||||||
criteria.Add(Expression.Eq("Folder", folderID));
|
|
||||||
List<InventoryItemBase> list = new List<InventoryItemBase>();
|
|
||||||
foreach (InventoryItemBase item in criteria.List())
|
|
||||||
{
|
|
||||||
list.Add(item);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
// }
|
|
||||||
// catch
|
|
||||||
// {
|
|
||||||
// return new List<InventoryItemBase>();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<InventoryFolderBase> getUserRootFolders(UUID user)
|
|
||||||
{
|
|
||||||
return new List<InventoryFolderBase>();
|
|
||||||
}
|
|
||||||
|
|
||||||
// see InventoryItemBase.getUserRootFolder
|
|
||||||
public InventoryFolderBase getUserRootFolder(UUID user)
|
|
||||||
{
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryFolderBase));
|
|
||||||
criteria.Add(Expression.Eq("ParentID", UUID.Zero));
|
|
||||||
criteria.Add(Expression.Eq("Owner", user));
|
|
||||||
foreach (InventoryFolderBase folder in criteria.List())
|
|
||||||
{
|
|
||||||
return folder;
|
|
||||||
}
|
|
||||||
m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Append a list of all the child folders of a parent folder
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="folders">list where folders will be appended</param>
|
|
||||||
/// <param name="parentID">ID of parent</param>
|
|
||||||
private void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
|
|
||||||
{
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryFolderBase));
|
|
||||||
criteria.Add(Expression.Eq("ParentID", parentID));
|
|
||||||
foreach (InventoryFolderBase item in criteria.List())
|
|
||||||
{
|
|
||||||
folders.Add(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns a list of inventory folders contained in the folder 'parentID'
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="parentID">The folder to get subfolders for</param>
|
|
||||||
/// <returns>A list of inventory folders</returns>
|
|
||||||
public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
|
|
||||||
{
|
|
||||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
|
||||||
getInventoryFolders(ref folders, parentID);
|
|
||||||
return folders;
|
|
||||||
}
|
|
||||||
|
|
||||||
// See IInventoryDataPlugin
|
|
||||||
public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
|
|
||||||
{
|
|
||||||
if (parentID == UUID.Zero)
|
|
||||||
{
|
|
||||||
// Zero UUID is not a real parent folder.
|
|
||||||
return new List<InventoryFolderBase>();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
|
||||||
|
|
||||||
getInventoryFolders(ref folders, parentID);
|
|
||||||
|
|
||||||
for (int i = 0; i < folders.Count; i++)
|
|
||||||
getInventoryFolders(ref folders, folders[i].ID);
|
|
||||||
|
|
||||||
return folders;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<InventoryItemBase> fetchActiveGestures (UUID avatarID)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,345 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data.Common;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.Cfg;
|
|
||||||
using NHibernate.Tool.hbm2ddl;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using Environment=NHibernate.Cfg.Environment;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
public class NHibernateManager
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private string dialect;
|
|
||||||
private Configuration configuration;
|
|
||||||
private ISessionFactory sessionFactory;
|
|
||||||
|
|
||||||
#region Initialization
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initiate NHibernate Manager
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
|
|
||||||
/// <param name="store">Name of the store</param>
|
|
||||||
public NHibernateManager(string connect, string store)
|
|
||||||
{
|
|
||||||
ParseConnectionString(connect);
|
|
||||||
|
|
||||||
//To create sql file uncomment code below and write the name of the file
|
|
||||||
//SchemaExport exp = new SchemaExport(cfg);
|
|
||||||
//exp.SetOutputFile("nameofthefile.sql");
|
|
||||||
//exp.Create(false, true);
|
|
||||||
|
|
||||||
Assembly assembly = GetType().Assembly;
|
|
||||||
|
|
||||||
sessionFactory = configuration.BuildSessionFactory();
|
|
||||||
RunMigration(dialect, assembly, store);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initiate NHibernate Manager with spesific assembly
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
|
|
||||||
/// <param name="store">Name of the store</param>
|
|
||||||
/// <param name="assembly">Outside assembly to be included </param>
|
|
||||||
public NHibernateManager(string connect, string store, Assembly assembly)
|
|
||||||
{
|
|
||||||
ParseConnectionString(connect);
|
|
||||||
|
|
||||||
configuration.AddAssembly(assembly);
|
|
||||||
sessionFactory = configuration.BuildSessionFactory();
|
|
||||||
RunMigration(dialect, assembly, store);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Parses the connection string and creates the NHibernate configuration
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
|
|
||||||
private void ParseConnectionString(string connect)
|
|
||||||
{
|
|
||||||
// Split out the dialect, driver, and connect string
|
|
||||||
char[] split = { ';' };
|
|
||||||
string[] parts = connect.Split(split, 3);
|
|
||||||
if (parts.Length != 3)
|
|
||||||
{
|
|
||||||
// TODO: make this a real exception type
|
|
||||||
throw new Exception("Malformed Inventory connection string '" + connect + "'");
|
|
||||||
}
|
|
||||||
|
|
||||||
dialect = parts[0];
|
|
||||||
|
|
||||||
// NHibernate setup
|
|
||||||
configuration = new Configuration();
|
|
||||||
configuration.SetProperty(Environment.ConnectionProvider,
|
|
||||||
"NHibernate.Connection.DriverConnectionProvider");
|
|
||||||
configuration.SetProperty(Environment.Dialect,
|
|
||||||
"NHibernate.Dialect." + dialect);
|
|
||||||
configuration.SetProperty(Environment.ConnectionDriver,
|
|
||||||
"NHibernate.Driver." + parts[1]);
|
|
||||||
configuration.SetProperty(Environment.ConnectionString, parts[2]);
|
|
||||||
configuration.AddAssembly("OpenSim.Data.NHibernate");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Runs migration for the the store in assembly
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dialect">Dialect in use</param>
|
|
||||||
/// <param name="assembly">Assembly where migration files exist</param>
|
|
||||||
/// <param name="store">Name of the store in use</param>
|
|
||||||
private void RunMigration(string dialect, Assembly assembly, string store)
|
|
||||||
{
|
|
||||||
// Migration subtype is the folder name under which migrations are stored. For mysql this folder is
|
|
||||||
// MySQLDialect instead of MySQL5Dialect which is the dialect currently in use. To avoid renaming
|
|
||||||
// this folder each time the mysql version changes creating simple mapping:
|
|
||||||
String migrationSubType = dialect;
|
|
||||||
if (dialect.StartsWith("MySQL"))
|
|
||||||
{
|
|
||||||
migrationSubType = "MySQLDialect";
|
|
||||||
}
|
|
||||||
|
|
||||||
Migration migration = new Migration((DbConnection)sessionFactory.ConnectionProvider.GetConnection(), assembly, migrationSubType, store);
|
|
||||||
migration.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets object of given type from database with given id.
|
|
||||||
/// Uses stateless session for efficiency.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">Type of the object.</param>
|
|
||||||
/// <param name="id">Id of the object.</param>
|
|
||||||
/// <returns>The object or null if object was not found.</returns>
|
|
||||||
public object Get(Type type, Object id)
|
|
||||||
{
|
|
||||||
using (IStatelessSession session = sessionFactory.OpenStatelessSession())
|
|
||||||
{
|
|
||||||
object obj = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
obj = session.Get(type.FullName, id);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets object of given type from database with given id.
|
|
||||||
/// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">Type of the object.</param>
|
|
||||||
/// <param name="id">Id of the object.</param>
|
|
||||||
/// <returns>The object or null if object was not found.</returns>
|
|
||||||
public object GetWithStatefullSession(Type type, Object id)
|
|
||||||
{
|
|
||||||
using (ISession session = sessionFactory.OpenSession())
|
|
||||||
{
|
|
||||||
object obj = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
obj = session.Get(type.FullName, id);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Inserts given object to database.
|
|
||||||
/// Uses stateless session for efficiency.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">Object to be insterted.</param>
|
|
||||||
/// <returns>Identifier of the object. Useful for situations when NHibernate generates the identifier.</returns>
|
|
||||||
public object Insert(object obj)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (IStatelessSession session = sessionFactory.OpenStatelessSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction=session.BeginTransaction())
|
|
||||||
{
|
|
||||||
Object identifier=session.Insert(obj);
|
|
||||||
transaction.Commit();
|
|
||||||
return identifier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue inserting object ", e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Inserts given object to database.
|
|
||||||
/// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">Object to be insterted.</param>
|
|
||||||
/// <returns>Identifier of the object. Useful for situations when NHibernate generates the identifier.</returns>
|
|
||||||
public object InsertWithStatefullSession(object obj)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (ISession session = sessionFactory.OpenSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
|
||||||
{
|
|
||||||
Object identifier = session.Save(obj);
|
|
||||||
transaction.Commit();
|
|
||||||
return identifier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue inserting object ", e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updates given object to database.
|
|
||||||
/// Uses stateless session for efficiency.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">Object to be updated.</param>
|
|
||||||
/// <returns>True if operation was succesful.</returns>
|
|
||||||
public bool Update(object obj)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (IStatelessSession session = sessionFactory.OpenStatelessSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
|
||||||
{
|
|
||||||
session.Update(obj);
|
|
||||||
transaction.Commit();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue updating object ", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updates given object to database.
|
|
||||||
/// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">Object to be updated.</param>
|
|
||||||
/// <returns>True if operation was succesful.</returns>
|
|
||||||
public bool UpdateWithStatefullSession(object obj)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (ISession session = sessionFactory.OpenSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
|
||||||
{
|
|
||||||
session.Update(obj);
|
|
||||||
transaction.Commit();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue updating object ", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Deletes given object from database.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">Object to be deleted.</param>
|
|
||||||
/// <returns>True if operation was succesful.</returns>
|
|
||||||
public bool Delete(object obj)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (IStatelessSession session = sessionFactory.OpenStatelessSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
|
||||||
{
|
|
||||||
session.Delete(obj);
|
|
||||||
transaction.Commit();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue deleting object ", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns statefull session which can be used to execute custom nhibernate or sql queries.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Statefull session</returns>
|
|
||||||
public ISession GetSession()
|
|
||||||
{
|
|
||||||
return sessionFactory.OpenSession();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Drops the database schema. This exist for unit tests. It should not be invoked from other than test teardown.
|
|
||||||
/// </summary>
|
|
||||||
public void DropSchema()
|
|
||||||
{
|
|
||||||
SchemaExport export = new SchemaExport(this.configuration);
|
|
||||||
export.Drop(true, true);
|
|
||||||
|
|
||||||
using (ISession session = sessionFactory.OpenSession())
|
|
||||||
{
|
|
||||||
ISQLQuery sqlQuery = session.CreateSQLQuery("drop table migrations");
|
|
||||||
sqlQuery.ExecuteUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,426 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.Criterion;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
|
||||||
using OpenSim.Region.Framework.Scenes;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A RegionData Interface to the NHibernate database
|
|
||||||
/// </summary>
|
|
||||||
public class NHibernateRegionData : IRegionDataStore
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private NHibernateManager manager;
|
|
||||||
public NHibernateManager Manager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return manager;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Initialise(string connect)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateRegionData");
|
|
||||||
manager = new NHibernateManager(connect, "RegionStore");
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* Public Interface Functions
|
|
||||||
*
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
public void Dispose() {}
|
|
||||||
|
|
||||||
public void StoreRegionSettings(RegionSettings rs)
|
|
||||||
{
|
|
||||||
RegionSettings oldRegionSettings = (RegionSettings)manager.Get(typeof(RegionSettings), rs.RegionUUID);
|
|
||||||
if (oldRegionSettings != null)
|
|
||||||
{
|
|
||||||
manager.Update(rs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
manager.Insert(rs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
|
||||||
{
|
|
||||||
RegionSettings regionSettings = (RegionSettings) manager.Get(typeof(RegionSettings), regionUUID);
|
|
||||||
|
|
||||||
if (regionSettings == null)
|
|
||||||
{
|
|
||||||
regionSettings = new RegionSettings();
|
|
||||||
regionSettings.RegionUUID = regionUUID;
|
|
||||||
manager.Insert(regionSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
regionSettings.OnSave += StoreRegionSettings;
|
|
||||||
|
|
||||||
return regionSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This looks inefficient, but it turns out that it isn't
|
|
||||||
// based on trial runs with nhibernate 1.2
|
|
||||||
private void SaveOrUpdate(SceneObjectPart p)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SceneObjectPart old = (SceneObjectPart)manager.Get(typeof(SceneObjectPart), p.UUID);
|
|
||||||
if (old != null)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] updating object {0}", p.UUID);
|
|
||||||
manager.Update(p);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] saving object {0}", p.UUID);
|
|
||||||
manager.Insert(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue saving part", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveOrUpdate(Terrain t)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
Terrain old = (Terrain)manager.Get(typeof(Terrain), t.RegionID);
|
|
||||||
if (old != null)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] updating terrain {0}", t.RegionID);
|
|
||||||
manager.Update(t);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] saving terrain {0}", t.RegionID);
|
|
||||||
manager.Insert(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] issue saving terrain", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Adds an object into region storage
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">the object</param>
|
|
||||||
/// <param name="regionUUID">the region UUID</param>
|
|
||||||
public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
|
|
||||||
{
|
|
||||||
uint flags = obj.RootPart.GetEffectiveObjectFlags();
|
|
||||||
|
|
||||||
// Eligibility check
|
|
||||||
if ((flags & (uint)PrimFlags.Temporary) != 0)
|
|
||||||
return;
|
|
||||||
if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach (SceneObjectPart part in obj.Children.Values)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("Storing part {0}", part.UUID);
|
|
||||||
SaveOrUpdate(part);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("Can't save: ", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private SceneObjectGroup LoadObject(UUID uuid, UUID region)
|
|
||||||
{
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(SceneObjectPart));
|
|
||||||
criteria.Add(Expression.Eq("RegionID", region));
|
|
||||||
criteria.Add(Expression.Eq("ParentUUID", uuid));
|
|
||||||
criteria.AddOrder(Order.Asc("ParentID"));
|
|
||||||
|
|
||||||
IList<SceneObjectPart> parts = criteria.List<SceneObjectPart>();
|
|
||||||
|
|
||||||
SceneObjectGroup group = null;
|
|
||||||
|
|
||||||
// Find the root part
|
|
||||||
for (int i = 0; i < parts.Count; i++)
|
|
||||||
{
|
|
||||||
if (parts[i].UUID == uuid)
|
|
||||||
{
|
|
||||||
group = new SceneObjectGroup(parts[i]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the children parts
|
|
||||||
if (group != null)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < parts.Count; i++)
|
|
||||||
{
|
|
||||||
if (parts[i].UUID != uuid)
|
|
||||||
group.AddPart(parts[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE]: LoadObject() Attempted to load a SceneObjectGroup with no root SceneObjectPart ");
|
|
||||||
}
|
|
||||||
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Removes an object from region storage
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="obj">the object</param>
|
|
||||||
/// <param name="regionUUID">the region UUID</param>
|
|
||||||
public void RemoveObject(UUID obj, UUID regionUUID)
|
|
||||||
{
|
|
||||||
SceneObjectGroup g = LoadObject(obj, regionUUID);
|
|
||||||
foreach (SceneObjectPart p in g.Children.Values)
|
|
||||||
{
|
|
||||||
manager.Delete(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
// m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Load persisted objects from region storage.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="regionUUID">The region UUID</param>
|
|
||||||
/// <returns>List of loaded groups</returns>
|
|
||||||
public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
|
|
||||||
{
|
|
||||||
Dictionary<UUID, SceneObjectGroup> SOG = new Dictionary<UUID, SceneObjectGroup>();
|
|
||||||
List<SceneObjectGroup> ret = new List<SceneObjectGroup>();
|
|
||||||
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(SceneObjectPart));
|
|
||||||
criteria.Add(Expression.Eq("RegionID", regionUUID));
|
|
||||||
criteria.AddOrder(Order.Asc("ParentID"));
|
|
||||||
criteria.AddOrder(Order.Asc("LinkNum"));
|
|
||||||
foreach (SceneObjectPart p in criteria.List())
|
|
||||||
{
|
|
||||||
// root part
|
|
||||||
if (p.UUID == p.ParentUUID)
|
|
||||||
{
|
|
||||||
SceneObjectGroup group = new SceneObjectGroup(p);
|
|
||||||
SOG.Add(p.ParentUUID, group);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SOG[p.ParentUUID].AddPart(p);
|
|
||||||
}
|
|
||||||
// get the inventory
|
|
||||||
|
|
||||||
ICriteria InvCriteria = manager.GetSession().CreateCriteria(typeof(TaskInventoryItem));
|
|
||||||
InvCriteria.Add(Expression.Eq("ParentPartID", p.UUID));
|
|
||||||
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
|
|
||||||
foreach (TaskInventoryItem i in InvCriteria.List())
|
|
||||||
{
|
|
||||||
inventory.Add(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inventory.Count > 0)
|
|
||||||
p.Inventory.RestoreInventoryItems(inventory);
|
|
||||||
}
|
|
||||||
foreach (SceneObjectGroup g in SOG.Values)
|
|
||||||
{
|
|
||||||
ret.Add(g);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Store a terrain revision in region storage
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="ter">terrain heightfield</param>
|
|
||||||
/// <param name="regionID">region UUID</param>
|
|
||||||
public void StoreTerrain(double[,] ter, UUID regionID)
|
|
||||||
{
|
|
||||||
lock (this) {
|
|
||||||
Terrain t = new Terrain(regionID, ter);
|
|
||||||
SaveOrUpdate(t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Load the latest terrain revision from region storage
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="regionID">the region UUID</param>
|
|
||||||
/// <returns>Heightfield data</returns>
|
|
||||||
public double[,] LoadTerrain(UUID regionID)
|
|
||||||
{
|
|
||||||
Terrain t = (Terrain)manager.Get(typeof(Terrain), regionID);
|
|
||||||
if (t != null)
|
|
||||||
{
|
|
||||||
return t.Doubles;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_log.Info("No terrain yet");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="globalID"></param>
|
|
||||||
public void RemoveLandObject(UUID globalID)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="parcel"></param>
|
|
||||||
public void StoreLandObject(ILandObject parcel)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="regionUUID"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public List<LandData> LoadLandObjects(UUID regionUUID)
|
|
||||||
{
|
|
||||||
List<LandData> landDataForRegion = new List<LandData>();
|
|
||||||
|
|
||||||
return landDataForRegion;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// See <see cref="Commit"/>
|
|
||||||
/// </summary>
|
|
||||||
public void Shutdown()
|
|
||||||
{
|
|
||||||
//session.Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Load a region banlist
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="regionUUID">the region UUID</param>
|
|
||||||
/// <returns>The banlist</returns>
|
|
||||||
public List<EstateBan> LoadRegionBanList(UUID regionUUID)
|
|
||||||
{
|
|
||||||
List<EstateBan> regionbanlist = new List<EstateBan>();
|
|
||||||
|
|
||||||
return regionbanlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Add en entry into region banlist
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item"></param>
|
|
||||||
public void AddToRegionBanlist(EstateBan item)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// remove an entry from the region banlist
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item"></param>
|
|
||||||
public void RemoveFromRegionBanlist(EstateBan item)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="val"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
// private static Array serializeTerrain(double[,] val)
|
|
||||||
// {
|
|
||||||
// MemoryStream str = new MemoryStream(65536*sizeof (double));
|
|
||||||
// BinaryWriter bw = new BinaryWriter(str);
|
|
||||||
//
|
|
||||||
// // TODO: COMPATIBILITY - Add byte-order conversions
|
|
||||||
// for (int x = 0; x < (int)Constants.RegionSize; x++)
|
|
||||||
// for (int y = 0; y < (int)Constants.RegionSize; y++)
|
|
||||||
// bw.Write(val[x, y]);
|
|
||||||
//
|
|
||||||
// return str.ToArray();
|
|
||||||
// }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// see IRegionDatastore
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="primID"></param>
|
|
||||||
/// <param name="items"></param>
|
|
||||||
public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
|
|
||||||
{
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(TaskInventoryItem));
|
|
||||||
criteria.Add(Expression.Eq("ParentPartID", primID));
|
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach (TaskInventoryItem i in criteria.List())
|
|
||||||
{
|
|
||||||
manager.Delete(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (TaskInventoryItem i in items)
|
|
||||||
{
|
|
||||||
manager.Insert(i);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("[NHIBERNATE] StoreInvetory", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,461 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.Criterion;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A User storage interface for the DB4o database system
|
|
||||||
/// </summary>
|
|
||||||
public class NHibernateUserData : UserDataBase
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private NHibernateManager manager;
|
|
||||||
public NHibernateManager Manager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return manager;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialise()
|
|
||||||
{
|
|
||||||
m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!");
|
|
||||||
throw new PluginNotInitialisedException (Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Initialise(string connect)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateUserData");
|
|
||||||
manager = new NHibernateManager(connect, "UserStore");
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool ExistsUser(UUID uuid)
|
|
||||||
{
|
|
||||||
UserProfileData user = null;
|
|
||||||
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] ExistsUser; {0}", uuid);
|
|
||||||
user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
|
|
||||||
|
|
||||||
if (user == null)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] User with given UUID does not exist {0} ", uuid);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override public UserProfileData GetUserByUUID(UUID uuid)
|
|
||||||
{
|
|
||||||
UserProfileData user;
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid);
|
|
||||||
|
|
||||||
user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
UserAgentData agent = GetAgentByUUID(uuid);
|
|
||||||
if (agent != null)
|
|
||||||
{
|
|
||||||
user.CurrentAgent = agent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return user;
|
|
||||||
}
|
|
||||||
|
|
||||||
override public void AddNewUserProfile(UserProfileData profile)
|
|
||||||
{
|
|
||||||
if (profile.ID == UUID.Zero)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add User {0} {1} with zero UUID, throwintg exception as this is programming error ", profile.FirstName, profile.SurName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ExistsUser(profile.ID))
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] AddNewUserProfile {0}", profile.ID);
|
|
||||||
manager.Insert(profile);
|
|
||||||
// Agent should not be saved according to BasicUserTest.T015_UserPersistency()
|
|
||||||
// SetAgentData(profile.ID, profile.CurrentAgent);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add User {0} {1} that already exists, updating instead", profile.FirstName, profile.SurName);
|
|
||||||
UpdateUserProfile(profile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
private void SetAgentData(UUID uuid, UserAgentData agent)
|
|
||||||
{
|
|
||||||
UserAgentData old = (UserAgentData)manager.Load(typeof(UserAgentData), uuid);
|
|
||||||
if (old != null)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] SetAgentData deleting old: {0} ",uuid);
|
|
||||||
manager.Delete(old);
|
|
||||||
}
|
|
||||||
if (agent != null)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] SetAgentData: {0} ", agent.ProfileID);
|
|
||||||
manager.Save(agent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
override public bool UpdateUserProfile(UserProfileData profile)
|
|
||||||
{
|
|
||||||
if (ExistsUser(profile.ID))
|
|
||||||
{
|
|
||||||
manager.Update(profile);
|
|
||||||
// Agent should not be saved according to BasicUserTest.T015_UserPersistency()
|
|
||||||
// SetAgentData(profile.ID, profile.CurrentAgent);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to update User {0} {1} that doesn't exist, updating instead", profile.FirstName, profile.SurName);
|
|
||||||
AddNewUserProfile(profile);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override public void AddNewUserAgent(UserAgentData agent)
|
|
||||||
{
|
|
||||||
if (agent.ProfileID == UUID.Zero)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add new user agent with zero user id. Agent session id: {0}", agent.SessionID);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (agent.SessionID == UUID.Zero)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat("[NHIBERNATE] Attempted to add new user agent with zero session id. User profile id: {0}", agent.SessionID);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
UserAgentData old = (UserAgentData)manager.Get(typeof(UserAgentData), agent.ProfileID);
|
|
||||||
if (old != null)
|
|
||||||
{
|
|
||||||
manager.Delete(old);
|
|
||||||
}
|
|
||||||
|
|
||||||
manager.Insert(agent);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateUserAgent(UserAgentData agent)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] UpdateUserAgent: {0} ", agent.ProfileID);
|
|
||||||
manager.Update(agent);
|
|
||||||
}
|
|
||||||
|
|
||||||
override public UserAgentData GetAgentByUUID(UUID uuid)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] GetAgentByUUID: {0} ", uuid);
|
|
||||||
return (UserAgentData)manager.Get(typeof(UserAgentData), uuid);
|
|
||||||
}
|
|
||||||
|
|
||||||
override public UserProfileData GetUserByName(string fname, string lname)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[NHIBERNATE] GetUserByName: {0} {1} ", fname, lname);
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(UserProfileData));
|
|
||||||
criteria.Add(Expression.Eq("FirstName", fname));
|
|
||||||
criteria.Add(Expression.Eq("SurName", lname));
|
|
||||||
foreach (UserProfileData profile in criteria.List())
|
|
||||||
{
|
|
||||||
profile.CurrentAgent = GetAgentByUUID(profile.ID);
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
override public UserAgentData GetAgentByName(string fname, string lname)
|
|
||||||
{
|
|
||||||
return GetUserByName(fname, lname).CurrentAgent;
|
|
||||||
}
|
|
||||||
|
|
||||||
override public UserAgentData GetAgentByName(string name)
|
|
||||||
{
|
|
||||||
return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
|
|
||||||
{
|
|
||||||
List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>();
|
|
||||||
string[] querysplit;
|
|
||||||
querysplit = query.Split(' ');
|
|
||||||
|
|
||||||
if (querysplit.Length == 2)
|
|
||||||
{
|
|
||||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(UserProfileData));
|
|
||||||
criteria.Add(Expression.Like("FirstName", querysplit[0]));
|
|
||||||
criteria.Add(Expression.Like("SurName", querysplit[1]));
|
|
||||||
foreach (UserProfileData profile in criteria.List())
|
|
||||||
{
|
|
||||||
AvatarPickerAvatar user = new AvatarPickerAvatar();
|
|
||||||
user.AvatarID = profile.ID;
|
|
||||||
user.firstName = profile.FirstName;
|
|
||||||
user.lastName = profile.SurName;
|
|
||||||
results.Add(user);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: actually implement these
|
|
||||||
public override void StoreWebLoginKey(UUID agentID, UUID webLoginKey)
|
|
||||||
{
|
|
||||||
UserProfileData user=GetUserByUUID(agentID);
|
|
||||||
user.WebLoginKey = webLoginKey;
|
|
||||||
UpdateUserProfile(user);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms)
|
|
||||||
{
|
|
||||||
if (!FriendRelationExists(ownerId,friendId))
|
|
||||||
{
|
|
||||||
manager.Insert(new UserFriend(UUID.Random(), ownerId, friendId, perms));
|
|
||||||
}
|
|
||||||
if (!FriendRelationExists(friendId, ownerId))
|
|
||||||
{
|
|
||||||
manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool FriendRelationExists(UUID ownerId, UUID friendId)
|
|
||||||
{
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
|
|
||||||
criteria.Add(Expression.Eq("OwnerID", ownerId));
|
|
||||||
criteria.Add(Expression.Eq("FriendID", friendId));
|
|
||||||
return criteria.List().Count > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void RemoveUserFriend(UUID ownerId, UUID friendId)
|
|
||||||
{
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
|
||||||
{
|
|
||||||
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
|
|
||||||
criteria.Add(Expression.Eq("OwnerID", ownerId));
|
|
||||||
criteria.Add(Expression.Eq("FriendID", friendId));
|
|
||||||
|
|
||||||
foreach (UserFriend userFriend in criteria.List())
|
|
||||||
{
|
|
||||||
session.Delete(userFriend);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
|
|
||||||
criteria.Add(Expression.Eq("OwnerID", friendId));
|
|
||||||
criteria.Add(Expression.Eq("FriendID", ownerId));
|
|
||||||
|
|
||||||
foreach (UserFriend userFriend in criteria.List())
|
|
||||||
{
|
|
||||||
session.Delete(userFriend);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
transaction.Commit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override void UpdateUserFriendPerms(UUID ownerId, UUID friendId, uint perms)
|
|
||||||
{
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
using (ITransaction transaction = session.BeginTransaction())
|
|
||||||
{
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
|
|
||||||
criteria.Add(Expression.Eq("OwnerID", ownerId));
|
|
||||||
criteria.Add(Expression.Eq("FriendID", friendId));
|
|
||||||
|
|
||||||
foreach (UserFriend userFriend in criteria.List())
|
|
||||||
{
|
|
||||||
userFriend.FriendPermissions = perms;
|
|
||||||
session.Update(userFriend);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transaction.Commit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override List<FriendListItem> GetUserFriendList(UUID ownerId)
|
|
||||||
{
|
|
||||||
List<FriendListItem> friendList=new List<FriendListItem>();
|
|
||||||
Dictionary<UUID, FriendListItem> friendListItemDictionary = new Dictionary<UUID, FriendListItem>();
|
|
||||||
|
|
||||||
using (ISession session = manager.GetSession())
|
|
||||||
{
|
|
||||||
ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
|
|
||||||
criteria.Add(Expression.Or(
|
|
||||||
Expression.Eq("OwnerID", ownerId),
|
|
||||||
Expression.Eq("FriendID", ownerId)
|
|
||||||
));
|
|
||||||
|
|
||||||
foreach (UserFriend userFriend in criteria.List())
|
|
||||||
{
|
|
||||||
if (userFriend.OwnerID == ownerId)
|
|
||||||
{
|
|
||||||
FriendListItem friendListItem = new FriendListItem();
|
|
||||||
friendListItem.FriendListOwner = userFriend.OwnerID;
|
|
||||||
friendListItem.Friend = userFriend.FriendID;
|
|
||||||
friendListItem.FriendPerms = userFriend.FriendPermissions;
|
|
||||||
friendListItemDictionary.Add(userFriend.FriendID, friendListItem);
|
|
||||||
friendList.Add(friendListItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reading permissions to other direction
|
|
||||||
foreach (UserFriend userFriend in criteria.List())
|
|
||||||
{
|
|
||||||
if (userFriend.FriendID == ownerId)
|
|
||||||
{
|
|
||||||
//Ignore if there is no reverse relation existing.
|
|
||||||
//if (friendListItemDictionary.ContainsKey(userFriend.OwnerID))
|
|
||||||
{
|
|
||||||
FriendListItem friendListItem = friendListItemDictionary[userFriend.OwnerID];
|
|
||||||
friendListItem.FriendListOwnerPerms = userFriend.FriendPermissions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return friendList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> friendsIds)
|
|
||||||
{
|
|
||||||
Dictionary<UUID, FriendRegionInfo> friendRegionInfos=new Dictionary<UUID, FriendRegionInfo>();
|
|
||||||
|
|
||||||
foreach (UUID friendId in friendsIds)
|
|
||||||
{
|
|
||||||
UserAgentData agent=GetAgentByUUID(friendId);
|
|
||||||
if (agent != null)
|
|
||||||
{
|
|
||||||
FriendRegionInfo fri = new FriendRegionInfo();
|
|
||||||
fri.isOnline = agent.AgentOnline;
|
|
||||||
fri.regionHandle = agent.Handle;
|
|
||||||
|
|
||||||
friendRegionInfos[friendId] = fri;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return friendRegionInfos;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return true; }
|
|
||||||
public override bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return true; }
|
|
||||||
|
|
||||||
/// Appearance
|
|
||||||
/// TODO: stubs for now to get us to a compiling state gently
|
|
||||||
public override AvatarAppearance GetUserAppearance(UUID user)
|
|
||||||
{
|
|
||||||
return (AvatarAppearance)manager.Get(typeof(AvatarAppearance), user);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool ExistsAppearance(UUID uuid)
|
|
||||||
{
|
|
||||||
AvatarAppearance appearance = (AvatarAppearance)manager.Get(typeof(AvatarAppearance), uuid);
|
|
||||||
if (appearance == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
|
|
||||||
{
|
|
||||||
if (appearance == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
appearance.Owner = user;
|
|
||||||
|
|
||||||
bool exists = ExistsAppearance(user);
|
|
||||||
if (exists)
|
|
||||||
{
|
|
||||||
manager.Update(appearance);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
manager.Insert(appearance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ResetAttachments(UUID userID)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LogoutUsers(UUID regionID)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Name {
|
|
||||||
get { return "NHibernate"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Version {
|
|
||||||
get { return "0.1"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false">
|
|
||||||
<id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="Type" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Name" type="String" length="64" />
|
|
||||||
<property name="Description" type="String" length="64" />
|
|
||||||
<property name="Local" type="boolean" />
|
|
||||||
<property name="Temporary" type="boolean" />
|
|
||||||
<property name="Data" type="binary" />
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Data.NHibernate.EstateRegionLink, OpenSim.Data.NHibernate" table="EstateRegionLink" lazy="false">
|
|
||||||
<id name="EstateRegionLinkID" column="EstateRegionLinkID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
<property name="EstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,68 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.EstateSettings, OpenSim.Framework" table="EstateSettings" lazy="false">
|
|
||||||
|
|
||||||
<id name="EstateID" column="EstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="increment" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
<property name="ParentEstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="EstateOwner" column="EstateOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="EstateName" column="Name" type="String" length="64" />
|
|
||||||
|
|
||||||
<property name="RedirectGridX" type="System.Int32" />
|
|
||||||
<property name="RedirectGridY" type="System.Int32" />
|
|
||||||
|
|
||||||
<property name="BillableFactor" type="System.Single" />
|
|
||||||
<property name="PricePerMeter" type="System.Int32" />
|
|
||||||
<property name="SunPosition" type="System.Double" />
|
|
||||||
|
|
||||||
<property name="UseGlobalTime" type="System.Boolean" />
|
|
||||||
<property name="FixedSun" type="System.Boolean" />
|
|
||||||
<property name="AllowVoice" type="System.Boolean" />
|
|
||||||
<property name="AllowDirectTeleport" type="System.Boolean" />
|
|
||||||
<property name="ResetHomeOnTeleport" type="System.Boolean" />
|
|
||||||
<property name="PublicAccess" type="System.Boolean" />
|
|
||||||
<property name="DenyAnonymous" type="System.Boolean" />
|
|
||||||
<property name="DenyIdentified" type="System.Boolean" />
|
|
||||||
<property name="DenyTransacted" type="System.Boolean" />
|
|
||||||
<property name="DenyMinors" type="System.Boolean" />
|
|
||||||
<property name="BlockDwell" type="System.Boolean" />
|
|
||||||
<property name="EstateSkipScripts" type="System.Boolean" />
|
|
||||||
<property name="TaxFree" type="System.Boolean" />
|
|
||||||
<property name="AbuseEmailToEstateOwner" type="System.Boolean" />
|
|
||||||
|
|
||||||
<property name="AbuseEmail" type="String" length="255" />
|
|
||||||
|
|
||||||
<array name="EstateManagers" table="EstateManagers" cascade="all">
|
|
||||||
<key column="EstateID" />
|
|
||||||
<index column="ArrayIndex" />
|
|
||||||
<element column="ManagerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="EstateAccess" table="EstateUsers" cascade="all">
|
|
||||||
<key column="EstateID" />
|
|
||||||
<index column="ArrayIndex" />
|
|
||||||
<element column="UserID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="EstateGroups" table="EstateGroups" cascade="all">
|
|
||||||
<key column="EstateID" />
|
|
||||||
<index column="ArrayIndex" />
|
|
||||||
<element column="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="EstateBans" table="EstateBans" cascade="all">
|
|
||||||
<key column="EstateID" />
|
|
||||||
<index column="ArrayIndex" />
|
|
||||||
<composite-element class="OpenSim.Framework.EstateBan, OpenSim.Framework">
|
|
||||||
<property name="BannedUserID" column="BannedUserID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="BannedHostAddress" column="BannedHostAddress" type="String" length="16"/>
|
|
||||||
<property name="BannedHostIPMask" column="BannedHostIPMask" type="String" length="16"/>
|
|
||||||
<property name="BannedHostNameMask" column="BannedHostNameMask" type="String" length="16"/>
|
|
||||||
</composite-element>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false">
|
|
||||||
<id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="Type" type="Int16" />
|
|
||||||
<property name="Version" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Name" type="String" length="64" />
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,26 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false">
|
|
||||||
<id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="InvType" type="System.Int32" />
|
|
||||||
<property name="AssetType" type="System.Int32" />
|
|
||||||
<property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="CreatorId" type="string" column="Creator"/>
|
|
||||||
<property name="Name" type="String" length="64" />
|
|
||||||
<property name="Description" type="String" length="64" />
|
|
||||||
<property name="NextPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="CurrentPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="BasePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="EveryOnePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GroupOwned" type="boolean" />
|
|
||||||
<property name="SalePrice" type="System.Int32" />
|
|
||||||
<property name="SaleType" type="System.Byte" />
|
|
||||||
<property name="Flags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="CreationDate" type="System.Int32" />
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,14 +0,0 @@
|
||||||
?This file describes the differences in schema creation and migration scripts.
|
|
||||||
|
|
||||||
MySQL is used as reference script against which differences are listed.
|
|
||||||
|
|
||||||
Generally MySQL create table options should be removed for other databases.
|
|
||||||
|
|
||||||
_PostgreSQL_
|
|
||||||
* DOUBLE->DOUBLE PRECISION
|
|
||||||
* BIT->BOOLEAN
|
|
||||||
|
|
||||||
_MsSql_
|
|
||||||
* VARCHAR->NVARCHAR
|
|
||||||
* Remove DEFAULT-keywords
|
|
||||||
* DOUBLE->REAL
|
|
|
@ -1,10 +0,0 @@
|
||||||
create table Assets (
|
|
||||||
ID NVARCHAR(36) not null,
|
|
||||||
Type SMALLINT null,
|
|
||||||
Name NVARCHAR(64) null,
|
|
||||||
Description NVARCHAR(64) null,
|
|
||||||
Local BIT null,
|
|
||||||
Temporary BIT null,
|
|
||||||
Data VARBINARY(max) null,
|
|
||||||
primary key (ID)
|
|
||||||
)
|
|
|
@ -1,72 +0,0 @@
|
||||||
CREATE TABLE EstateSettings (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ParentEstateID INT NULL,
|
|
||||||
EstateOwnerID NVARCHAR(36) NULL,
|
|
||||||
Name NVARCHAR(64) NULL,
|
|
||||||
RedirectGridX INT NULL,
|
|
||||||
RedirectGridY INT NULL,
|
|
||||||
BillableFactor REAL NULL,
|
|
||||||
PricePerMeter INT NULL,
|
|
||||||
SunPosition FLOAT NULL,
|
|
||||||
|
|
||||||
UseGlobalTime BIT NULL,
|
|
||||||
FixedSun BIT NULL,
|
|
||||||
AllowVoice BIT NULL,
|
|
||||||
AllowDirectTeleport BIT NULL,
|
|
||||||
ResetHomeOnTeleport BIT NULL,
|
|
||||||
PublicAccess BIT NULL,
|
|
||||||
DenyAnonymous BIT NULL,
|
|
||||||
DenyIdentified BIT NULL,
|
|
||||||
DenyTransacted BIT NULL,
|
|
||||||
DenyMinors BIT NULL,
|
|
||||||
BlockDwell BIT NULL,
|
|
||||||
EstateSkipScripts BIT NULL,
|
|
||||||
TaxFree BIT NULL,
|
|
||||||
AbuseEmailToEstateOwner BIT NULL,
|
|
||||||
|
|
||||||
AbuseEmail NVARCHAR(255) NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (EstateID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateRegionLink (
|
|
||||||
EstateRegionLinkID NVARCHAR(36) NOT NULL,
|
|
||||||
EstateID INT NULL,
|
|
||||||
RegionID NVARCHAR(36) NULL,
|
|
||||||
PRIMARY KEY (EstateRegionLinkID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
|
|
||||||
CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE EstateManagers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ManagerID NVARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateUsers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
UserID NVARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateGroups (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
GroupID NVARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateBans (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
BannedUserID NVARCHAR(36) NOT NULL,
|
|
||||||
BannedHostAddress NVARCHAR(16) NOT NULL,
|
|
||||||
BannedHostIPMask NVARCHAR(16) NOT NULL,
|
|
||||||
BannedHostNameMask NVARCHAR(16) NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
|
@ -1,35 +0,0 @@
|
||||||
create table Regions (
|
|
||||||
Uuid NVARCHAR(36) not null,
|
|
||||||
RegionHandle BIGINT null,
|
|
||||||
RegionName NVARCHAR(32) null,
|
|
||||||
RegionRecvKey NVARCHAR(128) null,
|
|
||||||
RegionSendKey NVARCHAR(128) null,
|
|
||||||
RegionSecret NVARCHAR(128) null,
|
|
||||||
RegionDataURI NVARCHAR(255) null,
|
|
||||||
ServerIP NVARCHAR(64) null,
|
|
||||||
ServerPort INT null,
|
|
||||||
ServerURI NVARCHAR(255) null,
|
|
||||||
RegionLocX INT null,
|
|
||||||
RegionLocY INT null,
|
|
||||||
RegionLocZ INT null,
|
|
||||||
EastOverrideHandle BIGINT null,
|
|
||||||
WestOverrideHandle BIGINT null,
|
|
||||||
SouthOverrideHandle BIGINT null,
|
|
||||||
NorthOverrideHandle BIGINT null,
|
|
||||||
RegionAssetURI NVARCHAR(255) null,
|
|
||||||
RegionAssetRecvKey NVARCHAR(128) null,
|
|
||||||
RegionAssetSendKey NVARCHAR(128) null,
|
|
||||||
RegionUserURI NVARCHAR(255) null,
|
|
||||||
RegionUserRecvKey NVARCHAR(128) null,
|
|
||||||
RegionUserSendKey NVARCHAR(128) null,
|
|
||||||
ServerHttpPort INT null,
|
|
||||||
ServerRemotingPort INT null,
|
|
||||||
RegionMapTextureID NVARCHAR(36) null,
|
|
||||||
Owner_uuid NVARCHAR(36) null,
|
|
||||||
OriginUUID NVARCHAR(36) null,
|
|
||||||
primary key (Uuid)
|
|
||||||
)
|
|
||||||
create index region_handle on Regions (RegionHandle)
|
|
||||||
create index region_name on Regions (RegionName)
|
|
||||||
create index overrideHandles on Regions (EastOverrideHandle, WestOverrideHandle, SouthOverrideHandle, NorthOverrideHandle)
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
create table InventoryFolders (
|
|
||||||
ID NVARCHAR(255) not null,
|
|
||||||
Type SMALLINT null,
|
|
||||||
Version INT null,
|
|
||||||
ParentID NVARCHAR(255) null,
|
|
||||||
Owner NVARCHAR(255) null,
|
|
||||||
Name NVARCHAR(64) null,
|
|
||||||
primary key (ID)
|
|
||||||
)
|
|
||||||
create table InventoryItems (
|
|
||||||
ID NVARCHAR(255) not null,
|
|
||||||
InvType INT null,
|
|
||||||
AssetType INT null,
|
|
||||||
AssetID NVARCHAR(255) null,
|
|
||||||
Folder NVARCHAR(255) null,
|
|
||||||
Owner NVARCHAR(255) null,
|
|
||||||
Creator NVARCHAR(255) null,
|
|
||||||
Name NVARCHAR(64) null,
|
|
||||||
Description NVARCHAR(64) null,
|
|
||||||
NextPermissions INT null,
|
|
||||||
CurrentPermissions INT null,
|
|
||||||
BasePermissions INT null,
|
|
||||||
EveryOnePermissions INT null,
|
|
||||||
GroupID NVARCHAR(255) null,
|
|
||||||
GroupOwned BIT null,
|
|
||||||
SalePrice INT null,
|
|
||||||
SaleType TINYINT null,
|
|
||||||
Flags INT null,
|
|
||||||
CreationDate INT null,
|
|
||||||
primary key (ID)
|
|
||||||
)
|
|
||||||
create index item_group_id on InventoryItems (GroupID)
|
|
||||||
create index item_folder_id on InventoryItems (Folder)
|
|
||||||
create index item_owner_id on InventoryItems (Owner)
|
|
||||||
create index folder_owner_id on InventoryFolders (Owner)
|
|
||||||
create index folder_parent_id on InventoryFolders (ParentID)
|
|
|
@ -1,104 +0,0 @@
|
||||||
create table Prims (
|
|
||||||
UUID NVARCHAR(255) not null,
|
|
||||||
ParentID INT null,
|
|
||||||
ParentUUID NVARCHAR(255) null,
|
|
||||||
RegionID NVARCHAR(255) null,
|
|
||||||
CreationDate INT null,
|
|
||||||
Name NVARCHAR(255) null,
|
|
||||||
Text NVARCHAR(255) null,
|
|
||||||
Description NVARCHAR(255) null,
|
|
||||||
SitName NVARCHAR(255) null,
|
|
||||||
TouchName NVARCHAR(255) null,
|
|
||||||
ObjectFlags INT null,
|
|
||||||
CreatorID NVARCHAR(255) null,
|
|
||||||
OwnerID NVARCHAR(255) null,
|
|
||||||
GroupID NVARCHAR(255) null,
|
|
||||||
LastOwnerID NVARCHAR(255) null,
|
|
||||||
OwnerMask INT null,
|
|
||||||
NextOwnerMask INT null,
|
|
||||||
GroupMask INT null,
|
|
||||||
EveryoneMask INT null,
|
|
||||||
BaseMask INT null,
|
|
||||||
PositionX REAL null,
|
|
||||||
PositionY REAL null,
|
|
||||||
PositionZ REAL null,
|
|
||||||
GroupPositionX REAL null,
|
|
||||||
GroupPositionY REAL null,
|
|
||||||
GroupPositionZ REAL null,
|
|
||||||
VelocityX REAL null,
|
|
||||||
VelocityY REAL null,
|
|
||||||
VelocityZ REAL null,
|
|
||||||
AngularVelocityX REAL null,
|
|
||||||
AngularVelocityY REAL null,
|
|
||||||
AngularVelocityZ REAL null,
|
|
||||||
AccelerationX REAL null,
|
|
||||||
AccelerationY REAL null,
|
|
||||||
AccelerationZ REAL null,
|
|
||||||
SitTargetOffsetX REAL null,
|
|
||||||
SitTargetOffsetY REAL null,
|
|
||||||
SitTargetOffsetZ REAL null,
|
|
||||||
RotationX REAL null,
|
|
||||||
RotationY REAL null,
|
|
||||||
RotationZ REAL null,
|
|
||||||
RotationW REAL null,
|
|
||||||
SitTargetOrientX REAL null,
|
|
||||||
SitTargetOrientY REAL null,
|
|
||||||
SitTargetOrientZ REAL null,
|
|
||||||
SitTargetOrientW REAL null,
|
|
||||||
ScaleX REAL null,
|
|
||||||
ScaleY REAL null,
|
|
||||||
ScaleZ REAL null,
|
|
||||||
PCode TINYINT null,
|
|
||||||
PathBegin INT null,
|
|
||||||
PathEnd INT null,
|
|
||||||
PathScaleX TINYINT null,
|
|
||||||
PathScaleY TINYINT null,
|
|
||||||
PathShearX TINYINT null,
|
|
||||||
PathShearY TINYINT null,
|
|
||||||
PathSkew TINYINT null,
|
|
||||||
PathCurve TINYINT null,
|
|
||||||
PathRadiusOffset TINYINT null,
|
|
||||||
PathRevolutions TINYINT null,
|
|
||||||
PathTaperX TINYINT null,
|
|
||||||
PathTaperY TINYINT null,
|
|
||||||
PathTwist TINYINT null,
|
|
||||||
ProfileBegin INT null,
|
|
||||||
ProfileEnd INT null,
|
|
||||||
ProfileCurve TINYINT null,
|
|
||||||
ProfileHollow INT null,
|
|
||||||
Texture VARBINARY(8000) null,
|
|
||||||
ExtraParams VARBINARY(8000) null,
|
|
||||||
State TINYINT null,
|
|
||||||
primary key (UUID)
|
|
||||||
)
|
|
||||||
|
|
||||||
create table PrimItems (
|
|
||||||
ItemID NVARCHAR(255) not null,
|
|
||||||
PrimID NVARCHAR(255) null,
|
|
||||||
AssetID NVARCHAR(255) null,
|
|
||||||
ParentFolderID NVARCHAR(255) null,
|
|
||||||
CreatorID NVARCHAR(255) null,
|
|
||||||
OwnerID NVARCHAR(255) null,
|
|
||||||
GroupID NVARCHAR(255) null,
|
|
||||||
LastOwnerID NVARCHAR(255) null,
|
|
||||||
CurrentPermissions INT null,
|
|
||||||
BasePermissions INT null,
|
|
||||||
EveryonePermissions INT null,
|
|
||||||
GroupPermissions INT null,
|
|
||||||
NextPermissions INT null,
|
|
||||||
Name NVARCHAR(255) null,
|
|
||||||
Description NVARCHAR(255) null,
|
|
||||||
CreationDate INT null,
|
|
||||||
Flags INT null,
|
|
||||||
Type INT null,
|
|
||||||
InvType INT null,
|
|
||||||
primary key (ItemID)
|
|
||||||
)
|
|
||||||
|
|
||||||
create table Terrain (
|
|
||||||
RegionID NVARCHAR(255) not null,
|
|
||||||
MapData VARBINARY(max) null,
|
|
||||||
primary key (RegionID)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
create table UserAgents (
|
|
||||||
ProfileID NVARCHAR(255) not null,
|
|
||||||
AgentIP NVARCHAR(24) null,
|
|
||||||
AgentPort INT null,
|
|
||||||
AgentOnline BIT null,
|
|
||||||
SessionID NVARCHAR(255) null,
|
|
||||||
SecureSessionID NVARCHAR(255) null,
|
|
||||||
InitialRegion NVARCHAR(255) null,
|
|
||||||
Region NVARCHAR(255) null,
|
|
||||||
LoginTime INT null,
|
|
||||||
LogoutTime INT null,
|
|
||||||
Handle BIGINT null,
|
|
||||||
primary key (ProfileID)
|
|
||||||
)
|
|
||||||
|
|
||||||
create table UserProfiles (
|
|
||||||
ID NVARCHAR(255) not null,
|
|
||||||
FirstName NVARCHAR(32) null,
|
|
||||||
SurName NVARCHAR(32) null,
|
|
||||||
PasswordHash NVARCHAR(32) null,
|
|
||||||
PasswordSalt NVARCHAR(32) null,
|
|
||||||
WebLoginKey NVARCHAR(255) null,
|
|
||||||
HomeRegionX INT null,
|
|
||||||
HomeRegionY INT null,
|
|
||||||
HomeLocationX REAL null,
|
|
||||||
HomeLocationY REAL null,
|
|
||||||
HomeLocationZ REAL null,
|
|
||||||
HomeLookAtX REAL null,
|
|
||||||
HomeLookAtY REAL null,
|
|
||||||
HomeLookAtZ REAL null,
|
|
||||||
Created INT null,
|
|
||||||
LastLogin INT null,
|
|
||||||
RootInventoryFolderID NVARCHAR(255) null,
|
|
||||||
UserInventoryURI NVARCHAR(255) null,
|
|
||||||
UserAssetURI NVARCHAR(255) null,
|
|
||||||
Image NVARCHAR(255) null,
|
|
||||||
FirstLifeImage NVARCHAR(255) null,
|
|
||||||
AboutText NVARCHAR(255) null,
|
|
||||||
FirstLifeAboutText NVARCHAR(255) null,
|
|
||||||
primary key (ID)
|
|
||||||
)
|
|
||||||
create table UserAppearances (
|
|
||||||
Owner NVARCHAR(255) not null,
|
|
||||||
BodyItem NVARCHAR(255) null,
|
|
||||||
BodyAsset NVARCHAR(255) null,
|
|
||||||
SkinItem NVARCHAR(255) null,
|
|
||||||
SkinAsset NVARCHAR(255) null,
|
|
||||||
HairItem NVARCHAR(255) null,
|
|
||||||
HairAsset NVARCHAR(255) null,
|
|
||||||
EyesItem NVARCHAR(255) null,
|
|
||||||
EyesAsset NVARCHAR(255) null,
|
|
||||||
ShirtItem NVARCHAR(255) null,
|
|
||||||
ShirtAsset NVARCHAR(255) null,
|
|
||||||
PantsItem NVARCHAR(255) null,
|
|
||||||
PantsAsset NVARCHAR(255) null,
|
|
||||||
ShoesItem NVARCHAR(255) null,
|
|
||||||
ShoesAsset NVARCHAR(255) null,
|
|
||||||
SocksItem NVARCHAR(255) null,
|
|
||||||
SocksAsset NVARCHAR(255) null,
|
|
||||||
JacketItem NVARCHAR(255) null,
|
|
||||||
JacketAsset NVARCHAR(255) null,
|
|
||||||
GlovesItem NVARCHAR(255) null,
|
|
||||||
GlovesAsset NVARCHAR(255) null,
|
|
||||||
UnderShirtItem NVARCHAR(255) null,
|
|
||||||
UnderShirtAsset NVARCHAR(255) null,
|
|
||||||
UnderPantsItem NVARCHAR(255) null,
|
|
||||||
UnderPantsAsset NVARCHAR(255) null,
|
|
||||||
SkirtItem NVARCHAR(255) null,
|
|
||||||
SkirtAsset NVARCHAR(255) null,
|
|
||||||
Texture VARBINARY(8000) null,
|
|
||||||
VisualParams VARBINARY(8000) null,
|
|
||||||
Serial INT null,
|
|
||||||
primary key (Owner)
|
|
||||||
)
|
|
||||||
|
|
||||||
create index user_surname on UserProfiles (SurName)
|
|
||||||
create index user_firstname on UserProfiles (FirstName)
|
|
|
@ -1,51 +0,0 @@
|
||||||
ALTER TABLE Prims ADD LinkNum INT null;
|
|
||||||
ALTER TABLE Prims ADD Material TINYINT null;
|
|
||||||
ALTER TABLE Prims ADD ScriptAccessPin INT null;
|
|
||||||
ALTER TABLE Prims ADD TextureAnimation VARBINARY(max) null;
|
|
||||||
ALTER TABLE Prims ADD ParticleSystem VARBINARY(max) null;
|
|
||||||
ALTER TABLE Prims ADD ClickAction TINYINT null;
|
|
||||||
ALTER TABLE Prims ADD Color INT null;
|
|
||||||
|
|
||||||
CREATE TABLE RegionSettings
|
|
||||||
(
|
|
||||||
RegionID NVARCHAR(255) NOT NULL,
|
|
||||||
BlockTerraform bit NOT NULL,
|
|
||||||
BlockFly bit NOT NULL,
|
|
||||||
AllowDamage bit NOT NULL,
|
|
||||||
RestrictPushing bit NOT NULL,
|
|
||||||
AllowLandResell bit NOT NULL,
|
|
||||||
AllowLandJoinDivide bit NOT NULL,
|
|
||||||
BlockShowInSearch bit NOT NULL,
|
|
||||||
AgentLimit int NOT NULL,
|
|
||||||
ObjectBonus float(53) NOT NULL,
|
|
||||||
Maturity int NOT NULL,
|
|
||||||
DisableScripts bit NOT NULL,
|
|
||||||
DisableCollisions bit NOT NULL,
|
|
||||||
DisablePhysics bit NOT NULL,
|
|
||||||
TerrainTexture1 NVARCHAR(36) NOT NULL,
|
|
||||||
TerrainTexture2 NVARCHAR(36) NOT NULL,
|
|
||||||
TerrainTexture3 NVARCHAR(36) NOT NULL,
|
|
||||||
TerrainTexture4 NVARCHAR(36) NOT NULL,
|
|
||||||
Elevation1NW float(53) NOT NULL,
|
|
||||||
Elevation2NW float(53) NOT NULL,
|
|
||||||
Elevation1NE float(53) NOT NULL,
|
|
||||||
Elevation2NE float(53) NOT NULL,
|
|
||||||
Elevation1SE float(53) NOT NULL,
|
|
||||||
Elevation2SE float(53) NOT NULL,
|
|
||||||
Elevation1SW float(53) NOT NULL,
|
|
||||||
Elevation2SW float(53) NOT NULL,
|
|
||||||
WaterHeight float(53) NOT NULL,
|
|
||||||
TerrainRaiseLimit float(53) NOT NULL,
|
|
||||||
TerrainLowerLimit float(53) NOT NULL,
|
|
||||||
UseEstateSun bit NOT NULL,
|
|
||||||
FixedSun bit NOT NULL,
|
|
||||||
SunPosition float(53) NOT NULL,
|
|
||||||
Covenant NVARCHAR(36) NULL DEFAULT (NULL),
|
|
||||||
Sandbox bit NOT NULL,
|
|
||||||
SunVectorX float(53) NOT NULL DEFAULT ((0)),
|
|
||||||
SunVectorY float(53) NOT NULL DEFAULT ((0)),
|
|
||||||
SunVectorZ float(53) NOT NULL DEFAULT ((0)),
|
|
||||||
|
|
||||||
primary key (RegionID)
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
ALTER TABLE UserAgents ADD PositionX REAL null;
|
|
||||||
ALTER TABLE UserAgents ADD PositionY REAL null;
|
|
||||||
ALTER TABLE UserAgents ADD PositionZ REAL null;
|
|
||||||
ALTER TABLE UserAgents ADD LookAtX REAL null;
|
|
||||||
ALTER TABLE UserAgents ADD LookAtY REAL null;
|
|
||||||
ALTER TABLE UserAgents ADD LookAtZ REAL null;
|
|
||||||
|
|
||||||
ALTER TABLE UserProfiles ADD Email NVARCHAR(250) null;
|
|
||||||
ALTER TABLE UserProfiles ADD HomeRegionID NVARCHAR(36) null;
|
|
||||||
ALTER TABLE UserProfiles ADD CanDoMask INT null;
|
|
||||||
ALTER TABLE UserProfiles ADD WantDoMask INT null;
|
|
||||||
ALTER TABLE UserProfiles ADD UserFlags INT null;
|
|
||||||
ALTER TABLE UserProfiles ADD GodLevel INT null;
|
|
||||||
ALTER TABLE UserProfiles ADD CustomType NVARCHAR(32) null;
|
|
||||||
ALTER TABLE UserProfiles ADD Partner NVARCHAR(36) null;
|
|
||||||
|
|
||||||
ALTER TABLE UserAppearances ADD AvatarHeight FLOAT null;
|
|
||||||
|
|
||||||
CREATE TABLE UserFriends (
|
|
||||||
UserFriendID NVARCHAR(36) NOT NULL,
|
|
||||||
OwnerID NVARCHAR(36) NULL,
|
|
||||||
FriendID NVARCHAR(36) NULL,
|
|
||||||
FriendPermissions INT NULL,
|
|
||||||
PRIMARY KEY (UserFriendID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE TABLE Assets (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
Type SMALLINT DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
Description VARCHAR(64) DEFAULT NULL,
|
|
||||||
Local BIT DEFAULT NULL,
|
|
||||||
Temporary BIT DEFAULT NULL,
|
|
||||||
Data LONGBLOB,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
|
@ -1,71 +0,0 @@
|
||||||
CREATE TABLE EstateSettings (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ParentEstateID INT DEFAULT NULL,
|
|
||||||
EstateOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
RedirectGridX INT DEFAULT NULL,
|
|
||||||
RedirectGridY INT DEFAULT NULL,
|
|
||||||
BillableFactor DOUBLE DEFAULT NULL,
|
|
||||||
PricePerMeter INT DEFAULT NULL,
|
|
||||||
SunPosition DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
UseGlobalTime BIT DEFAULT NULL,
|
|
||||||
FixedSun BIT DEFAULT NULL,
|
|
||||||
AllowVoice BIT DEFAULT NULL,
|
|
||||||
AllowDirectTeleport BIT DEFAULT NULL,
|
|
||||||
ResetHomeOnTeleport BIT DEFAULT NULL,
|
|
||||||
PublicAccess BIT DEFAULT NULL,
|
|
||||||
DenyAnonymous BIT DEFAULT NULL,
|
|
||||||
DenyIdentified BIT DEFAULT NULL,
|
|
||||||
DenyTransacted BIT DEFAULT NULL,
|
|
||||||
DenyMinors BIT DEFAULT NULL,
|
|
||||||
BlockDwell BIT DEFAULT NULL,
|
|
||||||
EstateSkipScripts BIT DEFAULT NULL,
|
|
||||||
TaxFree BIT DEFAULT NULL,
|
|
||||||
AbuseEmailToEstateOwner BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
AbuseEmail VARCHAR(255) DEFAULT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (EstateID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE EstateRegionLink (
|
|
||||||
EstateRegionLinkID VARCHAR(36) NOT NULL,
|
|
||||||
EstateID INT DEFAULT NULL,
|
|
||||||
RegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (EstateRegionLinkID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
|
|
||||||
CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
|
|
||||||
|
|
||||||
CREATE TABLE EstateManagers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ManagerID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE EstateUsers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
UserID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE EstateGroups (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
GroupID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE EstateBans (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
BannedUserID VARCHAR(36) NOT NULL,
|
|
||||||
BannedHostAddress VARCHAR(16) NOT NULL,
|
|
||||||
BannedHostIPMask VARCHAR(16) NOT NULL,
|
|
||||||
BannedHostNameMask VARCHAR(16) NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
|
@ -1,35 +0,0 @@
|
||||||
CREATE TABLE Regions (
|
|
||||||
RegionID VARCHAR(36) NOT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OriginID VARCHAR(36) DEFAULT NULL,
|
|
||||||
RegionHandle BIGINT DEFAULT NULL,
|
|
||||||
RegionName VARCHAR(32) DEFAULT NULL,
|
|
||||||
RegionRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionSecret VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionDataURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
ServerIP VARCHAR(64) DEFAULT NULL,
|
|
||||||
ServerPort INT DEFAULT NULL,
|
|
||||||
ServerURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionLocX INT DEFAULT NULL,
|
|
||||||
RegionLocY INT DEFAULT NULL,
|
|
||||||
RegionLocZ INT DEFAULT NULL,
|
|
||||||
EastOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
WestOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
SouthOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
NorthOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
RegionAssetURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionUserURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionMapTextureId VARCHAR(36) DEFAULT NULL,
|
|
||||||
ServerHttpPort INT DEFAULT NULL,
|
|
||||||
ServerRemotingPort INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX RegionNameIndex ON Regions (RegionName);
|
|
||||||
CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
|
|
||||||
CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
|
|
|
@ -1,39 +0,0 @@
|
||||||
CREATE TABLE InventoryFolders (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
Type SMALLINT DEFAULT NULL,
|
|
||||||
Version INT DEFAULT NULL,
|
|
||||||
ParentID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Owner VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
|
|
||||||
CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
|
|
||||||
|
|
||||||
CREATE TABLE InventoryItems (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
InvType INT DEFAULT NULL,
|
|
||||||
AssetType INT DEFAULT NULL,
|
|
||||||
AssetID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Folder VARCHAR(36) DEFAULT NULL,
|
|
||||||
Owner VARCHAR(36) DEFAULT NULL,
|
|
||||||
Creator VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
Description VARCHAR(64) DEFAULT NULL,
|
|
||||||
NextPermissions INT DEFAULT NULL,
|
|
||||||
CurrentPermissions INT DEFAULT NULL,
|
|
||||||
BasePermissions INT DEFAULT NULL,
|
|
||||||
EveryOnePermissions INT DEFAULT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
GroupOwned BIT DEFAULT NULL,
|
|
||||||
SalePrice INT DEFAULT NULL,
|
|
||||||
SaleType TINYINT DEFAULT NULL,
|
|
||||||
Flags INT DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
|
|
||||||
CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
|
|
||||||
CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
|
|
|
@ -1,169 +0,0 @@
|
||||||
CREATE TABLE Prims (
|
|
||||||
UUID VARCHAR(36) NOT NULL,
|
|
||||||
RegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
ParentID INT DEFAULT NULL,
|
|
||||||
ParentUUID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreatorID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
LinkNum INT DEFAULT NULL,
|
|
||||||
Name VARCHAR(255) DEFAULT NULL,
|
|
||||||
Text VARCHAR(255) DEFAULT NULL,
|
|
||||||
Description VARCHAR(255) DEFAULT NULL,
|
|
||||||
SitName VARCHAR(255) DEFAULT NULL,
|
|
||||||
TouchName VARCHAR(255) DEFAULT NULL,
|
|
||||||
ObjectFlags INT DEFAULT NULL,
|
|
||||||
OwnerMask INT DEFAULT NULL,
|
|
||||||
NextOwnerMask INT DEFAULT NULL,
|
|
||||||
GroupMask INT DEFAULT NULL,
|
|
||||||
EveryoneMask INT DEFAULT NULL,
|
|
||||||
BaseMask INT DEFAULT NULL,
|
|
||||||
Material TINYINT DEFAULT NULL,
|
|
||||||
ScriptAccessPin INT DEFAULT NULL,
|
|
||||||
TextureAnimation BLOB,
|
|
||||||
ParticleSystem BLOB,
|
|
||||||
ClickAction TINYINT DEFAULT NULL,
|
|
||||||
Color INT DEFAULT NULL,
|
|
||||||
PositionX DOUBLE DEFAULT NULL,
|
|
||||||
PositionY DOUBLE DEFAULT NULL,
|
|
||||||
PositionZ DOUBLE DEFAULT NULL,
|
|
||||||
GroupPositionX DOUBLE DEFAULT NULL,
|
|
||||||
GroupPositionY DOUBLE DEFAULT NULL,
|
|
||||||
GroupPositionZ DOUBLE DEFAULT NULL,
|
|
||||||
VelocityX DOUBLE DEFAULT NULL,
|
|
||||||
VelocityY DOUBLE DEFAULT NULL,
|
|
||||||
VelocityZ DOUBLE DEFAULT NULL,
|
|
||||||
AngularVelocityX DOUBLE DEFAULT NULL,
|
|
||||||
AngularVelocityY DOUBLE DEFAULT NULL,
|
|
||||||
AngularVelocityZ DOUBLE DEFAULT NULL,
|
|
||||||
AccelerationX DOUBLE DEFAULT NULL,
|
|
||||||
AccelerationY DOUBLE DEFAULT NULL,
|
|
||||||
AccelerationZ DOUBLE DEFAULT NULL,
|
|
||||||
RotationX DOUBLE DEFAULT NULL,
|
|
||||||
RotationY DOUBLE DEFAULT NULL,
|
|
||||||
RotationZ DOUBLE DEFAULT NULL,
|
|
||||||
RotationW DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOffsetX DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOffsetY DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOffsetZ DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientW DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientX DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientY DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientZ DOUBLE DEFAULT NULL,
|
|
||||||
-- this is the shape
|
|
||||||
Shape INT DEFAULT NULL,
|
|
||||||
ScaleX DOUBLE DEFAULT NULL,
|
|
||||||
ScaleY DOUBLE DEFAULT NULL,
|
|
||||||
ScaleZ DOUBLE DEFAULT NULL,
|
|
||||||
PCode INT DEFAULT NULL,
|
|
||||||
PathBegin INT DEFAULT NULL,
|
|
||||||
PathEnd INT DEFAULT NULL,
|
|
||||||
PathScaleX INT DEFAULT NULL,
|
|
||||||
PathScaleY INT DEFAULT NULL,
|
|
||||||
PathShearX INT DEFAULT NULL,
|
|
||||||
PathShearY INT DEFAULT NULL,
|
|
||||||
PathSkew INT DEFAULT NULL,
|
|
||||||
PathCurve INT DEFAULT NULL,
|
|
||||||
PathRadiusOffset INT DEFAULT NULL,
|
|
||||||
PathRevolutions INT DEFAULT NULL,
|
|
||||||
PathTaperX INT DEFAULT NULL,
|
|
||||||
PathTaperY INT DEFAULT NULL,
|
|
||||||
PathTwist INT DEFAULT NULL,
|
|
||||||
ProfileBegin INT DEFAULT NULL,
|
|
||||||
ProfileEnd INT DEFAULT NULL,
|
|
||||||
ProfileCurve INT DEFAULT NULL,
|
|
||||||
ProfileHollow INT DEFAULT NULL,
|
|
||||||
State INT DEFAULT NULL,
|
|
||||||
Texture LONGBLOB,
|
|
||||||
ExtraParams LONGBLOB,
|
|
||||||
PRIMARY KEY (UUID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
|
|
||||||
CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
|
|
||||||
|
|
||||||
CREATE TABLE Terrain (
|
|
||||||
RegionID VARCHAR(36) not null,
|
|
||||||
MapData LONGBLOB,
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE PrimItems (
|
|
||||||
ItemID VARCHAR(36) NOT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PrimID VARCHAR(36) DEFAULT NULL,
|
|
||||||
ParentFolderID VARCHAR(36) DEFAULT NULL,
|
|
||||||
AssetID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreatorID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreationDate BIGINT DEFAULT NULL,
|
|
||||||
Type INT DEFAULT NULL,
|
|
||||||
InvType INT DEFAULT NULL,
|
|
||||||
Name VARCHAR(255) DEFAULT NULL,
|
|
||||||
Description VARCHAR(255) DEFAULT NULL,
|
|
||||||
NextPermissions INT DEFAULT NULL,
|
|
||||||
CurrentPermissions INT DEFAULT NULL,
|
|
||||||
BasePermissions INT DEFAULT NULL,
|
|
||||||
EveryonePermissions INT DEFAULT NULL,
|
|
||||||
GroupPermissions INT DEFAULT NULL,
|
|
||||||
Flags INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ItemID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
|
|
||||||
|
|
||||||
CREATE TABLE RegionSettings (
|
|
||||||
RegionID VARCHAR(36) NOT NULL,
|
|
||||||
|
|
||||||
BlockTerraform BIT DEFAULT NULL,
|
|
||||||
BlockFly BIT DEFAULT NULL,
|
|
||||||
AllowDamage BIT DEFAULT NULL,
|
|
||||||
RestrictPushing BIT DEFAULT NULL,
|
|
||||||
AllowLandResell BIT DEFAULT NULL,
|
|
||||||
AllowLandJoinDivide BIT DEFAULT NULL,
|
|
||||||
BlockShowInSearch BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
AgentLimit INT DEFAULT NULL,
|
|
||||||
ObjectBonus DOUBLE DEFAULT NULL,
|
|
||||||
Maturity INT DEFAULT NULL,
|
|
||||||
|
|
||||||
DisableScripts BIT DEFAULT NULL,
|
|
||||||
DisableCollisions BIT DEFAULT NULL,
|
|
||||||
DisablePhysics BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
TerrainTexture1 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture2 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture3 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture4 VARCHAR(36) DEFAULT NULL,
|
|
||||||
|
|
||||||
Elevation1NW DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2NW DOUBLE DEFAULT NULL,
|
|
||||||
Elevation1NE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2NE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation1SE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2SE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation1SW DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2SW DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
WaterHeight DOUBLE DEFAULT NULL,
|
|
||||||
TerrainRaiseLimit DOUBLE DEFAULT NULL,
|
|
||||||
TerrainLowerLimit DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
UseEstateSun BIT DEFAULT NULL,
|
|
||||||
Sandbox BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
SunVectorX DOUBLE DEFAULT NULL,
|
|
||||||
SunVectorY DOUBLE DEFAULT NULL,
|
|
||||||
SunVectorZ DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
FixedSun BIT DEFAULT NULL,
|
|
||||||
SunPosition DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
Covenant VARCHAR(36) DEFAULT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
|
@ -1,104 +0,0 @@
|
||||||
CREATE TABLE UserAgents (
|
|
||||||
ProfileID VARCHAR(36) NOT NULL,
|
|
||||||
AgentIP VARCHAR(24) DEFAULT NULL,
|
|
||||||
AgentPort INT DEFAULT NULL,
|
|
||||||
AgentOnline BIT DEFAULT NULL,
|
|
||||||
SessionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
SecureSessionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
InitialRegion VARCHAR(255) DEFAULT NULL,
|
|
||||||
Region VARCHAR(255) DEFAULT NULL,
|
|
||||||
LoginTime INT DEFAULT NULL,
|
|
||||||
LogoutTime INT DEFAULT NULL,
|
|
||||||
Handle BIGINT DEFAULT NULL,
|
|
||||||
PositionX DOUBLE DEFAULT NULL,
|
|
||||||
PositionY DOUBLE DEFAULT NULL,
|
|
||||||
PositionZ DOUBLE DEFAULT NULL,
|
|
||||||
LookAtX DOUBLE DEFAULT NULL,
|
|
||||||
LookAtY DOUBLE DEFAULT NULL,
|
|
||||||
LookAtZ DOUBLE DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ProfileID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE UserProfiles (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
WebLoginKey VARCHAR(36) DEFAULT NULL,
|
|
||||||
FirstName VARCHAR(32) DEFAULT NULL,
|
|
||||||
SurName VARCHAR(32) DEFAULT NULL,
|
|
||||||
Email VARCHAR(250) DEFAULT NULL,
|
|
||||||
PasswordHash VARCHAR(32) DEFAULT NULL,
|
|
||||||
PasswordSalt VARCHAR(32) DEFAULT NULL,
|
|
||||||
HomeRegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
HomeRegionX INT DEFAULT NULL,
|
|
||||||
HomeRegionY INT DEFAULT NULL,
|
|
||||||
HomeLocationX DOUBLE DEFAULT NULL,
|
|
||||||
HomeLocationY DOUBLE DEFAULT NULL,
|
|
||||||
HomeLocationZ DOUBLE DEFAULT NULL,
|
|
||||||
HomeLookAtX DOUBLE DEFAULT NULL,
|
|
||||||
HomeLookAtY DOUBLE DEFAULT NULL,
|
|
||||||
HomeLookAtZ DOUBLE DEFAULT NULL,
|
|
||||||
Created INT DEFAULT NULL,
|
|
||||||
LastLogin INT DEFAULT NULL,
|
|
||||||
UserInventoryURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
UserAssetURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
Image VARCHAR(36) DEFAULT NULL,
|
|
||||||
FirstLifeImage VARCHAR(36) DEFAULT NULL,
|
|
||||||
AboutText TEXT DEFAULT NULL,
|
|
||||||
FirstLifeAboutText TEXT DEFAULT NULL,
|
|
||||||
CanDoMask INT DEFAULT NULL,
|
|
||||||
WantDoMask INT DEFAULT NULL,
|
|
||||||
UserFlags INT DEFAULT NULL,
|
|
||||||
GodLevel INT DEFAULT NULL,
|
|
||||||
CustomType VARCHAR(32) DEFAULT NULL,
|
|
||||||
Partner VARCHAR(36) DEFAULT NULL,
|
|
||||||
RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
|
|
||||||
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
|
|
||||||
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
|
|
||||||
|
|
||||||
CREATE TABLE UserAppearances (
|
|
||||||
Owner VARCHAR(36) NOT NULL,
|
|
||||||
BodyItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
BodyAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkinItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkinAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
HairItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
HairAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
EyesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
EyesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
PantsItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
PantsAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShoesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShoesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SocksItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SocksAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
JacketItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
JacketAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
GlovesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
GlovesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderShirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderShirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderPantsItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderPantsAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
Texture LONGBLOB,
|
|
||||||
VisualParams LONGBLOB,
|
|
||||||
Serial INT DEFAULT NULL,
|
|
||||||
AvatarHeight FLOAT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (Owner)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE TABLE UserFriends (
|
|
||||||
UserFriendID VARCHAR(36) NOT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
FriendID VARCHAR(36) DEFAULT NULL,
|
|
||||||
FriendPermissions INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (UserFriendID)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
|
|
|
@ -1,23 +0,0 @@
|
||||||
<Addin id="OpenSim.Data.NHibernate" version="0.1">
|
|
||||||
<Runtime>
|
|
||||||
<Import assembly="OpenSim.Data.NHibernate.dll"/>
|
|
||||||
</Runtime>
|
|
||||||
<Dependencies>
|
|
||||||
<Addin id="OpenSim.Data" version="0.5" />
|
|
||||||
</Dependencies>
|
|
||||||
<Extension path = "/OpenSim/GridData">
|
|
||||||
<Plugin id="NHibernateGridData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateGridData" />
|
|
||||||
</Extension>
|
|
||||||
<!-- <Extension path = "/OpenSim/LogData">
|
|
||||||
<Plugin id="MySQLLogData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLLogData" />
|
|
||||||
</Extension> -->
|
|
||||||
<Extension path = "/OpenSim/AssetData">
|
|
||||||
<Plugin id="NHibernateAssetData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateAssetData" />
|
|
||||||
</Extension>
|
|
||||||
<Extension path = "/OpenSim/InventoryData">
|
|
||||||
<Plugin id="NHibernateInventoryData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateInventoryData" />
|
|
||||||
</Extension>
|
|
||||||
<Extension path = "/OpenSim/UserData">
|
|
||||||
<Plugin id="NHibernateUserData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateUserData" />
|
|
||||||
</Extension>
|
|
||||||
</Addin>
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE TABLE Assets (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
Type SMALLINT DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
Description VARCHAR(64) DEFAULT NULL,
|
|
||||||
Local BOOLEAN DEFAULT NULL,
|
|
||||||
Temporary BOOLEAN DEFAULT NULL,
|
|
||||||
Data BYTEA,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
|
@ -1,72 +0,0 @@
|
||||||
CREATE TABLE EstateSettings (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ParentEstateID INT DEFAULT NULL,
|
|
||||||
EstateOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
RedirectGridX INT DEFAULT NULL,
|
|
||||||
RedirectGridY INT DEFAULT NULL,
|
|
||||||
BillableFactor DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PricePerMeter INT DEFAULT NULL,
|
|
||||||
SunPosition DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
|
|
||||||
UseGlobalTime BOOLEAN DEFAULT NULL,
|
|
||||||
FixedSun BOOLEAN DEFAULT NULL,
|
|
||||||
AllowVoice BOOLEAN DEFAULT NULL,
|
|
||||||
AllowDirectTeleport BOOLEAN DEFAULT NULL,
|
|
||||||
ResetHomeOnTeleport BOOLEAN DEFAULT NULL,
|
|
||||||
PublicAccess BOOLEAN DEFAULT NULL,
|
|
||||||
DenyAnonymous BOOLEAN DEFAULT NULL,
|
|
||||||
DenyIdentified BOOLEAN DEFAULT NULL,
|
|
||||||
DenyTransacted BOOLEAN DEFAULT NULL,
|
|
||||||
DenyMinors BOOLEAN DEFAULT NULL,
|
|
||||||
BlockDwell BOOLEAN DEFAULT NULL,
|
|
||||||
EstateSkipScripts BOOLEAN DEFAULT NULL,
|
|
||||||
TaxFree BOOLEAN DEFAULT NULL,
|
|
||||||
AbuseEmailToEstateOwner BOOLEAN DEFAULT NULL,
|
|
||||||
|
|
||||||
AbuseEmail VARCHAR(255) DEFAULT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (EstateID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateRegionLink (
|
|
||||||
EstateRegionLinkID VARCHAR(36) NOT NULL,
|
|
||||||
EstateID INT DEFAULT NULL,
|
|
||||||
RegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (EstateRegionLinkID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
|
|
||||||
CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE EstateManagers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ManagerID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateUsers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
UserID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateGroups (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
GroupID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateBans (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
BannedUserID VARCHAR(36) NOT NULL,
|
|
||||||
BannedHostAddress VARCHAR(16) NOT NULL,
|
|
||||||
BannedHostIPMask VARCHAR(16) NOT NULL,
|
|
||||||
BannedHostNameMask VARCHAR(16) NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
|
@ -1,35 +0,0 @@
|
||||||
CREATE TABLE Regions (
|
|
||||||
RegionID VARCHAR(36) NOT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OriginID VARCHAR(36) DEFAULT NULL,
|
|
||||||
RegionHandle BIGINT DEFAULT NULL,
|
|
||||||
RegionName VARCHAR(32) DEFAULT NULL,
|
|
||||||
RegionRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionSecret VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionDataURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
ServerIP VARCHAR(64) DEFAULT NULL,
|
|
||||||
ServerPort INT DEFAULT NULL,
|
|
||||||
ServerURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionLocX INT DEFAULT NULL,
|
|
||||||
RegionLocY INT DEFAULT NULL,
|
|
||||||
RegionLocZ INT DEFAULT NULL,
|
|
||||||
EastOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
WestOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
SouthOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
NorthOverrideHandle BIGINT DEFAULT NULL,
|
|
||||||
RegionAssetURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionUserURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionMapTextureId VARCHAR(36) DEFAULT NULL,
|
|
||||||
ServerHttpPort INT DEFAULT NULL,
|
|
||||||
ServerRemotingPort INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX RegionNameIndex ON Regions (RegionName);
|
|
||||||
CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
|
|
||||||
CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
|
|
|
@ -1,39 +0,0 @@
|
||||||
CREATE TABLE InventoryFolders (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
Type SMALLINT DEFAULT NULL,
|
|
||||||
Version INT DEFAULT NULL,
|
|
||||||
ParentID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Owner VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
|
|
||||||
CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
|
|
||||||
|
|
||||||
CREATE TABLE InventoryItems (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
InvType INT DEFAULT NULL,
|
|
||||||
AssetType INT DEFAULT NULL,
|
|
||||||
AssetID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Folder VARCHAR(36) DEFAULT NULL,
|
|
||||||
Owner VARCHAR(36) DEFAULT NULL,
|
|
||||||
Creator VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
Description VARCHAR(64) DEFAULT NULL,
|
|
||||||
NextPermissions INT DEFAULT NULL,
|
|
||||||
CurrentPermissions INT DEFAULT NULL,
|
|
||||||
BasePermissions INT DEFAULT NULL,
|
|
||||||
EveryOnePermissions INT DEFAULT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
GroupOwned BOOLEAN DEFAULT NULL,
|
|
||||||
SalePrice INT DEFAULT NULL,
|
|
||||||
SaleType SMALLINT DEFAULT NULL,
|
|
||||||
Flags INT DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
|
|
||||||
CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
|
|
||||||
CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
|
|
|
@ -1,169 +0,0 @@
|
||||||
CREATE TABLE Prims (
|
|
||||||
UUID VARCHAR(36) NOT NULL,
|
|
||||||
RegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
ParentID INT DEFAULT NULL,
|
|
||||||
ParentUUID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreatorID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
LinkNum INT DEFAULT NULL,
|
|
||||||
Name VARCHAR(255) DEFAULT NULL,
|
|
||||||
Text VARCHAR(255) DEFAULT NULL,
|
|
||||||
Description VARCHAR(255) DEFAULT NULL,
|
|
||||||
SitName VARCHAR(255) DEFAULT NULL,
|
|
||||||
TouchName VARCHAR(255) DEFAULT NULL,
|
|
||||||
ObjectFlags INT DEFAULT NULL,
|
|
||||||
OwnerMask INT DEFAULT NULL,
|
|
||||||
NextOwnerMask INT DEFAULT NULL,
|
|
||||||
GroupMask INT DEFAULT NULL,
|
|
||||||
EveryoneMask INT DEFAULT NULL,
|
|
||||||
BaseMask INT DEFAULT NULL,
|
|
||||||
Material SMALLINT DEFAULT NULL,
|
|
||||||
ScriptAccessPin INT DEFAULT NULL,
|
|
||||||
TextureAnimation BYTEA,
|
|
||||||
ParticleSystem BYTEA,
|
|
||||||
ClickAction SMALLINT DEFAULT NULL,
|
|
||||||
Color INT DEFAULT NULL,
|
|
||||||
PositionX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PositionY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PositionZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
GroupPositionX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
GroupPositionY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
GroupPositionZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
VelocityX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
VelocityY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
VelocityZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
AngularVelocityX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
AngularVelocityY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
AngularVelocityZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
AccelerationX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
AccelerationY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
AccelerationZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
RotationX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
RotationY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
RotationZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
RotationW DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOffsetX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOffsetY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOffsetZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOrientW DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOrientX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOrientY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SitTargetOrientZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
-- this is the shape
|
|
||||||
Shape INT DEFAULT NULL,
|
|
||||||
ScaleX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
ScaleY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
ScaleZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PCode INT DEFAULT NULL,
|
|
||||||
PathBegin INT DEFAULT NULL,
|
|
||||||
PathEnd INT DEFAULT NULL,
|
|
||||||
PathScaleX INT DEFAULT NULL,
|
|
||||||
PathScaleY INT DEFAULT NULL,
|
|
||||||
PathShearX INT DEFAULT NULL,
|
|
||||||
PathShearY INT DEFAULT NULL,
|
|
||||||
PathSkew SMALLINT DEFAULT NULL,
|
|
||||||
PathCurve INT DEFAULT NULL,
|
|
||||||
PathRadiusOffset SMALLINT DEFAULT NULL,
|
|
||||||
PathRevolutions INT DEFAULT NULL,
|
|
||||||
PathTaperX SMALLINT DEFAULT NULL,
|
|
||||||
PathTaperY SMALLINT DEFAULT NULL,
|
|
||||||
PathTwist SMALLINT DEFAULT NULL,
|
|
||||||
ProfileBegin INT DEFAULT NULL,
|
|
||||||
ProfileEnd INT DEFAULT NULL,
|
|
||||||
ProfileCurve INT DEFAULT NULL,
|
|
||||||
ProfileHollow INT DEFAULT NULL,
|
|
||||||
State INT DEFAULT NULL,
|
|
||||||
Texture BYTEA,
|
|
||||||
ExtraParams BYTEA,
|
|
||||||
PRIMARY KEY (UUID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
|
|
||||||
CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
|
|
||||||
|
|
||||||
CREATE TABLE Terrain (
|
|
||||||
RegionID VARCHAR(36) not null,
|
|
||||||
MapData BYTEA,
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE PrimItems (
|
|
||||||
ItemID VARCHAR(36) NOT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PrimID VARCHAR(36) DEFAULT NULL,
|
|
||||||
ParentFolderID VARCHAR(36) DEFAULT NULL,
|
|
||||||
AssetID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreatorID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
Type INT DEFAULT NULL,
|
|
||||||
InvType INT DEFAULT NULL,
|
|
||||||
Name VARCHAR(255) DEFAULT NULL,
|
|
||||||
Description VARCHAR(255) DEFAULT NULL,
|
|
||||||
NextPermissions INT DEFAULT NULL,
|
|
||||||
CurrentPermissions INT DEFAULT NULL,
|
|
||||||
BasePermissions INT DEFAULT NULL,
|
|
||||||
EveryonePermissions INT DEFAULT NULL,
|
|
||||||
GroupPermissions INT DEFAULT NULL,
|
|
||||||
Flags INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ItemID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
|
|
||||||
|
|
||||||
CREATE TABLE RegionSettings (
|
|
||||||
RegionID VARCHAR(36) NOT NULL,
|
|
||||||
|
|
||||||
BlockTerraform BOOLEAN DEFAULT NULL,
|
|
||||||
BlockFly BOOLEAN DEFAULT NULL,
|
|
||||||
AllowDamage BOOLEAN DEFAULT NULL,
|
|
||||||
RestrictPushing BOOLEAN DEFAULT NULL,
|
|
||||||
AllowLandResell BOOLEAN DEFAULT NULL,
|
|
||||||
AllowLandJoinDivide BOOLEAN DEFAULT NULL,
|
|
||||||
BlockShowInSearch BOOLEAN DEFAULT NULL,
|
|
||||||
|
|
||||||
AgentLimit INT DEFAULT NULL,
|
|
||||||
ObjectBonus DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Maturity INT DEFAULT NULL,
|
|
||||||
|
|
||||||
DisableScripts BOOLEAN DEFAULT NULL,
|
|
||||||
DisableCollisions BOOLEAN DEFAULT NULL,
|
|
||||||
DisablePhysics BOOLEAN DEFAULT NULL,
|
|
||||||
|
|
||||||
TerrainTexture1 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture2 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture3 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture4 VARCHAR(36) DEFAULT NULL,
|
|
||||||
|
|
||||||
Elevation1NW DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation2NW DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation1NE DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation2NE DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation1SE DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation2SE DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation1SW DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Elevation2SW DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
|
|
||||||
WaterHeight DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
TerrainRaiseLimit DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
TerrainLowerLimit DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
|
|
||||||
UseEstateSun BOOLEAN DEFAULT NULL,
|
|
||||||
Sandbox BOOLEAN DEFAULT NULL,
|
|
||||||
|
|
||||||
SunVectorX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SunVectorY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
SunVectorZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
|
|
||||||
FixedSun BOOLEAN DEFAULT NULL,
|
|
||||||
SunPosition DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
|
|
||||||
Covenant VARCHAR(36) DEFAULT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
);
|
|
||||||
|
|
|
@ -1,104 +0,0 @@
|
||||||
CREATE TABLE UserAgents (
|
|
||||||
ProfileID VARCHAR(36) NOT NULL,
|
|
||||||
AgentIP VARCHAR(24) DEFAULT NULL,
|
|
||||||
AgentPort INT DEFAULT NULL,
|
|
||||||
AgentOnline BOOLEAN DEFAULT NULL,
|
|
||||||
SessionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
SecureSessionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
InitialRegion VARCHAR(255) DEFAULT NULL,
|
|
||||||
Region VARCHAR(255) DEFAULT NULL,
|
|
||||||
LoginTime INT DEFAULT NULL,
|
|
||||||
LogoutTime INT DEFAULT NULL,
|
|
||||||
Handle BIGINT DEFAULT NULL,
|
|
||||||
PositionX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PositionY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PositionZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
LookAtX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
LookAtY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
LookAtZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ProfileID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE UserProfiles (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
WebLoginKey VARCHAR(36) DEFAULT NULL,
|
|
||||||
FirstName VARCHAR(32) DEFAULT NULL,
|
|
||||||
SurName VARCHAR(32) DEFAULT NULL,
|
|
||||||
Email VARCHAR(250) DEFAULT NULL,
|
|
||||||
PasswordHash VARCHAR(32) DEFAULT NULL,
|
|
||||||
PasswordSalt VARCHAR(32) DEFAULT NULL,
|
|
||||||
HomeRegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
HomeRegionX INT DEFAULT NULL,
|
|
||||||
HomeRegionY INT DEFAULT NULL,
|
|
||||||
HomeLocationX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
HomeLocationY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
HomeLocationZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
HomeLookAtX DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
HomeLookAtY DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
HomeLookAtZ DOUBLE PRECISION DEFAULT NULL,
|
|
||||||
Created INT DEFAULT NULL,
|
|
||||||
LastLogin INT DEFAULT NULL,
|
|
||||||
UserInventoryURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
UserAssetURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
Image VARCHAR(36) DEFAULT NULL,
|
|
||||||
FirstLifeImage VARCHAR(36) DEFAULT NULL,
|
|
||||||
AboutText TEXT DEFAULT NULL,
|
|
||||||
FirstLifeAboutText TEXT DEFAULT NULL,
|
|
||||||
CanDoMask INT DEFAULT NULL,
|
|
||||||
WantDoMask INT DEFAULT NULL,
|
|
||||||
UserFlags INT DEFAULT NULL,
|
|
||||||
GodLevel INT DEFAULT NULL,
|
|
||||||
CustomType VARCHAR(32) DEFAULT NULL,
|
|
||||||
Partner VARCHAR(36) DEFAULT NULL,
|
|
||||||
RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
|
|
||||||
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
|
|
||||||
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
|
|
||||||
|
|
||||||
CREATE TABLE UserAppearances (
|
|
||||||
Owner VARCHAR(36) NOT NULL,
|
|
||||||
BodyItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
BodyAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkinItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkinAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
HairItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
HairAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
EyesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
EyesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
PantsItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
PantsAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShoesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShoesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SocksItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SocksAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
JacketItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
JacketAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
GlovesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
GlovesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderShirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderShirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderPantsItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderPantsAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
Texture BYTEA,
|
|
||||||
VisualParams BYTEA,
|
|
||||||
Serial INT DEFAULT NULL,
|
|
||||||
AvatarHeight FLOAT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (Owner)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE UserFriends (
|
|
||||||
UserFriendID VARCHAR(36) NOT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
FriendID VARCHAR(36) DEFAULT NULL,
|
|
||||||
FriendPermissions INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (UserFriendID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
|
|
|
@ -1,44 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Data.RegionProfileData, OpenSim.Data" table="Regions" lazy="false">
|
|
||||||
<id name="Uuid" column="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
<property name="Owner_uuid" column="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="OriginUUID" column="OriginID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="RegionHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="RegionName" type="String" length="32" />
|
|
||||||
<property name="RegionRecvKey" type="String" length="128" />
|
|
||||||
<property name="RegionSendKey" type="String" length="128" />
|
|
||||||
<property name="RegionSecret" type="String" length="128" />
|
|
||||||
<property name="RegionDataURI" type="String" length="255" />
|
|
||||||
|
|
||||||
<property name="ServerIP" type="String" length="64" />
|
|
||||||
<property name="ServerPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ServerURI" type="String" length="255" />
|
|
||||||
|
|
||||||
<property name="RegionLocX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="RegionLocY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="RegionLocZ" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="EastOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="WestOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SouthOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="NorthOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="RegionAssetURI" type="String" length="255" />
|
|
||||||
<property name="RegionAssetRecvKey" type="String" length="128" />
|
|
||||||
<property name="RegionAssetSendKey" type="String" length="128" />
|
|
||||||
|
|
||||||
<property name="RegionUserURI" type="String" length="255" />
|
|
||||||
<property name="RegionUserRecvKey" type="String" length="128" />
|
|
||||||
<property name="RegionUserSendKey" type="String" length="128" />
|
|
||||||
<property name="RegionMapTextureID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="ServerHttpPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ServerRemotingPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,56 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.RegionSettings, OpenSim.Framework" table="RegionSettings" lazy="false">
|
|
||||||
<id name="RegionUUID" column="RegionId" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
<property name="BlockTerraform" type="System.Boolean" />
|
|
||||||
<property name="BlockFly" type="System.Boolean" />
|
|
||||||
<property name="AllowDamage" type="System.Boolean" />
|
|
||||||
<property name="RestrictPushing" type="System.Boolean" />
|
|
||||||
<property name="AllowLandResell" type="System.Boolean" />
|
|
||||||
<property name="AllowLandJoinDivide" type="System.Boolean" />
|
|
||||||
<property name="BlockShowInSearch" type="System.Boolean" />
|
|
||||||
|
|
||||||
<property name="AgentLimit" type="System.Int32" />
|
|
||||||
<property name="ObjectBonus" type="System.Double" />
|
|
||||||
<property name="Maturity" type="System.Int32" />
|
|
||||||
|
|
||||||
<property name="DisableScripts" type="System.Boolean" />
|
|
||||||
<property name="DisableCollisions" type="System.Boolean" />
|
|
||||||
<property name="DisablePhysics" type="System.Boolean" />
|
|
||||||
|
|
||||||
<property name="TerrainTexture1" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="TerrainTexture2" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="TerrainTexture3" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="TerrainTexture4" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="Elevation1NW" type="System.Double" />
|
|
||||||
<property name="Elevation2NW" type="System.Double" />
|
|
||||||
<property name="Elevation1NE" type="System.Double" />
|
|
||||||
<property name="Elevation2NE" type="System.Double" />
|
|
||||||
<property name="Elevation1SE" type="System.Double" />
|
|
||||||
<property name="Elevation2SE" type="System.Double" />
|
|
||||||
<property name="Elevation1SW" type="System.Double" />
|
|
||||||
<property name="Elevation2SW" type="System.Double" />
|
|
||||||
|
|
||||||
<property name="WaterHeight" type="System.Double" />
|
|
||||||
<property name="TerrainRaiseLimit" type="System.Double" />
|
|
||||||
<property name="TerrainLowerLimit" type="System.Double" />
|
|
||||||
|
|
||||||
<property name="UseEstateSun" type="System.Boolean" />
|
|
||||||
<property name="Sandbox" type="System.Boolean" />
|
|
||||||
|
|
||||||
<property name="SunVector" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="SunVectorX" />
|
|
||||||
<column name="SunVectorY" />
|
|
||||||
<column name="SunVectorZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="FixedSun" type="System.Boolean" />
|
|
||||||
<property name="SunPosition" type="System.Double" />
|
|
||||||
<property name="Covenant" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,147 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Region.Framework.Scenes.SceneObjectPart, OpenSim.Region.Framework" table="Prims" lazy="false">
|
|
||||||
<id name="UUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="ParentID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="ParentUUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="CreationDate" type="System.Int32" />
|
|
||||||
<property name="Name" type="String" length="255" />
|
|
||||||
<property name="Text" type="String" length="255" />
|
|
||||||
<property name="Description" type="String" length="255" />
|
|
||||||
<property name="SitName" type="String" length="255" />
|
|
||||||
<property name="TouchName" type="String" length="255" />
|
|
||||||
<property name="Color" type="OpenSim.Data.NHibernate.ColorUserType, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="ObjectFlags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="LinkNum" type="System.Int32" />
|
|
||||||
|
|
||||||
<property name="OwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="NextOwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GroupMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="EveryoneMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="BaseMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="Material" type="Byte" />
|
|
||||||
<property name="ScriptAccessPin" type="System.Int32" />
|
|
||||||
<property name="TextureAnimation" type="binary" />
|
|
||||||
<property name="ParticleSystem" type="binary" />
|
|
||||||
<property name="ClickAction" type="Byte" />
|
|
||||||
|
|
||||||
<property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="PositionX" />
|
|
||||||
<column name="PositionY" />
|
|
||||||
<column name="PositionZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="GroupPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="GroupPositionX" />
|
|
||||||
<column name="GroupPositionY" />
|
|
||||||
<column name="GroupPositionZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Velocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="VelocityX" />
|
|
||||||
<column name="VelocityY" />
|
|
||||||
<column name="VelocityZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="AngularVelocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="AngularVelocityX" />
|
|
||||||
<column name="AngularVelocityY" />
|
|
||||||
<column name="AngularVelocityZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Acceleration" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="AccelerationX" />
|
|
||||||
<column name="AccelerationY" />
|
|
||||||
<column name="AccelerationZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="SitTargetOffsetX" />
|
|
||||||
<column name="SitTargetOffsetY" />
|
|
||||||
<column name="SitTargetOffsetZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="RotationOffset" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="RotationX" />
|
|
||||||
<column name="RotationY" />
|
|
||||||
<column name="RotationZ" />
|
|
||||||
<column name="RotationW" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="SitTargetOrientX" />
|
|
||||||
<column name="SitTargetOrientY" />
|
|
||||||
<column name="SitTargetOrientZ" />
|
|
||||||
<column name="SitTargetOrientW" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<component name="Shape">
|
|
||||||
<property name="Scale" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="ScaleX" />
|
|
||||||
<column name="ScaleY" />
|
|
||||||
<column name="ScaleZ" />
|
|
||||||
</property>
|
|
||||||
<property name="PCode" type="System.Byte" />
|
|
||||||
<property name="PathBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PathEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PathScaleX" type="System.Byte" />
|
|
||||||
<property name="PathScaleY" type="System.Byte" />
|
|
||||||
<property name="PathShearX" type="System.Byte" />
|
|
||||||
<property name="PathShearY" type="System.Byte" />
|
|
||||||
<property name="PathSkew" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PathCurve" type="System.Byte" />
|
|
||||||
<property name="PathRadiusOffset" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PathRevolutions" type="System.Byte" />
|
|
||||||
<property name="PathTaperX" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PathTaperY" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PathTwist" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ProfileBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ProfileEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ProfileCurve" type="System.Byte" />
|
|
||||||
<property name="ProfileHollow" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="TextureEntry" column="Texture" type="binary" />
|
|
||||||
<property name="ExtraParams" type="binary" />
|
|
||||||
<property name="State" type="System.Byte" />
|
|
||||||
</component>
|
|
||||||
</class>
|
|
||||||
<class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false">
|
|
||||||
<id name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<!-- <property name="MapData" type="OpenSim.Data.NHibernate.BlobType, OpenSim.Data.NHibernate" /> -->
|
|
||||||
<property name="MapData" type="binary" />
|
|
||||||
</class>
|
|
||||||
<class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
|
|
||||||
<id name="ItemID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
|
||||||
<property name="CurrentPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="BasePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="EveryonePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GroupPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="NextPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Name" type="String" length="255" />
|
|
||||||
<property name="Description" type="String" length="255" />
|
|
||||||
<property name="CreationDate" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Flags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="InvType" type="System.Int32" />
|
|
||||||
<property name="Type" type="System.Int32" />
|
|
||||||
</class>
|
|
||||||
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE TABLE Assets (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
Type SMALLINT DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
Description VARCHAR(64) DEFAULT NULL,
|
|
||||||
Local BIT DEFAULT NULL,
|
|
||||||
Temporary BIT DEFAULT NULL,
|
|
||||||
Data BLOB,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
|
@ -1,71 +0,0 @@
|
||||||
CREATE TABLE EstateSettings (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ParentEstateID INT DEFAULT NULL,
|
|
||||||
EstateOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
RedirectGridX INT DEFAULT NULL,
|
|
||||||
RedirectGridY INT DEFAULT NULL,
|
|
||||||
BillableFactor DOUBLE DEFAULT NULL,
|
|
||||||
PricePerMeter INT DEFAULT NULL,
|
|
||||||
SunPosition DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
UseGlobalTime BIT DEFAULT NULL,
|
|
||||||
FixedSun BIT DEFAULT NULL,
|
|
||||||
AllowVoice BIT DEFAULT NULL,
|
|
||||||
AllowDirectTeleport BIT DEFAULT NULL,
|
|
||||||
ResetHomeOnTeleport BIT DEFAULT NULL,
|
|
||||||
PublicAccess BIT DEFAULT NULL,
|
|
||||||
DenyAnonymous BIT DEFAULT NULL,
|
|
||||||
DenyIdentified BIT DEFAULT NULL,
|
|
||||||
DenyTransacted BIT DEFAULT NULL,
|
|
||||||
DenyMinors BIT DEFAULT NULL,
|
|
||||||
BlockDwell BIT DEFAULT NULL,
|
|
||||||
EstateSkipScripts BIT DEFAULT NULL,
|
|
||||||
TaxFree BIT DEFAULT NULL,
|
|
||||||
AbuseEmailToEstateOwner BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
AbuseEmail VARCHAR(255) DEFAULT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (EstateID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateRegionLink (
|
|
||||||
EstateRegionLinkID VARCHAR(36) NOT NULL,
|
|
||||||
EstateID INT DEFAULT NULL,
|
|
||||||
RegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (EstateRegionLinkID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
|
|
||||||
CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
|
|
||||||
|
|
||||||
CREATE TABLE EstateManagers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ManagerID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateUsers (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
UserID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateGroups (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
GroupID VARCHAR(36) NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE EstateBans (
|
|
||||||
EstateID INT NOT NULL,
|
|
||||||
ArrayIndex INT NOT NULL,
|
|
||||||
BannedUserID VARCHAR(36) NOT NULL,
|
|
||||||
BannedHostAddress VARCHAR(16) NOT NULL,
|
|
||||||
BannedHostIPMask VARCHAR(16) NOT NULL,
|
|
||||||
BannedHostNameMask VARCHAR(16) NOT NULL,
|
|
||||||
PRIMARY KEY (EstateID,ArrayIndex)
|
|
||||||
);
|
|
|
@ -1,35 +0,0 @@
|
||||||
CREATE TABLE Regions (
|
|
||||||
RegionId VARCHAR(36) NOT NULL,
|
|
||||||
RegionHandle BIGINT UNSIGNED NOT NULL,
|
|
||||||
RegionName VARCHAR(32) DEFAULT NULL,
|
|
||||||
RegionRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionSecret VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionDataURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
ServerIP VARCHAR(64) DEFAULT NULL,
|
|
||||||
ServerPort INT UNSIGNED DEFAULT NULL,
|
|
||||||
ServerURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionLocX INT UNSIGNED DEFAULT NULL,
|
|
||||||
RegionLocY INT UNSIGNED DEFAULT NULL,
|
|
||||||
RegionLocZ INT UNSIGNED DEFAULT NULL,
|
|
||||||
EastOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
|
||||||
WestOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
|
||||||
SouthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
|
||||||
NorthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
|
||||||
RegionAssetURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionUserURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
|
|
||||||
RegionMapTextureId VARCHAR(36) DEFAULT NULL,
|
|
||||||
ServerHttpPort INT DEFAULT NULL,
|
|
||||||
ServerRemotingPort INT DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OriginID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (RegionId)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX RegionNameIndex ON Regions (RegionName);
|
|
||||||
CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
|
|
||||||
CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
|
|
|
@ -1,39 +0,0 @@
|
||||||
CREATE TABLE InventoryFolders (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
Type SMALLINT DEFAULT NULL,
|
|
||||||
Version INT DEFAULT NULL,
|
|
||||||
ParentID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Owner VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
|
|
||||||
CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
|
|
||||||
|
|
||||||
CREATE TABLE InventoryItems (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
InvType INT DEFAULT NULL,
|
|
||||||
AssetType INT DEFAULT NULL,
|
|
||||||
AssetID VARCHAR(36) DEFAULT NULL,
|
|
||||||
Folder VARCHAR(36) DEFAULT NULL,
|
|
||||||
Owner VARCHAR(36) DEFAULT NULL,
|
|
||||||
Creator VARCHAR(36) DEFAULT NULL,
|
|
||||||
Name VARCHAR(64) DEFAULT NULL,
|
|
||||||
Description VARCHAR(64) DEFAULT NULL,
|
|
||||||
NextPermissions INT DEFAULT NULL,
|
|
||||||
CurrentPermissions INT DEFAULT NULL,
|
|
||||||
BasePermissions INT DEFAULT NULL,
|
|
||||||
EveryOnePermissions INT DEFAULT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
GroupOwned BIT DEFAULT NULL,
|
|
||||||
SalePrice INT DEFAULT NULL,
|
|
||||||
SaleType TINYINT DEFAULT NULL,
|
|
||||||
Flags INT DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
|
|
||||||
CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
|
|
||||||
CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
|
|
|
@ -1,168 +0,0 @@
|
||||||
CREATE TABLE Prims (
|
|
||||||
UUID VARCHAR(36) NOT NULL,
|
|
||||||
RegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
ParentID INT DEFAULT NULL,
|
|
||||||
ParentUUID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreatorID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreationDate INT DEFAULT NULL,
|
|
||||||
LinkNum INT DEFAULT NULL,
|
|
||||||
Name VARCHAR(255) DEFAULT NULL,
|
|
||||||
Text VARCHAR(255) DEFAULT NULL,
|
|
||||||
Description VARCHAR(255) DEFAULT NULL,
|
|
||||||
SitName VARCHAR(255) DEFAULT NULL,
|
|
||||||
TouchName VARCHAR(255) DEFAULT NULL,
|
|
||||||
ObjectFlags INT DEFAULT NULL,
|
|
||||||
OwnerMask INT DEFAULT NULL,
|
|
||||||
NextOwnerMask INT DEFAULT NULL,
|
|
||||||
GroupMask INT DEFAULT NULL,
|
|
||||||
EveryoneMask INT DEFAULT NULL,
|
|
||||||
BaseMask INT DEFAULT NULL,
|
|
||||||
Material TINYINT DEFAULT NULL,
|
|
||||||
ScriptAccessPin INT DEFAULT NULL,
|
|
||||||
TextureAnimation BLOB,
|
|
||||||
ParticleSystem BLOB,
|
|
||||||
ClickAction TINYINT DEFAULT NULL,
|
|
||||||
Color INT DEFAULT NULL,
|
|
||||||
PositionX DOUBLE DEFAULT NULL,
|
|
||||||
PositionY DOUBLE DEFAULT NULL,
|
|
||||||
PositionZ DOUBLE DEFAULT NULL,
|
|
||||||
GroupPositionX DOUBLE DEFAULT NULL,
|
|
||||||
GroupPositionY DOUBLE DEFAULT NULL,
|
|
||||||
GroupPositionZ DOUBLE DEFAULT NULL,
|
|
||||||
VelocityX DOUBLE DEFAULT NULL,
|
|
||||||
VelocityY DOUBLE DEFAULT NULL,
|
|
||||||
VelocityZ DOUBLE DEFAULT NULL,
|
|
||||||
AngularVelocityX DOUBLE DEFAULT NULL,
|
|
||||||
AngularVelocityY DOUBLE DEFAULT NULL,
|
|
||||||
AngularVelocityZ DOUBLE DEFAULT NULL,
|
|
||||||
AccelerationX DOUBLE DEFAULT NULL,
|
|
||||||
AccelerationY DOUBLE DEFAULT NULL,
|
|
||||||
AccelerationZ DOUBLE DEFAULT NULL,
|
|
||||||
RotationX DOUBLE DEFAULT NULL,
|
|
||||||
RotationY DOUBLE DEFAULT NULL,
|
|
||||||
RotationZ DOUBLE DEFAULT NULL,
|
|
||||||
RotationW DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOffsetX DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOffsetY DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOffsetZ DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientW DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientX DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientY DOUBLE DEFAULT NULL,
|
|
||||||
SitTargetOrientZ DOUBLE DEFAULT NULL,
|
|
||||||
-- this is the shape
|
|
||||||
Shape INT DEFAULT NULL,
|
|
||||||
ScaleX DOUBLE DEFAULT NULL,
|
|
||||||
ScaleY DOUBLE DEFAULT NULL,
|
|
||||||
ScaleZ DOUBLE DEFAULT NULL,
|
|
||||||
PCode INT DEFAULT NULL,
|
|
||||||
PathBegin INT DEFAULT NULL,
|
|
||||||
PathEnd INT DEFAULT NULL,
|
|
||||||
PathScaleX INT DEFAULT NULL,
|
|
||||||
PathScaleY INT DEFAULT NULL,
|
|
||||||
PathShearX INT DEFAULT NULL,
|
|
||||||
PathShearY INT DEFAULT NULL,
|
|
||||||
PathSkew INT DEFAULT NULL,
|
|
||||||
PathCurve INT DEFAULT NULL,
|
|
||||||
PathRadiusOffset INT DEFAULT NULL,
|
|
||||||
PathRevolutions INT DEFAULT NULL,
|
|
||||||
PathTaperX INT DEFAULT NULL,
|
|
||||||
PathTaperY INT DEFAULT NULL,
|
|
||||||
PathTwist INT DEFAULT NULL,
|
|
||||||
ProfileBegin INT DEFAULT NULL,
|
|
||||||
ProfileEnd INT DEFAULT NULL,
|
|
||||||
ProfileCurve INT DEFAULT NULL,
|
|
||||||
ProfileHollow INT DEFAULT NULL,
|
|
||||||
State INT DEFAULT NULL,
|
|
||||||
Texture BLOB,
|
|
||||||
ExtraParams BLOB,
|
|
||||||
PRIMARY KEY (UUID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
|
|
||||||
CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
|
|
||||||
|
|
||||||
CREATE TABLE Terrain (
|
|
||||||
RegionID VARCHAR(36) NOT NULL,
|
|
||||||
MapData BLOB,
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE PrimItems (
|
|
||||||
ItemID VARCHAR(36) NOT NULL,
|
|
||||||
GroupID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PrimID VARCHAR(36) DEFAULT NULL,
|
|
||||||
ParentFolderID VARCHAR(36) DEFAULT NULL,
|
|
||||||
AssetID VARCHAR(36) DEFAULT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreatorID VARCHAR(36) DEFAULT NULL,
|
|
||||||
CreationDate BIGINT DEFAULT NULL,
|
|
||||||
Type INT DEFAULT NULL,
|
|
||||||
InvType INT DEFAULT NULL,
|
|
||||||
Name VARCHAR(255) DEFAULT NULL,
|
|
||||||
Description VARCHAR(255) DEFAULT NULL,
|
|
||||||
NextPermissions INT DEFAULT NULL,
|
|
||||||
CurrentPermissions INT DEFAULT NULL,
|
|
||||||
BasePermissions INT DEFAULT NULL,
|
|
||||||
EveryonePermissions INT DEFAULT NULL,
|
|
||||||
GroupPermissions INT DEFAULT NULL,
|
|
||||||
Flags INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ItemID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
|
|
||||||
|
|
||||||
CREATE TABLE RegionSettings (
|
|
||||||
RegionID VARCHAR(36) NOT NULL,
|
|
||||||
|
|
||||||
BlockTerraform BIT DEFAULT NULL,
|
|
||||||
BlockFly BIT DEFAULT NULL,
|
|
||||||
AllowDamage BIT DEFAULT NULL,
|
|
||||||
RestrictPushing BIT DEFAULT NULL,
|
|
||||||
AllowLandResell BIT DEFAULT NULL,
|
|
||||||
AllowLandJoinDivide BIT DEFAULT NULL,
|
|
||||||
BlockShowInSearch BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
AgentLimit INT DEFAULT NULL,
|
|
||||||
ObjectBonus DOUBLE DEFAULT NULL,
|
|
||||||
Maturity INT DEFAULT NULL,
|
|
||||||
|
|
||||||
DisableScripts BIT DEFAULT NULL,
|
|
||||||
DisableCollisions BIT DEFAULT NULL,
|
|
||||||
DisablePhysics BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
TerrainTexture1 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture2 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture3 VARCHAR(36) DEFAULT NULL,
|
|
||||||
TerrainTexture4 VARCHAR(36) DEFAULT NULL,
|
|
||||||
|
|
||||||
Elevation1NW DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2NW DOUBLE DEFAULT NULL,
|
|
||||||
Elevation1NE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2NE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation1SE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2SE DOUBLE DEFAULT NULL,
|
|
||||||
Elevation1SW DOUBLE DEFAULT NULL,
|
|
||||||
Elevation2SW DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
WaterHeight DOUBLE DEFAULT NULL,
|
|
||||||
TerrainRaiseLimit DOUBLE DEFAULT NULL,
|
|
||||||
TerrainLowerLimit DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
UseEstateSun BIT DEFAULT NULL,
|
|
||||||
Sandbox BIT DEFAULT NULL,
|
|
||||||
|
|
||||||
SunVectorX DOUBLE DEFAULT NULL,
|
|
||||||
SunVectorY DOUBLE DEFAULT NULL,
|
|
||||||
SunVectorZ DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
FixedSun BIT DEFAULT NULL,
|
|
||||||
SunPosition DOUBLE DEFAULT NULL,
|
|
||||||
|
|
||||||
Covenant VARCHAR(36) DEFAULT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (RegionID)
|
|
||||||
);
|
|
|
@ -1,104 +0,0 @@
|
||||||
CREATE TABLE UserAgents (
|
|
||||||
ProfileID VARCHAR(36) NOT NULL,
|
|
||||||
AgentIP VARCHAR(24) DEFAULT NULL,
|
|
||||||
AgentPort INT DEFAULT NULL,
|
|
||||||
AgentOnline BIT DEFAULT NULL,
|
|
||||||
SessionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
SecureSessionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
InitialRegion VARCHAR(255) DEFAULT NULL,
|
|
||||||
Region VARCHAR(255) DEFAULT NULL,
|
|
||||||
LoginTime INT DEFAULT NULL,
|
|
||||||
LogoutTime INT DEFAULT NULL,
|
|
||||||
Handle BIGINT DEFAULT NULL,
|
|
||||||
PositionX DOUBLE DEFAULT NULL,
|
|
||||||
PositionY DOUBLE DEFAULT NULL,
|
|
||||||
PositionZ DOUBLE DEFAULT NULL,
|
|
||||||
LookAtX DOUBLE DEFAULT NULL,
|
|
||||||
LookAtY DOUBLE DEFAULT NULL,
|
|
||||||
LookAtZ DOUBLE DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ProfileID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE UserProfiles (
|
|
||||||
ID VARCHAR(36) NOT NULL,
|
|
||||||
WebLoginKey VARCHAR(36) DEFAULT NULL,
|
|
||||||
FirstName VARCHAR(32) DEFAULT NULL,
|
|
||||||
SurName VARCHAR(32) DEFAULT NULL,
|
|
||||||
Email VARCHAR(250) DEFAULT NULL,
|
|
||||||
PasswordHash VARCHAR(32) DEFAULT NULL,
|
|
||||||
PasswordSalt VARCHAR(32) DEFAULT NULL,
|
|
||||||
HomeRegionID VARCHAR(36) DEFAULT NULL,
|
|
||||||
HomeRegionX INT DEFAULT NULL,
|
|
||||||
HomeRegionY INT DEFAULT NULL,
|
|
||||||
HomeLocationX DOUBLE DEFAULT NULL,
|
|
||||||
HomeLocationY DOUBLE DEFAULT NULL,
|
|
||||||
HomeLocationZ DOUBLE DEFAULT NULL,
|
|
||||||
HomeLookAtX DOUBLE DEFAULT NULL,
|
|
||||||
HomeLookAtY DOUBLE DEFAULT NULL,
|
|
||||||
HomeLookAtZ DOUBLE DEFAULT NULL,
|
|
||||||
Created INT DEFAULT NULL,
|
|
||||||
LastLogin INT DEFAULT NULL,
|
|
||||||
UserInventoryURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
UserAssetURI VARCHAR(255) DEFAULT NULL,
|
|
||||||
Image VARCHAR(36) DEFAULT NULL,
|
|
||||||
FirstLifeImage VARCHAR(36) DEFAULT NULL,
|
|
||||||
AboutText TEXT DEFAULT NULL,
|
|
||||||
FirstLifeAboutText TEXT DEFAULT NULL,
|
|
||||||
CanDoMask INT DEFAULT NULL,
|
|
||||||
WantDoMask INT DEFAULT NULL,
|
|
||||||
UserFlags INT DEFAULT NULL,
|
|
||||||
GodLevel INT DEFAULT NULL,
|
|
||||||
CustomType VARCHAR(32) DEFAULT NULL,
|
|
||||||
Partner VARCHAR(36) DEFAULT NULL,
|
|
||||||
RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (ID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
|
|
||||||
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
|
|
||||||
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
|
|
||||||
|
|
||||||
CREATE TABLE UserAppearances (
|
|
||||||
Owner VARCHAR(36) NOT NULL,
|
|
||||||
BodyItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
BodyAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkinItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkinAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
HairItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
HairAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
EyesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
EyesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
PantsItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
PantsAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShoesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
ShoesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SocksItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SocksAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
JacketItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
JacketAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
GlovesItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
GlovesAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderShirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderShirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderPantsItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
UnderPantsAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkirtItem VARCHAR(36) DEFAULT NULL,
|
|
||||||
SkirtAsset VARCHAR(36) DEFAULT NULL,
|
|
||||||
Texture BLOB,
|
|
||||||
VisualParams BLOB,
|
|
||||||
Serial INT DEFAULT NULL,
|
|
||||||
AvatarHeight FLOAT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (Owner)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE UserFriends (
|
|
||||||
UserFriendID VARCHAR(36) NOT NULL,
|
|
||||||
OwnerID VARCHAR(36) DEFAULT NULL,
|
|
||||||
FriendID VARCHAR(36) DEFAULT NULL,
|
|
||||||
FriendPermissions INT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (UserFriendID)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false">
|
|
||||||
<id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
<property name="AgentIP" type="String" length="24" />
|
|
||||||
<property name="AgentPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="AgentOnline" type="boolean" />
|
|
||||||
<property name="SessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SecureSessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="InitialRegion" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Region" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="LoginTime" type="Int32" />
|
|
||||||
<property name="LogoutTime" type="Int32" />
|
|
||||||
<property name="Handle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
|
||||||
|
|
||||||
<property name="Position" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="PositionX" />
|
|
||||||
<column name="PositionY" />
|
|
||||||
<column name="PositionZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="LookAt" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
|
||||||
<column name="LookAtX" />
|
|
||||||
<column name="LookAtY" />
|
|
||||||
<column name="LookAtZ" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
|
|
||||||
<id name="Owner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="BodyItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="BodyAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SkinItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SkinAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="HairItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="HairAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="EyesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="EyesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="PantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ShoesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="ShoesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SocksItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SocksAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="JacketItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="JacketAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GlovesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="GlovesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="UnderShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="UnderPantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SkirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="SkirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="VisualParams" type="binary" />
|
|
||||||
<property name="Serial" type="Int32" />
|
|
||||||
<property name="AvatarHeight" type="Single" />
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Data.NHibernate.UserFriend, OpenSim.Data.NHibernate" table="UserFriends" lazy="false">
|
|
||||||
<id name="UserFriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="FriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="FriendPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
|
||||||
<class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false">
|
|
||||||
<id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
|
||||||
<generator class="assigned" />
|
|
||||||
</id>
|
|
||||||
<property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="FirstName" index="UserFirstNameIndex" type="String" length="32" />
|
|
||||||
<property name="SurName" index="UserSurnameIndex" type="String" length="32" />
|
|
||||||
<property name="Email" type="String" length="250" />
|
|
||||||
<property name="PasswordHash" type="String" length="32" />
|
|
||||||
<property name="PasswordSalt" type="String" length="32" />
|
|
||||||
<property name="HomeRegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="HomeRegionX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="HomeRegionY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="HomeLocationX" type="Single" />
|
|
||||||
<property name="HomeLocationY" type="Single" />
|
|
||||||
<property name="HomeLocationZ" type="Single" />
|
|
||||||
<property name="HomeLookAtX" type="Single" />
|
|
||||||
<property name="HomeLookAtY" type="Single" />
|
|
||||||
<property name="HomeLookAtZ" type="Single" />
|
|
||||||
<property name="Created" type="Int32" />
|
|
||||||
<property name="LastLogin" type="Int32" />
|
|
||||||
<property name="UserInventoryURI" type="String" length="255"/>
|
|
||||||
<property name="UserAssetURI" type="String" length="255"/>
|
|
||||||
<property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="AboutText" type="String" length="255" />
|
|
||||||
<property name="FirstLifeAboutText" type="String" length="255" />
|
|
||||||
<property name="CanDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="WantDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="UserFlags" type="Int32" />
|
|
||||||
<property name="GodLevel" type="Int32" />
|
|
||||||
<property name="CustomType" type="String" length="32" />
|
|
||||||
<property name="Partner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
<property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
|
||||||
</class>
|
|
||||||
</hibernate-mapping>
|
|
|
@ -1,111 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class SByteType: IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object sbyte1, object sbyte2)
|
|
||||||
{
|
|
||||||
return sbyte1.Equals(sbyte2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object sbyte1)
|
|
||||||
{
|
|
||||||
return sbyte1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object sbyte1)
|
|
||||||
{
|
|
||||||
return sbyte1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object sbyte1)
|
|
||||||
{
|
|
||||||
return (sbyte1 == null) ? 0 : sbyte1.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object sbyte1 = null;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
object tempO = rs.GetValue(ord);
|
|
||||||
if (tempO is Byte)
|
|
||||||
{
|
|
||||||
sbyte1 = Convert.ToSByte(((byte)tempO));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
short temp = rs.GetInt16(ord);
|
|
||||||
sbyte1 = Convert.ToSByte(temp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sbyte1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
sbyte b = (sbyte)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt16(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(sbyte); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Byte.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
|
||||||
using log4net;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
public class Terrain
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
private double[,] map;
|
|
||||||
private UUID regionID;
|
|
||||||
|
|
||||||
public Terrain(UUID Region, double[,] array)
|
|
||||||
{
|
|
||||||
map = array;
|
|
||||||
regionID = Region;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Terrain()
|
|
||||||
{
|
|
||||||
map = new double[Constants.RegionSize, Constants.RegionSize];
|
|
||||||
map.Initialize();
|
|
||||||
regionID = UUID.Zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UUID RegionID
|
|
||||||
{
|
|
||||||
get { return regionID; }
|
|
||||||
set { regionID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] MapData
|
|
||||||
{
|
|
||||||
get { return serializeTerrain(map); }
|
|
||||||
set { map = parseTerrain(value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public double[,] Doubles
|
|
||||||
{
|
|
||||||
get {return map;}
|
|
||||||
set {map = value;}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static double[,] parseTerrain(byte[] data)
|
|
||||||
{
|
|
||||||
double[,] terret = new double[Constants.RegionSize, Constants.RegionSize];
|
|
||||||
terret.Initialize();
|
|
||||||
|
|
||||||
MemoryStream str = new MemoryStream(data);
|
|
||||||
BinaryReader br = new BinaryReader(str);
|
|
||||||
try {
|
|
||||||
for (int x = 0; x < Constants.RegionSize; x++)
|
|
||||||
{
|
|
||||||
for (int y = 0; y < Constants.RegionSize; y++)
|
|
||||||
{
|
|
||||||
terret[x, y] = br.ReadDouble();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error("Issue parsing Map", e);
|
|
||||||
}
|
|
||||||
return terret;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static byte[] serializeTerrain(double[,] val)
|
|
||||||
{
|
|
||||||
MemoryStream str = new MemoryStream((int) ((Constants.RegionSize*Constants.RegionSize)*sizeof (double)));
|
|
||||||
BinaryWriter bw = new BinaryWriter(str);
|
|
||||||
|
|
||||||
// TODO: COMPATIBILITY - Add byte-order conversions
|
|
||||||
for (int x = 0; x < Constants.RegionSize; x++)
|
|
||||||
{
|
|
||||||
for (int y = 0; y < Constants.RegionSize; y++)
|
|
||||||
{
|
|
||||||
double height = val[x, y];
|
|
||||||
if (height <= 0.0)
|
|
||||||
height = double.Epsilon;
|
|
||||||
|
|
||||||
bw.Write(height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str.ToArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMsSqlAssetTest : BasicAssetTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
db = new NHibernateAssetData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateAssetData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMsSqlEstateTest : BasicEstateTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
db = new NHibernateEstateData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateEstateData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
((NHibernateEstateData)db).Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMsSqlGridTest : BasicGridTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateGridData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateGridData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMsSqlInventoryTest : BasicInventoryTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateInventoryData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateInventoryData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMsSqlRegionTest : BasicRegionTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateRegionData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateRegionData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMsSqlUserTest : BasicUserTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateUserData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateUserData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMySQLAssetTest : BasicAssetTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateAssetData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateAssetData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMySQLGridTest : BasicGridTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateGridData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateGridData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMySQLInventoryTest : BasicInventoryTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateInventoryData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateInventoryData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMySQLRegionTest : BasicRegionTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateRegionData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateRegionData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMySQLUserTest : BasicUserTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateUserData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateUserData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateMySQLEstateTest : BasicEstateTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateEstateData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateEstateData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
((NHibernateEstateData)db).Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernatePostgreSQLAssetTest : BasicAssetTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateAssetData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateAssetData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernatePostgreSQLEstateTest : BasicEstateTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateEstateData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateEstateData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
((NHibernateEstateData)db).Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernatePostgreSQLGridTest : BasicGridTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateGridData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateGridData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernatePostgreSQLInventoryTest : BasicInventoryTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateInventoryData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateInventoryData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernatePostgreSQLRegionTest : BasicRegionTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateRegionData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateRegionData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernatePostgreSQLUserTest : BasicUserTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateUserData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateUserData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateSQLiteAssetTest : BasicAssetTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
|
|
||||||
|
|
||||||
db = new NHibernateAssetData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateAssetData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateSQLiteEstateTest : BasicEstateTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
|
|
||||||
|
|
||||||
db = new NHibernateEstateData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateEstateData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
((NHibernateEstateData)db).Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateSQLiteGridTest : BasicGridTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
public string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db = new NHibernateGridData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateGridData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateSQLiteInventoryTest : BasicInventoryTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
|
|
||||||
|
|
||||||
db = new NHibernateInventoryData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateInventoryData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateSQLiteRegionTest : BasicRegionTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
|
|
||||||
|
|
||||||
db = new NHibernateRegionData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateRegionData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenSim.Data.Tests;
|
|
||||||
using log4net;
|
|
||||||
using System.Reflection;
|
|
||||||
using OpenSim.Tests.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate.Tests
|
|
||||||
{
|
|
||||||
|
|
||||||
[TestFixture, DatabaseTest]
|
|
||||||
public class NHibernateSQLiteUserTest : BasicUserTest
|
|
||||||
{
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
public string file;
|
|
||||||
public NHibernateManager database;
|
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
SuperInit();
|
|
||||||
// If we manage to connect to the database with the user
|
|
||||||
// and password above it is our test database, and run
|
|
||||||
// these tests. If anything goes wrong, ignore these
|
|
||||||
// tests.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
|
|
||||||
|
|
||||||
db = new NHibernateUserData();
|
|
||||||
db.Initialise(connect);
|
|
||||||
database = ((NHibernateUserData)db).Manager;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
m_log.Error(e.ToString());
|
|
||||||
Assert.Ignore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
|
||||||
public void Cleanup()
|
|
||||||
{
|
|
||||||
if (db != null)
|
|
||||||
{
|
|
||||||
db.Dispose();
|
|
||||||
}
|
|
||||||
if (database != null)
|
|
||||||
{
|
|
||||||
database.DropSchema();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,115 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
using OpenMetaverse;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class TextureUserType: IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object texture1, object texture2)
|
|
||||||
{
|
|
||||||
return texture1.Equals(texture2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object texture)
|
|
||||||
{
|
|
||||||
if (texture == null)
|
|
||||||
{
|
|
||||||
// TODO: should parametrize this texture out
|
|
||||||
return new Primitive.TextureEntry(new UUID(Constants.DefaultTexture));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
byte[] bytes = ((Primitive.TextureEntry)texture).GetBytes();
|
|
||||||
return new Primitive.TextureEntry(bytes, 0, bytes.Length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object texture)
|
|
||||||
{
|
|
||||||
return texture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object texture)
|
|
||||||
{
|
|
||||||
return (texture == null) ? 0 : texture.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object texture = null;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
byte[] bytes = (byte[])rs[ord];
|
|
||||||
texture = new Primitive.TextureEntry(bytes, 0, bytes.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
return texture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
Primitive.TextureEntry texture = (Primitive.TextureEntry)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = texture.GetBytes();
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(Primitive.TextureEntry); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Binary.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,103 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class UInt16Type : IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object uint1, object uint2)
|
|
||||||
{
|
|
||||||
return uint1.Equals(uint2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object uint1)
|
|
||||||
{
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object uint1)
|
|
||||||
{
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object uint1)
|
|
||||||
{
|
|
||||||
return (uint1 == null) ? 0 : uint1.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object uint1 = null;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
uint1 = (UInt16)rs.GetInt32(ord);
|
|
||||||
}
|
|
||||||
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
UInt16 uint1 = (UInt16)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(UInt16); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,103 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class UInt32Type : IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object uint1, object uint2)
|
|
||||||
{
|
|
||||||
return uint1.Equals(uint2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object uint1)
|
|
||||||
{
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object uint1)
|
|
||||||
{
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object uint1)
|
|
||||||
{
|
|
||||||
return (uint1 == null) ? 0 : uint1.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object uint1 = null;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
uint1 = (UInt32)rs.GetInt32(ord);
|
|
||||||
}
|
|
||||||
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
UInt32 uint1 = (UInt32)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(UInt32); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,103 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using NHibernate;
|
|
||||||
using NHibernate.SqlTypes;
|
|
||||||
using NHibernate.UserTypes;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class UInt64Type : IUserType
|
|
||||||
{
|
|
||||||
public object Assemble(object cached, object owner)
|
|
||||||
{
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUserType.Equals(object uint1, object uint2)
|
|
||||||
{
|
|
||||||
return uint1.Equals(uint2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object DeepCopy(object uint1)
|
|
||||||
{
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Disassemble(object uint1)
|
|
||||||
{
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetHashCode(object uint1)
|
|
||||||
{
|
|
||||||
return (uint1 == null) ? 0 : uint1.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMutable
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object NullSafeGet(IDataReader rs, string[] names, object owner)
|
|
||||||
{
|
|
||||||
object uint1 = null;
|
|
||||||
|
|
||||||
int ord = rs.GetOrdinal(names[0]);
|
|
||||||
if (!rs.IsDBNull(ord))
|
|
||||||
{
|
|
||||||
uint1 = (UInt64)rs.GetInt64(ord);
|
|
||||||
}
|
|
||||||
|
|
||||||
return uint1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NullSafeSet(IDbCommand cmd, object obj, int index)
|
|
||||||
{
|
|
||||||
UInt64 uint1 = (UInt64)obj;
|
|
||||||
((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt64(uint1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Replace(object original, object target, object owner)
|
|
||||||
{
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ReturnedType
|
|
||||||
{
|
|
||||||
get { return typeof(UInt64); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlType[] SqlTypes
|
|
||||||
{
|
|
||||||
get { return new SqlType [] { NHibernateUtil.Int64.SqlType }; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of the OpenSimulator Project nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using OpenMetaverse;
|
|
||||||
|
|
||||||
namespace OpenSim.Data.NHibernate
|
|
||||||
{
|
|
||||||
public class UserFriend
|
|
||||||
{
|
|
||||||
public UserFriend()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserFriend(UUID userFriendID, UUID ownerID, UUID friendID, uint friendPermissions)
|
|
||||||
{
|
|
||||||
this.UserFriendID = userFriendID;
|
|
||||||
this.OwnerID = ownerID;
|
|
||||||
this.FriendID = friendID;
|
|
||||||
this.FriendPermissions = friendPermissions;
|
|
||||||
}
|
|
||||||
|
|
||||||
private UUID userFriendId;
|
|
||||||
public UUID UserFriendID
|
|
||||||
{
|
|
||||||
get { return userFriendId; }
|
|
||||||
set { userFriendId = value; }
|
|
||||||
}
|
|
||||||
private UUID ownerId;
|
|
||||||
public UUID OwnerID
|
|
||||||
{
|
|
||||||
get { return ownerId; }
|
|
||||||
set { ownerId = value; }
|
|
||||||
}
|
|
||||||
private UUID friendId;
|
|
||||||
public UUID FriendID
|
|
||||||
{
|
|
||||||
get { return friendId; }
|
|
||||||
set { friendId = value; }
|
|
||||||
}
|
|
||||||
private uint friendPermissions;
|
|
||||||
public uint FriendPermissions
|
|
||||||
{
|
|
||||||
get { return friendPermissions; }
|
|
||||||
set { friendPermissions = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -323,7 +323,6 @@ namespace OpenSim.Data.Tests
|
||||||
sop.ObjectFlags = 0;
|
sop.ObjectFlags = 0;
|
||||||
|
|
||||||
SceneObjectGroup sog = new SceneObjectGroup(sop);
|
SceneObjectGroup sog = new SceneObjectGroup(sop);
|
||||||
sog.SetScene(scene); // Reguired by nhibernate database module.
|
|
||||||
|
|
||||||
// Inserts group in DB
|
// Inserts group in DB
|
||||||
db.StoreObject(sog,region3);
|
db.StoreObject(sog,region3);
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace OpenSim.Data.Tests
|
||||||
public class DataTestUtil
|
public class DataTestUtil
|
||||||
{
|
{
|
||||||
public const uint UNSIGNED_INTEGER_MIN = uint.MinValue;
|
public const uint UNSIGNED_INTEGER_MIN = uint.MinValue;
|
||||||
public const uint UNSIGNED_INTEGER_MAX = uint.MaxValue / 2; // NHibernate does not support unsigned integer range.
|
public const uint UNSIGNED_INTEGER_MAX = uint.MaxValue;
|
||||||
|
|
||||||
public const int INTEGER_MIN = int.MinValue + 1; // Postgresql requires +1 to .NET int.MinValue
|
public const int INTEGER_MIN = int.MinValue + 1; // Postgresql requires +1 to .NET int.MinValue
|
||||||
public const int INTEGER_MAX = int.MaxValue;
|
public const int INTEGER_MAX = int.MaxValue;
|
||||||
|
|
|
@ -403,7 +403,7 @@ namespace OpenSim.Framework.Communications
|
||||||
/// In case, we are invoked asynchroneously this object will keep track of the state
|
/// In case, we are invoked asynchroneously this object will keep track of the state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state);
|
AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state);
|
||||||
ThreadPool.QueueUserWorkItem(RequestHelper, ar);
|
Util.FireAndForget(RequestHelper, ar);
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -448,6 +448,10 @@ namespace OpenSim.Framework
|
||||||
public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
|
public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
|
||||||
public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client);
|
public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client);
|
||||||
|
|
||||||
|
public delegate void AgentFOV(IClientAPI client, float verticalAngle);
|
||||||
|
|
||||||
|
public delegate double UpdatePriorityHandler(UpdatePriorityData data);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public struct DirPlacesReplyData
|
public struct DirPlacesReplyData
|
||||||
|
@ -517,6 +521,232 @@ namespace OpenSim.Framework
|
||||||
public float dwell;
|
public float dwell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct SendAvatarData
|
||||||
|
{
|
||||||
|
public readonly ulong RegionHandle;
|
||||||
|
public readonly string FirstName;
|
||||||
|
public readonly string LastName;
|
||||||
|
public readonly string GroupTitle;
|
||||||
|
public readonly UUID AvatarID;
|
||||||
|
public readonly uint AvatarLocalID;
|
||||||
|
public readonly Vector3 Position;
|
||||||
|
public readonly byte[] TextureEntry;
|
||||||
|
public readonly uint ParentID;
|
||||||
|
public readonly Quaternion Rotation;
|
||||||
|
|
||||||
|
public SendAvatarData(ulong regionHandle, string firstName, string lastName, string groupTitle, UUID avatarID,
|
||||||
|
uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation)
|
||||||
|
{
|
||||||
|
RegionHandle = regionHandle;
|
||||||
|
FirstName = firstName;
|
||||||
|
LastName = lastName;
|
||||||
|
GroupTitle = groupTitle;
|
||||||
|
AvatarID = avatarID;
|
||||||
|
AvatarLocalID = avatarLocalID;
|
||||||
|
Position = position;
|
||||||
|
TextureEntry = textureEntry;
|
||||||
|
ParentID = parentID;
|
||||||
|
Rotation = rotation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct SendAvatarTerseData
|
||||||
|
{
|
||||||
|
public readonly ulong RegionHandle;
|
||||||
|
public readonly ushort TimeDilation;
|
||||||
|
public readonly uint LocalID;
|
||||||
|
public readonly Vector3 Position;
|
||||||
|
public readonly Vector3 Velocity;
|
||||||
|
public readonly Vector3 Acceleration;
|
||||||
|
public readonly Quaternion Rotation;
|
||||||
|
public readonly Vector4 CollisionPlane;
|
||||||
|
public readonly UUID AgentID;
|
||||||
|
public readonly byte[] TextureEntry;
|
||||||
|
public readonly double Priority;
|
||||||
|
|
||||||
|
public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity,
|
||||||
|
Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, UUID agentid, byte[] textureEntry, double priority)
|
||||||
|
{
|
||||||
|
RegionHandle = regionHandle;
|
||||||
|
TimeDilation = timeDilation;
|
||||||
|
LocalID = localID;
|
||||||
|
Position = position;
|
||||||
|
Velocity = velocity;
|
||||||
|
Acceleration = acceleration;
|
||||||
|
Rotation = rotation;
|
||||||
|
CollisionPlane = collisionPlane;
|
||||||
|
AgentID = agentid;
|
||||||
|
TextureEntry = textureEntry;
|
||||||
|
Priority = priority;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct SendPrimitiveTerseData
|
||||||
|
{
|
||||||
|
public readonly ulong RegionHandle;
|
||||||
|
public readonly ushort TimeDilation;
|
||||||
|
public readonly uint LocalID;
|
||||||
|
public readonly Vector3 Position;
|
||||||
|
public readonly Quaternion Rotation;
|
||||||
|
public readonly Vector3 Velocity;
|
||||||
|
public readonly Vector3 Acceleration;
|
||||||
|
public readonly Vector3 AngularVelocity;
|
||||||
|
public readonly byte State;
|
||||||
|
public readonly UUID AssetID;
|
||||||
|
public readonly UUID OwnerID;
|
||||||
|
public readonly int AttachPoint;
|
||||||
|
public readonly byte[] TextureEntry;
|
||||||
|
public readonly double Priority;
|
||||||
|
|
||||||
|
public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
|
||||||
|
Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity, byte state,
|
||||||
|
UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority)
|
||||||
|
{
|
||||||
|
RegionHandle = regionHandle;
|
||||||
|
TimeDilation = timeDilation;
|
||||||
|
LocalID = localID;
|
||||||
|
Position = position;
|
||||||
|
Rotation = rotation;
|
||||||
|
Velocity = velocity;
|
||||||
|
Acceleration = acceleration;
|
||||||
|
AngularVelocity = rotationalvelocity;
|
||||||
|
State = state;
|
||||||
|
AssetID = assetID;
|
||||||
|
OwnerID = ownerID;
|
||||||
|
AttachPoint = attachPoint;
|
||||||
|
TextureEntry = textureEntry;
|
||||||
|
Priority = priority;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct SendPrimitiveData
|
||||||
|
{
|
||||||
|
private ulong m_regionHandle;
|
||||||
|
private ushort m_timeDilation;
|
||||||
|
private uint m_localID;
|
||||||
|
private PrimitiveBaseShape m_primShape;
|
||||||
|
private Vector3 m_pos;
|
||||||
|
private Vector3 m_vel;
|
||||||
|
private Vector3 m_acc;
|
||||||
|
private Quaternion m_rotation;
|
||||||
|
private Vector3 m_rvel;
|
||||||
|
private PrimFlags m_flags;
|
||||||
|
private UUID m_objectID;
|
||||||
|
private UUID m_ownerID;
|
||||||
|
private string m_text;
|
||||||
|
private byte[] m_color;
|
||||||
|
private uint m_parentID;
|
||||||
|
private byte[] m_particleSystem;
|
||||||
|
private byte m_clickAction;
|
||||||
|
private byte m_material;
|
||||||
|
private byte[] m_textureanim;
|
||||||
|
private bool m_attachment;
|
||||||
|
private uint m_AttachPoint;
|
||||||
|
private UUID m_AssetId;
|
||||||
|
private UUID m_SoundId;
|
||||||
|
private double m_SoundVolume;
|
||||||
|
private byte m_SoundFlags;
|
||||||
|
private double m_SoundRadius;
|
||||||
|
private double m_priority;
|
||||||
|
|
||||||
|
public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
||||||
|
Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
|
||||||
|
uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
|
||||||
|
uint parentID, byte[] particleSystem, byte clickAction, byte material, double priority) :
|
||||||
|
this(regionHandle, timeDilation, localID, primShape, pos, vel, acc, rotation, rvel, flags, objectID,
|
||||||
|
ownerID, text, color, parentID, particleSystem, clickAction, material, new byte[0], false, 0, UUID.Zero,
|
||||||
|
UUID.Zero, 0, 0, 0, priority) { }
|
||||||
|
|
||||||
|
public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
||||||
|
Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
|
||||||
|
uint flags,
|
||||||
|
UUID objectID, UUID ownerID, string text, byte[] color, uint parentID,
|
||||||
|
byte[] particleSystem,
|
||||||
|
byte clickAction, byte material, byte[] textureanim, bool attachment,
|
||||||
|
uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags,
|
||||||
|
double SoundRadius, double priority)
|
||||||
|
{
|
||||||
|
this.m_regionHandle = regionHandle;
|
||||||
|
this.m_timeDilation = timeDilation;
|
||||||
|
this.m_localID = localID;
|
||||||
|
this.m_primShape = primShape;
|
||||||
|
this.m_pos = pos;
|
||||||
|
this.m_vel = vel;
|
||||||
|
this.m_acc = acc;
|
||||||
|
this.m_rotation = rotation;
|
||||||
|
this.m_rvel = rvel;
|
||||||
|
this.m_flags = (PrimFlags)flags;
|
||||||
|
this.m_objectID = objectID;
|
||||||
|
this.m_ownerID = ownerID;
|
||||||
|
this.m_text = text;
|
||||||
|
this.m_color = color;
|
||||||
|
this.m_parentID = parentID;
|
||||||
|
this.m_particleSystem = particleSystem;
|
||||||
|
this.m_clickAction = clickAction;
|
||||||
|
this.m_material = material;
|
||||||
|
this.m_textureanim = textureanim;
|
||||||
|
this.m_attachment = attachment;
|
||||||
|
this.m_AttachPoint = AttachPoint;
|
||||||
|
this.m_AssetId = AssetId;
|
||||||
|
this.m_SoundId = SoundId;
|
||||||
|
this.m_SoundVolume = SoundVolume;
|
||||||
|
this.m_SoundFlags = SoundFlags;
|
||||||
|
this.m_SoundRadius = SoundRadius;
|
||||||
|
this.m_priority = priority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ulong regionHandle { get { return this.m_regionHandle; } }
|
||||||
|
public ushort timeDilation { get { return this.m_timeDilation; } }
|
||||||
|
public uint localID { get { return this.m_localID; } }
|
||||||
|
public PrimitiveBaseShape primShape { get { return this.m_primShape; } }
|
||||||
|
public Vector3 pos { get { return this.m_pos; } }
|
||||||
|
public Vector3 vel { get { return this.m_vel; } }
|
||||||
|
public Vector3 acc { get { return this.m_acc; } }
|
||||||
|
public Quaternion rotation { get { return this.m_rotation; } }
|
||||||
|
public Vector3 rvel { get { return this.m_rvel; } }
|
||||||
|
public PrimFlags flags { get { return this.m_flags; } }
|
||||||
|
public UUID objectID { get { return this.m_objectID; } }
|
||||||
|
public UUID ownerID { get { return this.m_ownerID; } }
|
||||||
|
public string text { get { return this.m_text; } }
|
||||||
|
public byte[] color { get { return this.m_color; } }
|
||||||
|
public uint parentID { get { return this.m_parentID; } }
|
||||||
|
public byte[] particleSystem { get { return this.m_particleSystem; } }
|
||||||
|
public byte clickAction { get { return this.m_clickAction; } }
|
||||||
|
public byte material { get { return this.m_material; } }
|
||||||
|
public byte[] textureanim { get { return this.m_textureanim; } }
|
||||||
|
public bool attachment { get { return this.m_attachment; } }
|
||||||
|
public uint AttachPoint { get { return this.m_AttachPoint; } }
|
||||||
|
public UUID AssetId { get { return this.m_AssetId; } }
|
||||||
|
public UUID SoundId { get { return this.m_SoundId; } }
|
||||||
|
public double SoundVolume { get { return this.m_SoundVolume; } }
|
||||||
|
public byte SoundFlags { get { return this.m_SoundFlags; } }
|
||||||
|
public double SoundRadius { get { return this.m_SoundRadius; } }
|
||||||
|
public double priority { get { return this.m_priority; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct UpdatePriorityData {
|
||||||
|
private double m_priority;
|
||||||
|
private uint m_localID;
|
||||||
|
|
||||||
|
public UpdatePriorityData(double priority, uint localID) {
|
||||||
|
this.m_priority = priority;
|
||||||
|
this.m_localID = localID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double priority { get { return this.m_priority; } }
|
||||||
|
public uint localID { get { return this.m_localID; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum StateUpdateTypes
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
AvatarTerse = 1,
|
||||||
|
PrimitiveTerse = AvatarTerse << 1,
|
||||||
|
PrimitiveFull = PrimitiveTerse << 1,
|
||||||
|
All = AvatarTerse | PrimitiveTerse | PrimitiveFull,
|
||||||
|
}
|
||||||
|
|
||||||
public interface IClientAPI
|
public interface IClientAPI
|
||||||
{
|
{
|
||||||
Vector3 StartPos { get; set; }
|
Vector3 StartPos { get; set; }
|
||||||
|
@ -878,37 +1108,20 @@ namespace OpenSim.Framework
|
||||||
void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
|
void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
|
||||||
void SendPayPrice(UUID objectID, int[] payPrice);
|
void SendPayPrice(UUID objectID, int[] payPrice);
|
||||||
|
|
||||||
void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
|
void SendAvatarData(SendAvatarData data);
|
||||||
uint avatarLocalID,
|
|
||||||
Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation);
|
|
||||||
|
|
||||||
void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
|
void SendAvatarTerseUpdate(SendAvatarTerseData data);
|
||||||
Vector3 velocity, Quaternion rotation, UUID agentid);
|
|
||||||
|
|
||||||
void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
|
void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
|
||||||
|
|
||||||
void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
|
void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
|
||||||
void SetChildAgentThrottle(byte[] throttle);
|
void SetChildAgentThrottle(byte[] throttle);
|
||||||
|
|
||||||
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
void SendPrimitiveToClient(SendPrimitiveData data);
|
||||||
Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
|
|
||||||
uint flags,
|
|
||||||
UUID objectID, UUID ownerID, string text, byte[] color, uint parentID,
|
|
||||||
byte[] particleSystem,
|
|
||||||
byte clickAction, byte material, byte[] textureanim, bool attachment,
|
|
||||||
uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags,
|
|
||||||
double SoundRadius);
|
|
||||||
|
|
||||||
|
void SendPrimTerseUpdate(SendPrimitiveTerseData data);
|
||||||
|
|
||||||
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler);
|
||||||
Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
|
|
||||||
uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
|
|
||||||
uint parentID, byte[] particleSystem, byte clickAction, byte material);
|
|
||||||
|
|
||||||
|
|
||||||
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
|
|
||||||
Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state,
|
|
||||||
UUID AssetId, UUID owner, int attachPoint);
|
|
||||||
|
|
||||||
void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
|
void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
|
||||||
List<InventoryFolderBase> folders, bool fetchFolders,
|
List<InventoryFolderBase> folders, bool fetchFolders,
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return X.GetHashCode() * 29 + Y.GetHashCode();
|
return X.GetHashCode() ^ Y.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|
|
@ -26,17 +26,36 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class MainServer
|
public class MainServer
|
||||||
{
|
{
|
||||||
private static BaseHttpServer instance;
|
private static BaseHttpServer instance;
|
||||||
|
private static Dictionary<uint, BaseHttpServer> m_Servers =
|
||||||
|
new Dictionary<uint, BaseHttpServer>();
|
||||||
|
|
||||||
public static BaseHttpServer Instance
|
public static BaseHttpServer Instance
|
||||||
{
|
{
|
||||||
get { return instance; }
|
get { return instance; }
|
||||||
set { instance = value; }
|
set { instance = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IHttpServer GetHttpServer(uint port)
|
||||||
|
{
|
||||||
|
if (port == 0)
|
||||||
|
return Instance;
|
||||||
|
if (port == Instance.Port)
|
||||||
|
return Instance;
|
||||||
|
|
||||||
|
if (m_Servers.ContainsKey(port))
|
||||||
|
return m_Servers[port];
|
||||||
|
|
||||||
|
m_Servers[port] = new BaseHttpServer(port);
|
||||||
|
m_Servers[port].Start();
|
||||||
|
|
||||||
|
return m_Servers[port];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,375 @@
|
||||||
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework
|
||||||
|
{
|
||||||
|
public interface IHandle { }
|
||||||
|
|
||||||
|
[Serializable, ComVisible(false)]
|
||||||
|
public class MinHeap<T> : ICollection<T>, ICollection
|
||||||
|
{
|
||||||
|
private class Handle : IHandle
|
||||||
|
{
|
||||||
|
internal int index = -1;
|
||||||
|
internal MinHeap<T> heap = null;
|
||||||
|
|
||||||
|
internal void Clear()
|
||||||
|
{
|
||||||
|
this.index = -1;
|
||||||
|
this.heap = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private struct HeapItem
|
||||||
|
{
|
||||||
|
internal T value;
|
||||||
|
internal Handle handle;
|
||||||
|
|
||||||
|
internal HeapItem(T value, Handle handle)
|
||||||
|
{
|
||||||
|
this.value = value;
|
||||||
|
this.handle = handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Clear()
|
||||||
|
{
|
||||||
|
this.value = default(T);
|
||||||
|
if (this.handle != null)
|
||||||
|
{
|
||||||
|
this.handle.Clear();
|
||||||
|
this.handle = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public const int DEFAULT_CAPACITY = 4;
|
||||||
|
|
||||||
|
private HeapItem[] items;
|
||||||
|
private int size;
|
||||||
|
private object sync_root;
|
||||||
|
private int version;
|
||||||
|
|
||||||
|
private Comparison<T> comparison;
|
||||||
|
|
||||||
|
public MinHeap() : this(DEFAULT_CAPACITY, Comparer<T>.Default) { }
|
||||||
|
public MinHeap(int capacity) : this(capacity, Comparer<T>.Default) { }
|
||||||
|
public MinHeap(IComparer<T> comparer) : this(DEFAULT_CAPACITY, comparer) { }
|
||||||
|
public MinHeap(int capacity, IComparer<T> comparer) :
|
||||||
|
this(capacity, new Comparison<T>(comparer.Compare)) { }
|
||||||
|
public MinHeap(Comparison<T> comparison) : this(DEFAULT_CAPACITY, comparison) { }
|
||||||
|
public MinHeap(int capacity, Comparison<T> comparison)
|
||||||
|
{
|
||||||
|
this.items = new HeapItem[capacity];
|
||||||
|
this.comparison = comparison;
|
||||||
|
this.size = this.version = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Count { get { return this.size; } }
|
||||||
|
|
||||||
|
public bool IsReadOnly { get { return false; } }
|
||||||
|
|
||||||
|
public bool IsSynchronized { get { return false; } }
|
||||||
|
|
||||||
|
public T this[IHandle key]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Handle handle = ValidateThisHandle(key);
|
||||||
|
return this.items[handle.index].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Handle handle = ValidateThisHandle(key);
|
||||||
|
this.items[handle.index].value = value;
|
||||||
|
if (!BubbleUp(handle.index))
|
||||||
|
BubbleDown(handle.index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public object SyncRoot
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (this.sync_root == null)
|
||||||
|
Interlocked.CompareExchange<object>(ref this.sync_root, new object(), null);
|
||||||
|
return this.sync_root;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Handle ValidateHandle(IHandle ihandle)
|
||||||
|
{
|
||||||
|
if (ihandle == null)
|
||||||
|
throw new ArgumentNullException("handle");
|
||||||
|
Handle handle = ihandle as Handle;
|
||||||
|
if (handle == null)
|
||||||
|
throw new InvalidOperationException("handle is not valid");
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Handle ValidateThisHandle(IHandle ihandle)
|
||||||
|
{
|
||||||
|
Handle handle = ValidateHandle(ihandle);
|
||||||
|
if (!object.ReferenceEquals(handle.heap, this))
|
||||||
|
throw new InvalidOperationException("handle is not valid for this heap");
|
||||||
|
if (handle.index < 0)
|
||||||
|
throw new InvalidOperationException("handle is not associated to a value");
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Set(HeapItem item, int index)
|
||||||
|
{
|
||||||
|
this.items[index] = item;
|
||||||
|
if (item.handle != null)
|
||||||
|
item.handle.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool BubbleUp(int index)
|
||||||
|
{
|
||||||
|
HeapItem item = this.items[index];
|
||||||
|
int current, parent;
|
||||||
|
|
||||||
|
for (current = index, parent = (current - 1) / 2;
|
||||||
|
(current > 0) && (this.comparison(this.items[parent].value, item.value)) > 0;
|
||||||
|
current = parent, parent = (current - 1) / 2)
|
||||||
|
{
|
||||||
|
Set(this.items[parent], current);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current != index)
|
||||||
|
{
|
||||||
|
Set(item, current);
|
||||||
|
++this.version;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BubbleDown(int index)
|
||||||
|
{
|
||||||
|
HeapItem item = this.items[index];
|
||||||
|
int current, child;
|
||||||
|
|
||||||
|
for (current = index, child = (2 * current) + 1;
|
||||||
|
current < this.size / 2;
|
||||||
|
current = child, child = (2 * current) + 1)
|
||||||
|
{
|
||||||
|
if ((child < this.size - 1) && this.comparison(this.items[child].value, this.items[child + 1].value) > 0)
|
||||||
|
++child;
|
||||||
|
if (this.comparison(this.items[child].value, item.value) >= 0)
|
||||||
|
break;
|
||||||
|
Set(this.items[child], current);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current != index)
|
||||||
|
{
|
||||||
|
Set(item, current);
|
||||||
|
++this.version;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TryGetValue(IHandle key, out T value)
|
||||||
|
{
|
||||||
|
Handle handle = ValidateHandle(key);
|
||||||
|
if (handle.index > -1)
|
||||||
|
{
|
||||||
|
value = this.items[handle.index].value;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
value = default(T);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ContainsHandle(IHandle ihandle)
|
||||||
|
{
|
||||||
|
Handle handle = ValidateHandle(ihandle);
|
||||||
|
return object.ReferenceEquals(handle.heap, this) && handle.index > -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Add(T value, ref IHandle handle)
|
||||||
|
{
|
||||||
|
if (handle == null)
|
||||||
|
handle = new Handle();
|
||||||
|
Add(value, handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Add(T value, IHandle ihandle)
|
||||||
|
{
|
||||||
|
if (this.size == this.items.Length)
|
||||||
|
{
|
||||||
|
int capacity = (int)((this.items.Length * 200L) / 100L);
|
||||||
|
if (capacity < (this.items.Length + DEFAULT_CAPACITY))
|
||||||
|
capacity = this.items.Length + DEFAULT_CAPACITY;
|
||||||
|
Array.Resize<HeapItem>(ref this.items, capacity);
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle handle = null;
|
||||||
|
if (ihandle != null)
|
||||||
|
{
|
||||||
|
handle = ValidateHandle(ihandle);
|
||||||
|
handle.heap = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
HeapItem item = new MinHeap<T>.HeapItem(value, handle);
|
||||||
|
|
||||||
|
Set(item, this.size);
|
||||||
|
BubbleUp(this.size++);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Add(T value)
|
||||||
|
{
|
||||||
|
Add(value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public T Min()
|
||||||
|
{
|
||||||
|
if (this.size == 0)
|
||||||
|
throw new InvalidOperationException("Heap is empty");
|
||||||
|
|
||||||
|
return this.items[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
for (int index = 0; index < this.size; ++index)
|
||||||
|
this.items[index].Clear();
|
||||||
|
this.size = 0;
|
||||||
|
++this.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TrimExcess()
|
||||||
|
{
|
||||||
|
int length = (int)(this.items.Length * 0.9);
|
||||||
|
if (this.size < length)
|
||||||
|
Array.Resize<HeapItem>(ref this.items, Math.Min(this.size, DEFAULT_CAPACITY));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveAt(int index)
|
||||||
|
{
|
||||||
|
if (this.size == 0)
|
||||||
|
throw new InvalidOperationException("Heap is empty");
|
||||||
|
if (index >= this.size)
|
||||||
|
throw new ArgumentOutOfRangeException("index");
|
||||||
|
|
||||||
|
this.items[index].Clear();
|
||||||
|
if (--this.size > 0 && index != this.size)
|
||||||
|
{
|
||||||
|
Set(this.items[this.size], index);
|
||||||
|
if (!BubbleUp(index))
|
||||||
|
BubbleDown(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public T RemoveMin()
|
||||||
|
{
|
||||||
|
if (this.size == 0)
|
||||||
|
throw new InvalidOperationException("Heap is empty");
|
||||||
|
|
||||||
|
HeapItem item = this.items[0];
|
||||||
|
RemoveAt(0);
|
||||||
|
return item.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T Remove(IHandle ihandle)
|
||||||
|
{
|
||||||
|
Handle handle = ValidateThisHandle(ihandle);
|
||||||
|
HeapItem item = this.items[handle.index];
|
||||||
|
RemoveAt(handle.index);
|
||||||
|
return item.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetIndex(T value)
|
||||||
|
{
|
||||||
|
EqualityComparer<T> comparer = EqualityComparer<T>.Default;
|
||||||
|
int index;
|
||||||
|
|
||||||
|
for (index = 0; index < this.size; ++index)
|
||||||
|
{
|
||||||
|
if (comparer.Equals(this.items[index].value, value))
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Contains(T value)
|
||||||
|
{
|
||||||
|
return GetIndex(value) != -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Remove(T value)
|
||||||
|
{
|
||||||
|
int index = GetIndex(value);
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
RemoveAt(index);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyTo(T[] array, int index)
|
||||||
|
{
|
||||||
|
if (array == null)
|
||||||
|
throw new ArgumentNullException("array");
|
||||||
|
if (array.Rank != 1)
|
||||||
|
throw new ArgumentException("Multidimensional array not supported");
|
||||||
|
if (array.GetLowerBound(0) != 0)
|
||||||
|
throw new ArgumentException("Non-zero lower bound array not supported");
|
||||||
|
|
||||||
|
int length = array.Length;
|
||||||
|
if ((index < 0) || (index > length))
|
||||||
|
throw new ArgumentOutOfRangeException("index");
|
||||||
|
if ((length - index) < this.size)
|
||||||
|
throw new ArgumentException("Not enough space available in array starting at index");
|
||||||
|
|
||||||
|
for (int i = 0; i < this.size; ++i)
|
||||||
|
array[index + i] = this.items[i].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyTo(Array array, int index)
|
||||||
|
{
|
||||||
|
if (array == null)
|
||||||
|
throw new ArgumentNullException("array");
|
||||||
|
if (array.Rank != 1)
|
||||||
|
throw new ArgumentException("Multidimensional array not supported");
|
||||||
|
if (array.GetLowerBound(0) != 0)
|
||||||
|
throw new ArgumentException("Non-zero lower bound array not supported");
|
||||||
|
|
||||||
|
int length = array.Length;
|
||||||
|
if ((index < 0) || (index > length))
|
||||||
|
throw new ArgumentOutOfRangeException("index");
|
||||||
|
if ((length - index) < this.size)
|
||||||
|
throw new ArgumentException("Not enough space available in array starting at index");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this.size; ++i)
|
||||||
|
array.SetValue(this.items[i].value, index + i);
|
||||||
|
}
|
||||||
|
catch (ArrayTypeMismatchException)
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Invalid array type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerator<T> GetEnumerator()
|
||||||
|
{
|
||||||
|
int version = this.version;
|
||||||
|
|
||||||
|
for (int index = 0; index < this.size; ++index)
|
||||||
|
{
|
||||||
|
if (version != this.version)
|
||||||
|
throw new InvalidOperationException("Heap was modified while enumerating");
|
||||||
|
yield return this.items[index].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
|
{
|
||||||
|
return GetEnumerator();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -36,7 +36,7 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class Parallel
|
public static class Parallel
|
||||||
{
|
{
|
||||||
private static readonly int processorCount = System.Environment.ProcessorCount;
|
public static readonly int ProcessorCount = System.Environment.ProcessorCount;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes a for loop in which iterations may run in parallel
|
/// Executes a for loop in which iterations may run in parallel
|
||||||
|
@ -46,7 +46,7 @@ namespace OpenSim.Framework
|
||||||
/// <param name="body">Method body to run for each iteration of the loop</param>
|
/// <param name="body">Method body to run for each iteration of the loop</param>
|
||||||
public static void For(int fromInclusive, int toExclusive, Action<int> body)
|
public static void For(int fromInclusive, int toExclusive, Action<int> body)
|
||||||
{
|
{
|
||||||
For(processorCount, fromInclusive, toExclusive, body);
|
For(ProcessorCount, fromInclusive, toExclusive, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -66,7 +66,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
for (int i = 0; i < threadCount; i++)
|
for (int i = 0; i < threadCount; i++)
|
||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(
|
Util.FireAndForget(
|
||||||
delegate(object o)
|
delegate(object o)
|
||||||
{
|
{
|
||||||
int threadIndex = (int)o;
|
int threadIndex = (int)o;
|
||||||
|
@ -103,7 +103,7 @@ namespace OpenSim.Framework
|
||||||
/// <param name="body">Method body to run for each object in the collection</param>
|
/// <param name="body">Method body to run for each object in the collection</param>
|
||||||
public static void ForEach<T>(IEnumerable<T> enumerable, Action<T> body)
|
public static void ForEach<T>(IEnumerable<T> enumerable, Action<T> body)
|
||||||
{
|
{
|
||||||
ForEach<T>(processorCount, enumerable, body);
|
ForEach<T>(ProcessorCount, enumerable, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -122,7 +122,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
for (int i = 0; i < threadCount; i++)
|
for (int i = 0; i < threadCount; i++)
|
||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(
|
Util.FireAndForget(
|
||||||
delegate(object o)
|
delegate(object o)
|
||||||
{
|
{
|
||||||
int threadIndex = (int)o;
|
int threadIndex = (int)o;
|
||||||
|
@ -161,7 +161,7 @@ namespace OpenSim.Framework
|
||||||
/// <param name="actions">A series of method bodies to execute</param>
|
/// <param name="actions">A series of method bodies to execute</param>
|
||||||
public static void Invoke(params Action[] actions)
|
public static void Invoke(params Action[] actions)
|
||||||
{
|
{
|
||||||
Invoke(processorCount, actions);
|
Invoke(ProcessorCount, actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -178,7 +178,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
for (int i = 0; i < threadCount; i++)
|
for (int i = 0; i < threadCount; i++)
|
||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(
|
Util.FireAndForget(
|
||||||
delegate(object o)
|
delegate(object o)
|
||||||
{
|
{
|
||||||
int threadIndex = (int)o;
|
int threadIndex = (int)o;
|
||||||
|
|
|
@ -821,7 +821,7 @@ namespace OpenSim.Framework
|
||||||
"Scope ID for this region", ScopeID.ToString(), true);
|
"Scope ID for this region", ScopeID.ToString(), true);
|
||||||
|
|
||||||
configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
"Region Type", String.Empty, true);
|
"Free form string describing the type of region", String.Empty, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
|
@ -978,11 +978,12 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void SaveLastMapUUID(UUID mapUUID)
|
public void SaveLastMapUUID(UUID mapUUID)
|
||||||
{
|
{
|
||||||
if (null == configMember) return;
|
|
||||||
|
|
||||||
lastMapUUID = mapUUID;
|
lastMapUUID = mapUUID;
|
||||||
lastMapRefresh = Util.UnixTimeSinceEpoch().ToString();
|
lastMapRefresh = Util.UnixTimeSinceEpoch().ToString();
|
||||||
|
|
||||||
|
if (configMember == null)
|
||||||
|
return;
|
||||||
|
|
||||||
configMember.forceSetConfigurationOption("lastmap_uuid", mapUUID.ToString());
|
configMember.forceSetConfigurationOption("lastmap_uuid", mapUUID.ToString());
|
||||||
configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh);
|
configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh);
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue