aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-19 16:52:27 -0700
committerJohn Hurliman2009-10-19 16:52:27 -0700
commitfdce1be3db287bed901332b90ba57165e201d3fc (patch)
tree8f0792e4c4ac4c14a50559f8439573740a7b3326 /OpenSim
parentMerge branch 'prioritization' of ssh://opensimulator.org/var/git/opensim into... (diff)
downloadopensim-SC-fdce1be3db287bed901332b90ba57165e201d3fc.zip
opensim-SC-fdce1be3db287bed901332b90ba57165e201d3fc.tar.gz
opensim-SC-fdce1be3db287bed901332b90ba57165e201d3fc.tar.bz2
opensim-SC-fdce1be3db287bed901332b90ba57165e201d3fc.tar.xz
* Removed OpenSim.Data.NHibernate
* Replaced calls to ThreadPool.QueueUserWorkItem() with ThreadPool.UnsafeQueueUserWorkItem() since OpenSim does not use Code Access Security sandboxing
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/NHibernate/ColorUserType.cs104
-rw-r--r--OpenSim/Data/NHibernate/EstateRegionLink.cs76
-rw-r--r--OpenSim/Data/NHibernate/LLQuaternionUserType.cs119
-rw-r--r--OpenSim/Data/NHibernate/LLUUIDUserType.cs105
-rw-r--r--OpenSim/Data/NHibernate/LLVector3UserType.cs110
-rw-r--r--OpenSim/Data/NHibernate/Migration/README.txt3
-rw-r--r--OpenSim/Data/NHibernate/Migration/SqliteAssets.sql5
-rwxr-xr-xOpenSim/Data/NHibernate/Migration/SqliteInventory.pl43
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs135
-rw-r--r--OpenSim/Data/NHibernate/NHibernateEstateData.cs168
-rw-r--r--OpenSim/Data/NHibernate/NHibernateGridData.cs236
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs382
-rw-r--r--OpenSim/Data/NHibernate/NHibernateManager.cs345
-rw-r--r--OpenSim/Data/NHibernate/NHibernateRegionData.cs426
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs461
-rw-r--r--OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml14
-rw-r--r--OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml12
-rw-r--r--OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml68
-rw-r--r--OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml13
-rw-r--r--OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml26
-rw-r--r--OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt14
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql10
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql72
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql35
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql36
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql104
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql77
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql51
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql27
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql10
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql71
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql35
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql39
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql169
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql104
-rw-r--r--OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml23
-rw-r--r--OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql10
-rw-r--r--OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql72
-rw-r--r--OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql35
-rw-r--r--OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql39
-rw-r--r--OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql169
-rw-r--r--OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql104
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml44
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml56
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml147
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql10
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql71
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql35
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql39
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql168
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql104
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml32
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml38
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml11
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml38
-rw-r--r--OpenSim/Data/NHibernate/SByteType.cs111
-rw-r--r--OpenSim/Data/NHibernate/Terrain.cs118
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs81
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs81
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs79
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs81
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs79
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs79
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs81
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs79
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs79
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs79
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs82
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs82
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs80
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs82
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs82
-rw-r--r--OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs82
-rw-r--r--OpenSim/Data/NHibernate/TextureUserType.cs115
-rw-r--r--OpenSim/Data/NHibernate/UInt16Type.cs103
-rw-r--r--OpenSim/Data/NHibernate/UInt32Type.cs103
-rw-r--r--OpenSim/Data/NHibernate/UInt64Type.cs103
-rw-r--r--OpenSim/Data/NHibernate/UserFriend.cs72
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs1
-rw-r--r--OpenSim/Data/Tests/DataTestUtil.cs2
-rw-r--r--OpenSim/Framework/Communications/RestClient.cs2
-rw-r--r--OpenSim/Framework/Parallel.cs6
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs2
-rw-r--r--OpenSim/Grid/MessagingServer.Modules/MessageService.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs6
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs2
95 files changed, 13 insertions, 7617 deletions
diff --git a/OpenSim/Data/NHibernate/ColorUserType.cs b/OpenSim/Data/NHibernate/ColorUserType.cs
deleted file mode 100644
index 7ac2360..0000000
--- a/OpenSim/Data/NHibernate/ColorUserType.cs
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using System.Drawing;
31using NHibernate;
32using NHibernate.SqlTypes;
33using NHibernate.UserTypes;
34
35namespace OpenSim.Data.NHibernate
36{
37 [Serializable]
38 public class ColorUserType : IUserType
39 {
40 public object Assemble(object cached, object owner)
41 {
42 return cached;
43 }
44
45 bool IUserType.Equals(object color1, object color2)
46 {
47 return color1.Equals(color2);
48 }
49
50 public object DeepCopy(object color)
51 {
52 return color;
53 }
54
55 public object Disassemble(object color)
56 {
57 return color;
58 }
59
60 public int GetHashCode(object color)
61 {
62 return (color == null) ? 0 : color.GetHashCode();
63 }
64
65 public bool IsMutable
66 {
67 get { return false; }
68 }
69
70 public object NullSafeGet(IDataReader rs, string[] names, object owner)
71 {
72 Color color=Color.Empty;
73
74 int ord = rs.GetOrdinal(names[0]);
75 if (!rs.IsDBNull(ord))
76 {
77 color = Color.FromArgb(rs.GetInt32(ord));
78 }
79
80 return color;
81 }
82
83 public void NullSafeSet(IDbCommand cmd, object obj, int index)
84 {
85 Color color = (Color)obj;
86 ((IDataParameter)cmd.Parameters[index]).Value = color.ToArgb();
87 }
88
89 public object Replace(object original, object target, object owner)
90 {
91 return original;
92 }
93
94 public Type ReturnedType
95 {
96 get { return typeof(Color); }
97 }
98
99 public SqlType[] SqlTypes
100 {
101 get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
102 }
103 }
104}
diff --git a/OpenSim/Data/NHibernate/EstateRegionLink.cs b/OpenSim/Data/NHibernate/EstateRegionLink.cs
deleted file mode 100644
index 4b83fa5..0000000
--- a/OpenSim/Data/NHibernate/EstateRegionLink.cs
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenMetaverse;
32
33namespace OpenSim.Data.NHibernate
34{
35 public class EstateRegionLink
36 {
37 private UUID estateRegionLinkID;
38 public UUID EstateRegionLinkID
39 {
40 get
41 {
42 return estateRegionLinkID;
43 }
44 set
45 {
46 estateRegionLinkID = value;
47 }
48 }
49
50 private uint estateID;
51 public uint EstateID
52 {
53 get
54 {
55 return estateID;
56 }
57 set
58 {
59 estateID = value;
60 }
61 }
62
63 private UUID regionID;
64 public UUID RegionID
65 {
66 get
67 {
68 return regionID;
69 }
70 set
71 {
72 regionID = value;
73 }
74 }
75 }
76}
diff --git a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs b/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
deleted file mode 100644
index cf87827..0000000
--- a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
+++ /dev/null
@@ -1,119 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33using OpenMetaverse;
34
35namespace OpenSim.Data.NHibernate
36{
37 [Serializable]
38 public class QuaternionUserType: IUserType
39 {
40 public object Assemble(object cached, object owner)
41 {
42 return cached;
43 }
44
45 bool IUserType.Equals(object quat1, object quat2)
46 {
47 return quat1.Equals(quat2);
48 }
49
50 public object DeepCopy(object quat)
51 {
52 Quaternion q = (Quaternion)quat;
53 return new Quaternion(q);
54 }
55
56 public object Disassemble(object quat)
57 {
58 return quat;
59 }
60
61 public int GetHashCode(object quat)
62 {
63 return (quat == null) ? 0 : quat.GetHashCode();
64 }
65
66 public bool IsMutable
67 {
68 get { return false; }
69 }
70
71 public object NullSafeGet(IDataReader rs, string[] names, object owner)
72 {
73 object quat = null;
74
75 int x = rs.GetOrdinal(names[0]);
76 int y = rs.GetOrdinal(names[1]);
77 int z = rs.GetOrdinal(names[2]);
78 int w = rs.GetOrdinal(names[3]);
79 if (!rs.IsDBNull(x))
80 {
81 float X = (Single)Convert.ToDouble(rs[x].ToString());
82 float Y = (Single)Convert.ToDouble(rs[y].ToString());
83 float Z = (Single)Convert.ToDouble(rs[z].ToString());
84 float W = (Single)Convert.ToDouble(rs[w].ToString());
85 quat = new Quaternion(X, Y, Z, W);
86 }
87 return quat;
88 }
89
90 public void NullSafeSet(IDbCommand cmd, object obj, int index)
91 {
92 Quaternion quat = (Quaternion)obj;
93 ((IDataParameter)cmd.Parameters[index]).Value = quat.X;
94 ((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y;
95 ((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z;
96 ((IDataParameter)cmd.Parameters[index + 3]).Value = quat.W;
97 }
98
99 public object Replace(object original, object target, object owner)
100 {
101 return original;
102 }
103
104 public Type ReturnedType
105 {
106 get { return typeof(Quaternion); }
107 }
108
109 public SqlType[] SqlTypes
110 {
111 get { return new SqlType [] {
112 NHibernateUtil.Single.SqlType,
113 NHibernateUtil.Single.SqlType,
114 NHibernateUtil.Single.SqlType,
115 NHibernateUtil.Single.SqlType
116 }; }
117 }
118 }
119}
diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs
deleted file mode 100644
index 8e652ff..0000000
--- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33using OpenMetaverse;
34
35namespace OpenSim.Data.NHibernate
36{
37 [Serializable]
38 public class UUIDUserType: IUserType
39 {
40 public object Assemble(object cached, object owner)
41 {
42 return cached;
43 }
44
45 bool IUserType.Equals(object uuid1, object uuid2)
46 {
47 return uuid1.Equals(uuid2);
48 }
49
50 public object DeepCopy(object uuid)
51 {
52 return uuid;
53 }
54
55 public object Disassemble(object uuid)
56 {
57 return uuid;
58 }
59
60 public int GetHashCode(object uuid)
61 {
62 return (uuid == null) ? 0 : uuid.GetHashCode();
63 }
64
65 public bool IsMutable
66 {
67 get { return false; }
68 }
69
70 public object NullSafeGet(IDataReader rs, string[] names, object owner)
71 {
72 object uuid = null;
73
74 int ord = rs.GetOrdinal(names[0]);
75 if (!rs.IsDBNull(ord))
76 {
77 string first = (string)rs.GetString(ord);
78 uuid = new UUID(first);
79 }
80
81 return uuid;
82 }
83
84 public void NullSafeSet(IDbCommand cmd, object obj, int index)
85 {
86 UUID uuid = (UUID)obj;
87 ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString();
88 }
89
90 public object Replace(object original, object target, object owner)
91 {
92 return original;
93 }
94
95 public Type ReturnedType
96 {
97 get { return typeof(UUID); }
98 }
99
100 public SqlType[] SqlTypes
101 {
102 get { return new SqlType [] { NHibernateUtil.String.SqlType }; }
103 }
104 }
105}
diff --git a/OpenSim/Data/NHibernate/LLVector3UserType.cs b/OpenSim/Data/NHibernate/LLVector3UserType.cs
deleted file mode 100644
index 9fa4603..0000000
--- a/OpenSim/Data/NHibernate/LLVector3UserType.cs
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33using OpenMetaverse;
34
35namespace OpenSim.Data.NHibernate
36{
37 [Serializable]
38 public class Vector3UserType: IUserType
39 {
40 public object Assemble(object cached, object owner)
41 {
42 return cached;
43 }
44
45 bool IUserType.Equals(object vector1, object vector2)
46 {
47 return vector1.Equals(vector2);
48 }
49
50 public object DeepCopy(object vector)
51 {
52 return new Vector3((Vector3) vector);
53 }
54
55 public object Disassemble(object vector)
56 {
57 return vector;
58 }
59
60 public int GetHashCode(object vector)
61 {
62 return (vector == null) ? 0 : vector.GetHashCode();
63 }
64
65 public bool IsMutable
66 {
67 get { return false; }
68 }
69
70 public object NullSafeGet(IDataReader rs, string[] names, object owner)
71 {
72 object vector = null;
73
74 int x = rs.GetOrdinal(names[0]);
75 int y = rs.GetOrdinal(names[1]);
76 int z = rs.GetOrdinal(names[2]);
77 if (!rs.IsDBNull(x) && !rs.IsDBNull(y) && !rs.IsDBNull(z))
78 {
79 float X = (Single)Convert.ToDouble(rs[x].ToString());
80 float Y = (Single)Convert.ToDouble(rs[y].ToString());
81 float Z = (Single)Convert.ToDouble(rs[z].ToString());
82 vector = new Vector3(X, Y, Z);
83 }
84 return vector;
85 }
86
87 public void NullSafeSet(IDbCommand cmd, object obj, int index)
88 {
89 Vector3 vector = (Vector3)obj;
90 ((IDataParameter)cmd.Parameters[index]).Value = vector.X;
91 ((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y;
92 ((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z;
93 }
94
95 public object Replace(object original, object target, object owner)
96 {
97 return original;
98 }
99
100 public Type ReturnedType
101 {
102 get { return typeof(Vector3); }
103 }
104
105 public SqlType[] SqlTypes
106 {
107 get { return new SqlType [] { NHibernateUtil.Single.SqlType, NHibernateUtil.Single.SqlType, NHibernateUtil.Single.SqlType }; }
108 }
109 }
110}
diff --git a/OpenSim/Data/NHibernate/Migration/README.txt b/OpenSim/Data/NHibernate/Migration/README.txt
deleted file mode 100644
index 3776960..0000000
--- a/OpenSim/Data/NHibernate/Migration/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
1This directory contains migration scripts for migrating from other
2database backends in OpenSim to the NHibernate version of that same
3database driver. \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Migration/SqliteAssets.sql b/OpenSim/Data/NHibernate/Migration/SqliteAssets.sql
deleted file mode 100644
index 4a7e0d1..0000000
--- a/OpenSim/Data/NHibernate/Migration/SqliteAssets.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1-- The following converts the UUID from XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2-- to XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. This puts it in Guid native format
3-- for .NET, and the prefered format for LLUUID.
4
5update 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 '%-%'; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl b/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl
deleted file mode 100755
index c59cbce..0000000
--- a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl
+++ /dev/null
@@ -1,43 +0,0 @@
1#!/usr/bin/perl
2
3# -- CREATE TABLE inventoryitems(UUID varchar(255) primary key,
4# -- assetID varchar(255),
5# -- assetType integer,
6# -- invType integer,
7# -- parentFolderID varchar(255),
8# -- avatarID varchar(255),
9# -- creatorsID varchar(255),
10# -- inventoryName varchar(255),
11# -- inventoryDescription varchar(255),
12# -- inventoryNextPermissions integer,
13# -- inventoryCurrentPermissions integer,
14# -- inventoryBasePermissions integer,
15# -- inventoryEveryOnePermissions integer);
16
17# -- CREATE TABLE inventoryfolders(UUID varchar(255) primary key,
18# -- name varchar(255),
19# -- agentID varchar(255),
20# -- parentID varchar(255),
21# -- type integer,
22# -- version integer);
23
24my $items = "INSERT INTO InventoryItems(ID, AssetID, AssetType, InvType, Folder, Owner, Creator, Name, Description, NextPermissions, CurrentPermissions, BasePermissions, EveryOnePermissions) ";
25my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) ";
26
27open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration";
28open(WRITE,"| sqlite3 Inventory.db");
29
30while(my $line = <SQLITE>) {
31 $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;
32 if($line =~ s/(INSERT INTO "inventoryitems")/$items/) {
33 print $line;
34 print WRITE $line;
35 }
36 if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) {
37 print $line;
38 print WRITE $line;
39 }
40}
41
42close(WRITE);
43close(SQLITE);
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
deleted file mode 100644
index aaba15c..0000000
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Reflection;
29using System.Collections.Generic;
30using log4net;
31using OpenMetaverse;
32using OpenSim.Framework;
33
34namespace OpenSim.Data.NHibernate
35{
36 /// <summary>
37 /// A User storage interface for the DB4o database system
38 /// </summary>
39 public class NHibernateAssetData : AssetDataBase
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42
43 private NHibernateManager manager;
44 public NHibernateManager Manager
45 {
46 get
47 {
48 return manager;
49 }
50 }
51
52 override public void Dispose() { }
53
54 public override void Initialise()
55 {
56 m_log.Info("[NHibernateGridData]: " + Name + " cannot be default-initialized!");
57 throw new PluginNotInitialisedException(Name);
58 }
59
60 public override void Initialise(string connect)
61 {
62
63 m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateAssetData");
64 manager = new NHibernateManager(connect, "AssetStore");
65
66 }
67
68 override public AssetBase GetAsset(UUID uuid)
69 {
70 return (AssetBase)manager.Get(typeof(AssetBase), uuid);
71 }
72
73 override public void StoreAsset(AssetBase asset)
74 {
75 AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID);
76 if (temp == null)
77 {
78 m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID);
79 manager.Insert(asset);
80 }
81 else
82 {
83 m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID);
84 manager.Update(asset);
85 }
86 }
87
88 // private void LogAssetLoad(AssetBase asset)
89 // {
90 // string temporary = asset.Temporary ? "Temporary" : "Stored";
91 // string local = asset.Local ? "Local" : "Remote";
92
93 // int assetLength = (asset.Data != null) ? asset.Data.Length : 0;
94
95 // m_log.Info("[SQLITE]: " +
96 // string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
97 // asset.FullID, asset.Name, asset.Description, asset.Type,
98 // asset.InvType, temporary, local, assetLength));
99 // }
100
101 override public bool ExistsAsset(UUID uuid)
102 {
103 m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid);
104 return (GetAsset(uuid) != null);
105 }
106
107 /// <summary>
108 /// Returns a list of AssetMetadata objects. The list is a subset of
109 /// the entire data set offset by <paramref name="start" /> containing
110 /// <paramref name="count" /> elements.
111 /// </summary>
112 /// <param name="start">The number of results to discard from the total data set.</param>
113 /// <param name="count">The number of rows the returned list should contain.</param>
114 /// <returns>A list of AssetMetadata objects.</returns>
115 public override List<AssetMetadata> FetchAssetMetadataSet(int start, int count)
116 {
117 List<AssetMetadata> retList = new List<AssetMetadata>(count);
118 return retList;
119 }
120
121 public void DeleteAsset(UUID uuid)
122 {
123
124 }
125
126 public override string Name {
127 get { return "NHibernate"; }
128 }
129
130 public override string Version {
131 get { return "0.1"; }
132 }
133
134 }
135}
diff --git a/OpenSim/Data/NHibernate/NHibernateEstateData.cs b/OpenSim/Data/NHibernate/NHibernateEstateData.cs
deleted file mode 100644
index 5c5be9f..0000000
--- a/OpenSim/Data/NHibernate/NHibernateEstateData.cs
+++ /dev/null
@@ -1,168 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Reflection;
29using log4net;
30using OpenMetaverse;
31using OpenSim.Framework;
32using OpenSim.Region.Framework.Interfaces;
33using NHibernate;
34using NHibernate.Criterion;
35using System.Collections;
36using System;
37
38namespace OpenSim.Data.NHibernate
39{
40 /// <summary>
41 /// A User storage interface for the DB4o database system
42 /// </summary>
43 public class NHibernateEstateData : IEstateDataStore
44 {
45
46 #region Fields
47
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49
50 private NHibernateManager manager;
51 public NHibernateManager Manager
52 {
53 get
54 {
55 return manager;
56 }
57 }
58
59 public string Name
60 {
61 get { return "NHibernateEstateData"; }
62 }
63
64 public string Version
65 {
66 get { return "0.1"; }
67 }
68
69 #endregion
70
71 #region Startup and shutdown.
72
73 public void Initialise()
74 {
75 m_log.Info("[NHIBERNATE]: " + Name + " cannot be default-initialized!");
76 throw new PluginNotInitialisedException(Name);
77 }
78
79 public void Initialise(string connect)
80 {
81
82 m_log.InfoFormat("[NHIBERNATE] Initializing " + Name + ".");
83 manager = new NHibernateManager(connect, "EstateStore");
84 }
85
86 public void Dispose() { }
87
88 #endregion
89
90 #region IEstateDataStore Members
91
92 public EstateSettings LoadEstateSettings(UUID regionID)
93 {
94 EstateRegionLink link = LoadEstateRegionLink(regionID);
95
96 // Ensure that estate settings exist for the link
97 if (link != null)
98 {
99 if (manager.GetWithStatefullSession(typeof(EstateSettings), link.EstateID) == null)
100 {
101 // Delete broken link
102 manager.Delete(link);
103 link = null;
104 }
105 }
106
107 // If estate link does not exist create estate settings and link it to region.
108 if (link == null)
109 {
110 EstateSettings estateSettings = new EstateSettings();
111 //estateSettings.EstateOwner = UUID.Random();
112 //estateSettings.BlockDwell = false;
113 object identifier = manager.Insert(estateSettings);
114
115 if (identifier == null)
116 {
117 // Saving failed. Error is logged in the manager.
118 return null;
119 }
120
121 uint estateID = (uint)identifier;
122 link = new EstateRegionLink();
123 link.EstateRegionLinkID = UUID.Random();
124 link.RegionID = regionID;
125 link.EstateID = estateID;
126 manager.InsertWithStatefullSession(link);
127 }
128
129 // Load estate settings according to the existing or created link.
130 return (EstateSettings)manager.GetWithStatefullSession(typeof(EstateSettings), link.EstateID);
131 }
132
133 public void StoreEstateSettings(EstateSettings estateSettings)
134 {
135 // Estates are always updated when stored.
136 // Insert is always done via. load method as with the current API
137 // this is explicitly the only way to create region link.
138 manager.UpdateWithStatefullSession(estateSettings);
139 }
140
141 #endregion
142
143 #region Private Utility Methods
144 private EstateRegionLink LoadEstateRegionLink(UUID regionID)
145 {
146 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(EstateRegionLink));
147 criteria.Add(Expression.Eq("RegionID", regionID));
148 IList links = criteria.List();
149
150 // Fail fast if more than one estate links exist
151 if (links.Count > 1)
152 {
153 m_log.Error("[NHIBERNATE]: Region had more than one estate linked: " + regionID);
154 throw new Exception("[NHIBERNATE]: Region had more than one estate linked: " + regionID);
155 }
156
157 if (links.Count == 1)
158 {
159 return (EstateRegionLink)links[0];
160 }
161 else
162 {
163 return null;
164 }
165 }
166 #endregion
167 }
168}
diff --git a/OpenSim/Data/NHibernate/NHibernateGridData.cs b/OpenSim/Data/NHibernate/NHibernateGridData.cs
deleted file mode 100644
index 018af62..0000000
--- a/OpenSim/Data/NHibernate/NHibernateGridData.cs
+++ /dev/null
@@ -1,236 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.Reflection;
33using log4net;
34using NHibernate;
35using NHibernate.Criterion;
36using OpenMetaverse;
37using OpenSim.Framework;
38
39namespace OpenSim.Data.NHibernate
40{
41
42 /// <summary>
43 /// A GridData Interface to the NHibernate database
44 /// </summary>
45 public class NHibernateGridData : GridDataBase
46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48
49 private NHibernateManager manager;
50 public NHibernateManager Manager
51 {
52 get
53 {
54 return manager;
55 }
56 }
57
58 public override void Initialise()
59 {
60 m_log.Info("[NHibernateGridData]: " + Name + " cannot be default-initialized!");
61 throw new PluginNotInitialisedException(Name);
62 }
63
64 public override void Initialise(string connect)
65 {
66 m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateGridData");
67 manager = new NHibernateManager(connect, "GridStore");
68 }
69
70 /***********************************************************************
71 *
72 * Public Interface Functions
73 *
74 **********************************************************************/
75
76 public override void Dispose() { }
77
78 /// <summary>
79 /// The plugin being loaded
80 /// </summary>
81 /// <returns>A string containing the plugin name</returns>
82 public override string Name
83 {
84 get { return "NHibernate Grid Data Interface"; }
85 }
86
87 /// <summary>
88 /// The plugins version
89 /// </summary>
90 /// <returns>A string containing the plugin version</returns>
91 public override string Version
92 {
93 get
94 {
95 Module module = GetType().Module;
96 Version dllVersion = module.Assembly.GetName().Version;
97
98 return string.Format("{0}.{1}.{2}.{3}",
99 dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision);
100 }
101 }
102
103 public override bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey)
104 {
105 bool throwHissyFit = false; // Should be true by 1.0
106
107 if (throwHissyFit)
108 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
109
110 RegionProfileData data = GetProfileByUUID(UUID);
111
112 return (regionHandle == data.regionHandle && simrecvkey == data.regionSecret);
113 }
114
115 public override ReservationData GetReservationAtPoint(uint x, uint y)
116 {
117 throw new NotImplementedException();
118 }
119
120 public override DataResponse StoreProfile(RegionProfileData profile)
121 {
122 if (manager.Get(typeof(RegionProfileData), profile.Uuid) == null)
123 {
124 manager.Insert(profile);
125 return DataResponse.RESPONSE_OK;
126 }
127 else
128 {
129 manager.Update(profile);
130 return DataResponse.RESPONSE_OK;
131 }
132 }
133
134 public override DataResponse DeleteProfile(string uuid)
135 {
136 RegionProfileData regionProfileData = (RegionProfileData)manager.Get(typeof(RegionProfileData), new UUID(uuid));
137 if (regionProfileData != null)
138 {
139 manager.Delete(regionProfileData);
140 return DataResponse.RESPONSE_OK;
141 }
142 return DataResponse.RESPONSE_ERROR;
143 }
144
145 public override RegionProfileData GetProfileByUUID(UUID UUID)
146 {
147 return (RegionProfileData)manager.Get(typeof(RegionProfileData), UUID);
148 }
149
150 public override RegionProfileData GetProfileByHandle(ulong regionHandle)
151 {
152 using (ISession session = manager.GetSession())
153 {
154 ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
155 criteria.Add(Expression.Eq("RegionHandle", regionHandle));
156
157 IList regions = criteria.List();
158
159 if (regions.Count == 1)
160 {
161 return (RegionProfileData)regions[0];
162 }
163 else
164 {
165 return null;
166 }
167 }
168 }
169
170 public override RegionProfileData GetProfileByString(string regionName)
171 {
172
173 using (ISession session = manager.GetSession())
174 {
175 ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
176 criteria.Add(Expression.Eq("RegionName", regionName));
177
178 IList regions = criteria.List();
179
180 if (regions.Count == 1)
181 {
182 return (RegionProfileData)regions[0];
183 }
184 else
185 {
186 return null;
187 }
188 }
189
190 }
191
192 public override RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax)
193 {
194 using (ISession session = manager.GetSession())
195 {
196 ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
197 criteria.Add(Expression.Ge("RegionLocX", Xmin));
198 criteria.Add(Expression.Ge("RegionLocY", Ymin));
199 criteria.Add(Expression.Le("RegionLocX", Xmax));
200 criteria.Add(Expression.Le("RegionLocY", Ymax));
201
202 IList regions = criteria.List();
203 RegionProfileData[] regionArray = new RegionProfileData[regions.Count];
204
205 for (int i=0;i<regionArray.Length;i++)
206 {
207 regionArray[i] = (RegionProfileData)regions[i];
208 }
209
210 return regionArray;
211 }
212 }
213
214 public override List<RegionProfileData> GetRegionsByName(string namePrefix, uint maxNum)
215 {
216 using (ISession session = manager.GetSession())
217 {
218 ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData));
219 criteria.SetMaxResults((int)maxNum);
220
221 criteria.Add(Expression.Like("RegionName", namePrefix, MatchMode.Start));
222
223 IList regions = criteria.List();
224 List<RegionProfileData> regionList = new List<RegionProfileData>();
225
226 foreach (RegionProfileData regionProfileData in regions)
227 {
228 regionList.Add(regionProfileData);
229 }
230
231 return regionList;
232 }
233 }
234
235 }
236}
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
deleted file mode 100644
index 130be7e..0000000
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ /dev/null
@@ -1,382 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
32using NHibernate;
33using NHibernate.Criterion;
34using OpenMetaverse;
35using OpenSim.Framework;
36
37namespace OpenSim.Data.NHibernate
38{
39 public class NHibernateInventoryData: IInventoryDataPlugin
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42
43 private NHibernateManager manager;
44 public NHibernateManager Manager
45 {
46 get
47 {
48 return manager;
49 }
50 }
51
52 /// <summary>
53 /// The plugin being loaded
54 /// </summary>
55 /// <returns>A string containing the plugin name</returns>
56 public string Name
57 {
58 get { return "NHibernate Inventory Data Interface"; }
59 }
60
61 /// <summary>
62 /// The plugins version
63 /// </summary>
64 /// <returns>A string containing the plugin version</returns>
65 public string Version
66 {
67 get
68 {
69 Module module = GetType().Module;
70 // string dllName = module.Assembly.ManifestModule.Name;
71 Version dllVersion = module.Assembly.GetName().Version;
72
73
74 return
75 string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
76 dllVersion.Revision);
77 }
78 }
79
80 public void Initialise()
81 {
82 m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!");
83 throw new PluginNotInitialisedException (Name);
84 }
85
86 /// <summary>
87 /// Initialises the interface
88 /// </summary>
89 public void Initialise(string connect)
90 {
91 m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateInventoryData");
92 manager = new NHibernateManager(connect, "InventoryStore");
93 }
94
95 /// <summary>
96 /// Closes the interface
97 /// </summary>
98 public void Dispose()
99 {
100 }
101
102 /*****************************************************************
103 *
104 * Basic CRUD operations on Data
105 *
106 ****************************************************************/
107
108 // READ
109
110 /// <summary>
111 /// Returns an inventory item by its UUID
112 /// </summary>
113 /// <param name="item">The UUID of the item to be returned</param>
114 /// <returns>A class containing item information</returns>
115 public InventoryItemBase getInventoryItem(UUID item)
116 {
117 try
118 {
119 m_log.InfoFormat("[NHIBERNATE] getInventoryItem {0}", item);
120 return (InventoryItemBase)manager.Get(typeof(InventoryItemBase), item);
121 }
122 catch
123 {
124 m_log.ErrorFormat("Couldn't find inventory item: {0}", item);
125 return null;
126 }
127 }
128
129 /// <summary>
130 /// Creates a new inventory item based on item
131 /// </summary>
132 /// <param name="item">The item to be created</param>
133 public void addInventoryItem(InventoryItemBase item)
134 {
135 if (!ExistsItem(item.ID))
136 {
137 manager.Insert(item);
138 }
139 else
140 {
141 m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Item {0} that already exists, updating instead", item.ID);
142 updateInventoryItem(item);
143 }
144 }
145
146 /// <summary>
147 /// Updates an inventory item with item (updates based on ID)
148 /// </summary>
149 /// <param name="item">The updated item</param>
150 public void updateInventoryItem(InventoryItemBase item)
151 {
152 if (ExistsItem(item.ID))
153 {
154 manager.Update(item);
155 }
156 else
157 {
158 m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Item {0} that already exists", item.ID);
159 }
160 }
161
162 /// <summary>
163 ///
164 /// </summary>
165 /// <param name="item"></param>
166 public void deleteInventoryItem(UUID itemID)
167 {
168 InventoryItemBase item = (InventoryItemBase)manager.Get(typeof(InventoryItemBase), itemID);
169 if (item != null)
170 {
171 manager.Delete(item);
172 }
173 else
174 {
175 m_log.ErrorFormat("[NHIBERNATE] Error deleting InventoryItemBase {0}", itemID);
176 }
177
178 }
179
180 public InventoryItemBase queryInventoryItem(UUID itemID)
181 {
182 return null;
183 }
184
185 public InventoryFolderBase queryInventoryFolder(UUID folderID)
186 {
187 return null;
188 }
189
190 /// <summary>
191 /// Returns an inventory folder by its UUID
192 /// </summary>
193 /// <param name="folder">The UUID of the folder to be returned</param>
194 /// <returns>A class containing folder information</returns>
195 public InventoryFolderBase getInventoryFolder(UUID folder)
196 {
197 try
198 {
199 return (InventoryFolderBase)manager.Get(typeof(InventoryFolderBase), folder);
200 }
201 catch
202 {
203 m_log.ErrorFormat("[NHIBERNATE] Couldn't find inventory item: {0}", folder);
204 return null;
205 }
206 }
207
208 /// <summary>
209 /// Creates a new inventory folder based on folder
210 /// </summary>
211 /// <param name="folder">The folder to be created</param>
212 public void addInventoryFolder(InventoryFolderBase folder)
213 {
214 if (!ExistsFolder(folder.ID))
215 {
216 manager.Insert(folder);
217 }
218 else
219 {
220 m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Folder {0} that already exists, updating instead", folder.ID);
221 updateInventoryFolder(folder);
222 }
223 }
224
225 /// <summary>
226 /// Updates an inventory folder with folder (updates based on ID)
227 /// </summary>
228 /// <param name="folder">The updated folder</param>
229 public void updateInventoryFolder(InventoryFolderBase folder)
230 {
231 if (ExistsFolder(folder.ID))
232 {
233 manager.Update(folder);
234 }
235 else
236 {
237 m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Folder {0} that already exists", folder.ID);
238 }
239 }
240
241 /// <summary>
242 ///
243 /// </summary>
244 /// <param name="folder"></param>
245 public void deleteInventoryFolder(UUID folderID)
246 {
247 InventoryFolderBase item = (InventoryFolderBase)manager.Get(typeof(InventoryFolderBase), folderID);
248 if (item != null)
249 {
250 manager.Delete(item);
251 }
252 else
253 {
254 m_log.ErrorFormat("[NHIBERNATE] Error deleting InventoryFolderBase {0}", folderID);
255 }
256 manager.Delete(folderID);
257 }
258
259 // useful private methods
260 private bool ExistsItem(UUID uuid)
261 {
262 return (getInventoryItem(uuid) != null) ? true : false;
263 }
264
265 private bool ExistsFolder(UUID uuid)
266 {
267 return (getInventoryFolder(uuid) != null) ? true : false;
268 }
269
270 public void Shutdown()
271 {
272 // TODO: DataSet commit
273 }
274
275 // Move seems to be just update
276
277 public void moveInventoryFolder(InventoryFolderBase folder)
278 {
279 updateInventoryFolder(folder);
280 }
281
282 public void moveInventoryItem(InventoryItemBase item)
283 {
284 updateInventoryItem(item);
285 }
286
287
288
289 /// <summary>
290 /// Returns a list of inventory items contained within the specified folder
291 /// </summary>
292 /// <param name="folderID">The UUID of the target folder</param>
293 /// <returns>A List of InventoryItemBase items</returns>
294 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
295 {
296 // try {
297 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryItemBase));
298 criteria.Add(Expression.Eq("Folder", folderID));
299 List<InventoryItemBase> list = new List<InventoryItemBase>();
300 foreach (InventoryItemBase item in criteria.List())
301 {
302 list.Add(item);
303 }
304 return list;
305 // }
306 // catch
307 // {
308 // return new List<InventoryItemBase>();
309 // }
310 }
311
312 public List<InventoryFolderBase> getUserRootFolders(UUID user)
313 {
314 return new List<InventoryFolderBase>();
315 }
316
317 // see InventoryItemBase.getUserRootFolder
318 public InventoryFolderBase getUserRootFolder(UUID user)
319 {
320 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryFolderBase));
321 criteria.Add(Expression.Eq("ParentID", UUID.Zero));
322 criteria.Add(Expression.Eq("Owner", user));
323 foreach (InventoryFolderBase folder in criteria.List())
324 {
325 return folder;
326 }
327 m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user);
328 return null;
329 }
330
331 /// <summary>
332 /// Append a list of all the child folders of a parent folder
333 /// </summary>
334 /// <param name="folders">list where folders will be appended</param>
335 /// <param name="parentID">ID of parent</param>
336 private void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
337 {
338 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryFolderBase));
339 criteria.Add(Expression.Eq("ParentID", parentID));
340 foreach (InventoryFolderBase item in criteria.List())
341 {
342 folders.Add(item);
343 }
344 }
345
346 /// <summary>
347 /// Returns a list of inventory folders contained in the folder 'parentID'
348 /// </summary>
349 /// <param name="parentID">The folder to get subfolders for</param>
350 /// <returns>A list of inventory folders</returns>
351 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
352 {
353 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
354 getInventoryFolders(ref folders, parentID);
355 return folders;
356 }
357
358 // See IInventoryDataPlugin
359 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
360 {
361 if (parentID == UUID.Zero)
362 {
363 // Zero UUID is not a real parent folder.
364 return new List<InventoryFolderBase>();
365 }
366
367 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
368
369 getInventoryFolders(ref folders, parentID);
370
371 for (int i = 0; i < folders.Count; i++)
372 getInventoryFolders(ref folders, folders[i].ID);
373
374 return folders;
375 }
376
377 public List<InventoryItemBase> fetchActiveGestures (UUID avatarID)
378 {
379 return null;
380 }
381 }
382}
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs
deleted file mode 100644
index 2e7081e..0000000
--- a/OpenSim/Data/NHibernate/NHibernateManager.cs
+++ /dev/null
@@ -1,345 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data.Common;
30using System.Reflection;
31using log4net;
32using NHibernate;
33using NHibernate.Cfg;
34using NHibernate.Tool.hbm2ddl;
35using OpenMetaverse;
36using Environment=NHibernate.Cfg.Environment;
37
38namespace OpenSim.Data.NHibernate
39{
40 public class NHibernateManager
41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
44 private string dialect;
45 private Configuration configuration;
46 private ISessionFactory sessionFactory;
47
48 #region Initialization
49
50 /// <summary>
51 /// Initiate NHibernate Manager
52 /// </summary>
53 /// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
54 /// <param name="store">Name of the store</param>
55 public NHibernateManager(string connect, string store)
56 {
57 ParseConnectionString(connect);
58
59 //To create sql file uncomment code below and write the name of the file
60 //SchemaExport exp = new SchemaExport(cfg);
61 //exp.SetOutputFile("nameofthefile.sql");
62 //exp.Create(false, true);
63
64 Assembly assembly = GetType().Assembly;
65
66 sessionFactory = configuration.BuildSessionFactory();
67 RunMigration(dialect, assembly, store);
68 }
69
70 /// <summary>
71 /// Initiate NHibernate Manager with spesific assembly
72 /// </summary>
73 /// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
74 /// <param name="store">Name of the store</param>
75 /// <param name="assembly">Outside assembly to be included </param>
76 public NHibernateManager(string connect, string store, Assembly assembly)
77 {
78 ParseConnectionString(connect);
79
80 configuration.AddAssembly(assembly);
81 sessionFactory = configuration.BuildSessionFactory();
82 RunMigration(dialect, assembly, store);
83 }
84
85 /// <summary>
86 /// Parses the connection string and creates the NHibernate configuration
87 /// </summary>
88 /// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
89 private void ParseConnectionString(string connect)
90 {
91 // Split out the dialect, driver, and connect string
92 char[] split = { ';' };
93 string[] parts = connect.Split(split, 3);
94 if (parts.Length != 3)
95 {
96 // TODO: make this a real exception type
97 throw new Exception("Malformed Inventory connection string '" + connect + "'");
98 }
99
100 dialect = parts[0];
101
102 // NHibernate setup
103 configuration = new Configuration();
104 configuration.SetProperty(Environment.ConnectionProvider,
105 "NHibernate.Connection.DriverConnectionProvider");
106 configuration.SetProperty(Environment.Dialect,
107 "NHibernate.Dialect." + dialect);
108 configuration.SetProperty(Environment.ConnectionDriver,
109 "NHibernate.Driver." + parts[1]);
110 configuration.SetProperty(Environment.ConnectionString, parts[2]);
111 configuration.AddAssembly("OpenSim.Data.NHibernate");
112 }
113
114 /// <summary>
115 /// Runs migration for the the store in assembly
116 /// </summary>
117 /// <param name="dialect">Dialect in use</param>
118 /// <param name="assembly">Assembly where migration files exist</param>
119 /// <param name="store">Name of the store in use</param>
120 private void RunMigration(string dialect, Assembly assembly, string store)
121 {
122 // Migration subtype is the folder name under which migrations are stored. For mysql this folder is
123 // MySQLDialect instead of MySQL5Dialect which is the dialect currently in use. To avoid renaming
124 // this folder each time the mysql version changes creating simple mapping:
125 String migrationSubType = dialect;
126 if (dialect.StartsWith("MySQL"))
127 {
128 migrationSubType = "MySQLDialect";
129 }
130
131 Migration migration = new Migration((DbConnection)sessionFactory.ConnectionProvider.GetConnection(), assembly, migrationSubType, store);
132 migration.Update();
133 }
134
135 #endregion
136
137 /// <summary>
138 /// Gets object of given type from database with given id.
139 /// Uses stateless session for efficiency.
140 /// </summary>
141 /// <param name="type">Type of the object.</param>
142 /// <param name="id">Id of the object.</param>
143 /// <returns>The object or null if object was not found.</returns>
144 public object Get(Type type, Object id)
145 {
146 using (IStatelessSession session = sessionFactory.OpenStatelessSession())
147 {
148 object obj = null;
149 try
150 {
151 obj = session.Get(type.FullName, id);
152 }
153 catch (Exception e)
154 {
155 m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
156 }
157 return obj;
158 }
159 }
160
161 /// <summary>
162 /// Gets object of given type from database with given id.
163 /// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
164 /// </summary>
165 /// <param name="type">Type of the object.</param>
166 /// <param name="id">Id of the object.</param>
167 /// <returns>The object or null if object was not found.</returns>
168 public object GetWithStatefullSession(Type type, Object id)
169 {
170 using (ISession session = sessionFactory.OpenSession())
171 {
172 object obj = null;
173 try
174 {
175 obj = session.Get(type.FullName, id);
176 }
177 catch (Exception e)
178 {
179 m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
180 }
181 return obj;
182 }
183
184 }
185
186 /// <summary>
187 /// Inserts given object to database.
188 /// Uses stateless session for efficiency.
189 /// </summary>
190 /// <param name="obj">Object to be insterted.</param>
191 /// <returns>Identifier of the object. Useful for situations when NHibernate generates the identifier.</returns>
192 public object Insert(object obj)
193 {
194 try
195 {
196 using (IStatelessSession session = sessionFactory.OpenStatelessSession())
197 {
198 using (ITransaction transaction=session.BeginTransaction())
199 {
200 Object identifier=session.Insert(obj);
201 transaction.Commit();
202 return identifier;
203 }
204 }
205 }
206 catch (Exception e)
207 {
208 m_log.Error("[NHIBERNATE] issue inserting object ", e);
209 return null;
210 }
211 }
212
213 /// <summary>
214 /// Inserts given object to database.
215 /// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
216 /// </summary>
217 /// <param name="obj">Object to be insterted.</param>
218 /// <returns>Identifier of the object. Useful for situations when NHibernate generates the identifier.</returns>
219 public object InsertWithStatefullSession(object obj)
220 {
221 try
222 {
223 using (ISession session = sessionFactory.OpenSession())
224 {
225 using (ITransaction transaction = session.BeginTransaction())
226 {
227 Object identifier = session.Save(obj);
228 transaction.Commit();
229 return identifier;
230 }
231 }
232 }
233 catch (Exception e)
234 {
235 m_log.Error("[NHIBERNATE] issue inserting object ", e);
236 return null;
237 }
238 }
239
240 /// <summary>
241 /// Updates given object to database.
242 /// Uses stateless session for efficiency.
243 /// </summary>
244 /// <param name="obj">Object to be updated.</param>
245 /// <returns>True if operation was succesful.</returns>
246 public bool Update(object obj)
247 {
248 try
249 {
250 using (IStatelessSession session = sessionFactory.OpenStatelessSession())
251 {
252 using (ITransaction transaction = session.BeginTransaction())
253 {
254 session.Update(obj);
255 transaction.Commit();
256 return true;
257 }
258 }
259 }
260 catch (Exception e)
261 {
262 m_log.Error("[NHIBERNATE] issue updating object ", e);
263 return false;
264 }
265 }
266
267 /// <summary>
268 /// Updates given object to database.
269 /// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
270 /// </summary>
271 /// <param name="obj">Object to be updated.</param>
272 /// <returns>True if operation was succesful.</returns>
273 public bool UpdateWithStatefullSession(object obj)
274 {
275 try
276 {
277 using (ISession session = sessionFactory.OpenSession())
278 {
279 using (ITransaction transaction = session.BeginTransaction())
280 {
281 session.Update(obj);
282 transaction.Commit();
283 return true;
284 }
285 }
286 }
287 catch (Exception e)
288 {
289 m_log.Error("[NHIBERNATE] issue updating object ", e);
290 return false;
291 }
292 }
293
294 /// <summary>
295 /// Deletes given object from database.
296 /// </summary>
297 /// <param name="obj">Object to be deleted.</param>
298 /// <returns>True if operation was succesful.</returns>
299 public bool Delete(object obj)
300 {
301 try
302 {
303 using (IStatelessSession session = sessionFactory.OpenStatelessSession())
304 {
305 using (ITransaction transaction = session.BeginTransaction())
306 {
307 session.Delete(obj);
308 transaction.Commit();
309 return true;
310 }
311 }
312 }
313 catch (Exception e)
314 {
315 m_log.Error("[NHIBERNATE] issue deleting object ", e);
316 return false;
317 }
318 }
319
320 /// <summary>
321 /// Returns statefull session which can be used to execute custom nhibernate or sql queries.
322 /// </summary>
323 /// <returns>Statefull session</returns>
324 public ISession GetSession()
325 {
326 return sessionFactory.OpenSession();
327 }
328
329 /// <summary>
330 /// Drops the database schema. This exist for unit tests. It should not be invoked from other than test teardown.
331 /// </summary>
332 public void DropSchema()
333 {
334 SchemaExport export = new SchemaExport(this.configuration);
335 export.Drop(true, true);
336
337 using (ISession session = sessionFactory.OpenSession())
338 {
339 ISQLQuery sqlQuery = session.CreateSQLQuery("drop table migrations");
340 sqlQuery.ExecuteUpdate();
341 }
342 }
343
344 }
345}
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
deleted file mode 100644
index f19fda1..0000000
--- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs
+++ /dev/null
@@ -1,426 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
32using NHibernate;
33using NHibernate.Criterion;
34using OpenMetaverse;
35using OpenSim.Framework;
36using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes;
38
39namespace OpenSim.Data.NHibernate
40{
41 /// <summary>
42 /// A RegionData Interface to the NHibernate database
43 /// </summary>
44 public class NHibernateRegionData : IRegionDataStore
45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47
48 private NHibernateManager manager;
49 public NHibernateManager Manager
50 {
51 get
52 {
53 return manager;
54 }
55 }
56
57 public void Initialise(string connect)
58 {
59 m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateRegionData");
60 manager = new NHibernateManager(connect, "RegionStore");
61 }
62
63 /***********************************************************************
64 *
65 * Public Interface Functions
66 *
67 **********************************************************************/
68
69 public void Dispose() {}
70
71 public void StoreRegionSettings(RegionSettings rs)
72 {
73 RegionSettings oldRegionSettings = (RegionSettings)manager.Get(typeof(RegionSettings), rs.RegionUUID);
74 if (oldRegionSettings != null)
75 {
76 manager.Update(rs);
77 }
78 else
79 {
80 manager.Insert(rs);
81 }
82 }
83
84 public RegionSettings LoadRegionSettings(UUID regionUUID)
85 {
86 RegionSettings regionSettings = (RegionSettings) manager.Get(typeof(RegionSettings), regionUUID);
87
88 if (regionSettings == null)
89 {
90 regionSettings = new RegionSettings();
91 regionSettings.RegionUUID = regionUUID;
92 manager.Insert(regionSettings);
93 }
94
95 regionSettings.OnSave += StoreRegionSettings;
96
97 return regionSettings;
98 }
99
100 // This looks inefficient, but it turns out that it isn't
101 // based on trial runs with nhibernate 1.2
102 private void SaveOrUpdate(SceneObjectPart p)
103 {
104 try
105 {
106 SceneObjectPart old = (SceneObjectPart)manager.Get(typeof(SceneObjectPart), p.UUID);
107 if (old != null)
108 {
109 m_log.InfoFormat("[NHIBERNATE] updating object {0}", p.UUID);
110 manager.Update(p);
111 }
112 else
113 {
114 m_log.InfoFormat("[NHIBERNATE] saving object {0}", p.UUID);
115 manager.Insert(p);
116 }
117
118 }
119 catch (Exception e)
120 {
121 m_log.Error("[NHIBERNATE] issue saving part", e);
122 }
123 }
124
125 private void SaveOrUpdate(Terrain t)
126 {
127 try
128 {
129
130 Terrain old = (Terrain)manager.Get(typeof(Terrain), t.RegionID);
131 if (old != null)
132 {
133 m_log.InfoFormat("[NHIBERNATE] updating terrain {0}", t.RegionID);
134 manager.Update(t);
135 }
136 else
137 {
138 m_log.InfoFormat("[NHIBERNATE] saving terrain {0}", t.RegionID);
139 manager.Insert(t);
140 }
141
142 }
143 catch (Exception e)
144 {
145 m_log.Error("[NHIBERNATE] issue saving terrain", e);
146 }
147 }
148
149
150 /// <summary>
151 /// Adds an object into region storage
152 /// </summary>
153 /// <param name="obj">the object</param>
154 /// <param name="regionUUID">the region UUID</param>
155 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
156 {
157 uint flags = obj.RootPart.GetEffectiveObjectFlags();
158
159 // Eligibility check
160 if ((flags & (uint)PrimFlags.Temporary) != 0)
161 return;
162 if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0)
163 return;
164
165 try
166 {
167 foreach (SceneObjectPart part in obj.Children.Values)
168 {
169 m_log.InfoFormat("Storing part {0}", part.UUID);
170 SaveOrUpdate(part);
171 }
172 }
173 catch (Exception e)
174 {
175 m_log.Error("Can't save: ", e);
176 }
177 }
178
179 private SceneObjectGroup LoadObject(UUID uuid, UUID region)
180 {
181 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(SceneObjectPart));
182 criteria.Add(Expression.Eq("RegionID", region));
183 criteria.Add(Expression.Eq("ParentUUID", uuid));
184 criteria.AddOrder(Order.Asc("ParentID"));
185
186 IList<SceneObjectPart> parts = criteria.List<SceneObjectPart>();
187
188 SceneObjectGroup group = null;
189
190 // Find the root part
191 for (int i = 0; i < parts.Count; i++)
192 {
193 if (parts[i].UUID == uuid)
194 {
195 group = new SceneObjectGroup(parts[i]);
196 break;
197 }
198 }
199
200 // Add the children parts
201 if (group != null)
202 {
203 for (int i = 0; i < parts.Count; i++)
204 {
205 if (parts[i].UUID != uuid)
206 group.AddPart(parts[i]);
207 }
208 }
209 else
210 {
211 m_log.Error("[NHIBERNATE]: LoadObject() Attempted to load a SceneObjectGroup with no root SceneObjectPart ");
212 }
213
214 return group;
215 }
216
217 /// <summary>
218 /// Removes an object from region storage
219 /// </summary>
220 /// <param name="obj">the object</param>
221 /// <param name="regionUUID">the region UUID</param>
222 public void RemoveObject(UUID obj, UUID regionUUID)
223 {
224 SceneObjectGroup g = LoadObject(obj, regionUUID);
225 foreach (SceneObjectPart p in g.Children.Values)
226 {
227 manager.Delete(p);
228 }
229
230 // m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID);
231
232 }
233
234 /// <summary>
235 /// Load persisted objects from region storage.
236 /// </summary>
237 /// <param name="regionUUID">The region UUID</param>
238 /// <returns>List of loaded groups</returns>
239 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
240 {
241 Dictionary<UUID, SceneObjectGroup> SOG = new Dictionary<UUID, SceneObjectGroup>();
242 List<SceneObjectGroup> ret = new List<SceneObjectGroup>();
243
244 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(SceneObjectPart));
245 criteria.Add(Expression.Eq("RegionID", regionUUID));
246 criteria.AddOrder(Order.Asc("ParentID"));
247 criteria.AddOrder(Order.Asc("LinkNum"));
248 foreach (SceneObjectPart p in criteria.List())
249 {
250 // root part
251 if (p.UUID == p.ParentUUID)
252 {
253 SceneObjectGroup group = new SceneObjectGroup(p);
254 SOG.Add(p.ParentUUID, group);
255 }
256 else
257 {
258 SOG[p.ParentUUID].AddPart(p);
259 }
260 // get the inventory
261
262 ICriteria InvCriteria = manager.GetSession().CreateCriteria(typeof(TaskInventoryItem));
263 InvCriteria.Add(Expression.Eq("ParentPartID", p.UUID));
264 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
265 foreach (TaskInventoryItem i in InvCriteria.List())
266 {
267 inventory.Add(i);
268 }
269
270 if (inventory.Count > 0)
271 p.Inventory.RestoreInventoryItems(inventory);
272 }
273 foreach (SceneObjectGroup g in SOG.Values)
274 {
275 ret.Add(g);
276 }
277
278 return ret;
279 }
280
281 /// <summary>
282 /// Store a terrain revision in region storage
283 /// </summary>
284 /// <param name="ter">terrain heightfield</param>
285 /// <param name="regionID">region UUID</param>
286 public void StoreTerrain(double[,] ter, UUID regionID)
287 {
288 lock (this) {
289 Terrain t = new Terrain(regionID, ter);
290 SaveOrUpdate(t);
291 }
292 }
293
294 /// <summary>
295 /// Load the latest terrain revision from region storage
296 /// </summary>
297 /// <param name="regionID">the region UUID</param>
298 /// <returns>Heightfield data</returns>
299 public double[,] LoadTerrain(UUID regionID)
300 {
301 Terrain t = (Terrain)manager.Get(typeof(Terrain), regionID);
302 if (t != null)
303 {
304 return t.Doubles;
305 }
306
307 m_log.Info("No terrain yet");
308 return null;
309 }
310
311 /// <summary>
312 ///
313 /// </summary>
314 /// <param name="globalID"></param>
315 public void RemoveLandObject(UUID globalID)
316 {
317
318 }
319
320 /// <summary>
321 ///
322 /// </summary>
323 /// <param name="parcel"></param>
324 public void StoreLandObject(ILandObject parcel)
325 {
326
327 }
328
329 /// <summary>
330 ///
331 /// </summary>
332 /// <param name="regionUUID"></param>
333 /// <returns></returns>
334 public List<LandData> LoadLandObjects(UUID regionUUID)
335 {
336 List<LandData> landDataForRegion = new List<LandData>();
337
338 return landDataForRegion;
339 }
340
341
342 /// <summary>
343 /// See <see cref="Commit"/>
344 /// </summary>
345 public void Shutdown()
346 {
347 //session.Flush();
348 }
349
350 /// <summary>
351 /// Load a region banlist
352 /// </summary>
353 /// <param name="regionUUID">the region UUID</param>
354 /// <returns>The banlist</returns>
355 public List<EstateBan> LoadRegionBanList(UUID regionUUID)
356 {
357 List<EstateBan> regionbanlist = new List<EstateBan>();
358
359 return regionbanlist;
360 }
361
362 /// <summary>
363 /// Add en entry into region banlist
364 /// </summary>
365 /// <param name="item"></param>
366 public void AddToRegionBanlist(EstateBan item)
367 {
368
369 }
370
371 /// <summary>
372 /// remove an entry from the region banlist
373 /// </summary>
374 /// <param name="item"></param>
375 public void RemoveFromRegionBanlist(EstateBan item)
376 {
377
378 }
379
380 /// <summary>
381 ///
382 /// </summary>
383 /// <param name="val"></param>
384 /// <returns></returns>
385// private static Array serializeTerrain(double[,] val)
386// {
387// MemoryStream str = new MemoryStream(65536*sizeof (double));
388// BinaryWriter bw = new BinaryWriter(str);
389//
390// // TODO: COMPATIBILITY - Add byte-order conversions
391// for (int x = 0; x < (int)Constants.RegionSize; x++)
392// for (int y = 0; y < (int)Constants.RegionSize; y++)
393// bw.Write(val[x, y]);
394//
395// return str.ToArray();
396// }
397
398 /// <summary>
399 /// see IRegionDatastore
400 /// </summary>
401 /// <param name="primID"></param>
402 /// <param name="items"></param>
403 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
404 {
405 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(TaskInventoryItem));
406 criteria.Add(Expression.Eq("ParentPartID", primID));
407 try
408 {
409 foreach (TaskInventoryItem i in criteria.List())
410 {
411 manager.Delete(i);
412 }
413
414 foreach (TaskInventoryItem i in items)
415 {
416 manager.Insert(i);
417
418 }
419 }
420 catch (Exception e)
421 {
422 m_log.Error("[NHIBERNATE] StoreInvetory", e);
423 }
424 }
425 }
426}
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
deleted file mode 100644
index 1b0c4c9..0000000
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ /dev/null
@@ -1,461 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using System.Reflection;
30using log4net;
31using NHibernate;
32using NHibernate.Criterion;
33using OpenMetaverse;
34using OpenSim.Framework;
35
36namespace OpenSim.Data.NHibernate
37{
38 /// <summary>
39 /// A User storage interface for the DB4o database system
40 /// </summary>
41 public class NHibernateUserData : UserDataBase
42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44
45 private NHibernateManager manager;
46 public NHibernateManager Manager
47 {
48 get
49 {
50 return manager;
51 }
52 }
53
54 public override void Initialise()
55 {
56 m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!");
57 throw new PluginNotInitialisedException (Name);
58 }
59
60 public override void Initialise(string connect)
61 {
62 m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateUserData");
63 manager = new NHibernateManager(connect, "UserStore");
64 }
65
66 private bool ExistsUser(UUID uuid)
67 {
68 UserProfileData user = null;
69
70 m_log.InfoFormat("[NHIBERNATE] ExistsUser; {0}", uuid);
71 user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
72
73 if (user == null)
74 {
75 m_log.InfoFormat("[NHIBERNATE] User with given UUID does not exist {0} ", uuid);
76 return false;
77 }
78
79 return true;
80
81 }
82
83 override public UserProfileData GetUserByUUID(UUID uuid)
84 {
85 UserProfileData user;
86 m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid);
87
88 user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
89 if (user != null)
90 {
91 UserAgentData agent = GetAgentByUUID(uuid);
92 if (agent != null)
93 {
94 user.CurrentAgent = agent;
95 }
96 }
97
98 return user;
99 }
100
101 override public void AddNewUserProfile(UserProfileData profile)
102 {
103 if (profile.ID == UUID.Zero)
104 {
105 m_log.ErrorFormat("[NHIBERNATE] Attempted to add User {0} {1} with zero UUID, throwintg exception as this is programming error ", profile.FirstName, profile.SurName);
106 return;
107 }
108
109 if (!ExistsUser(profile.ID))
110 {
111 m_log.InfoFormat("[NHIBERNATE] AddNewUserProfile {0}", profile.ID);
112 manager.Insert(profile);
113 // Agent should not be saved according to BasicUserTest.T015_UserPersistency()
114 // SetAgentData(profile.ID, profile.CurrentAgent);
115
116 }
117 else
118 {
119 m_log.ErrorFormat("[NHIBERNATE] Attempted to add User {0} {1} that already exists, updating instead", profile.FirstName, profile.SurName);
120 UpdateUserProfile(profile);
121 }
122 }
123
124 /*
125 private void SetAgentData(UUID uuid, UserAgentData agent)
126 {
127 UserAgentData old = (UserAgentData)manager.Load(typeof(UserAgentData), uuid);
128 if (old != null)
129 {
130 m_log.InfoFormat("[NHIBERNATE] SetAgentData deleting old: {0} ",uuid);
131 manager.Delete(old);
132 }
133 if (agent != null)
134 {
135 m_log.InfoFormat("[NHIBERNATE] SetAgentData: {0} ", agent.ProfileID);
136 manager.Save(agent);
137 }
138 }
139 */
140
141 override public bool UpdateUserProfile(UserProfileData profile)
142 {
143 if (ExistsUser(profile.ID))
144 {
145 manager.Update(profile);
146 // Agent should not be saved according to BasicUserTest.T015_UserPersistency()
147 // SetAgentData(profile.ID, profile.CurrentAgent);
148 return true;
149 }
150 else
151 {
152 m_log.ErrorFormat("[NHIBERNATE] Attempted to update User {0} {1} that doesn't exist, updating instead", profile.FirstName, profile.SurName);
153 AddNewUserProfile(profile);
154 return true;
155 }
156 }
157
158 override public void AddNewUserAgent(UserAgentData agent)
159 {
160 if (agent.ProfileID == UUID.Zero)
161 {
162 m_log.ErrorFormat("[NHIBERNATE] Attempted to add new user agent with zero user id. Agent session id: {0}", agent.SessionID);
163 return;
164 }
165
166 if (agent.SessionID == UUID.Zero)
167 {
168 m_log.ErrorFormat("[NHIBERNATE] Attempted to add new user agent with zero session id. User profile id: {0}", agent.SessionID);
169 return;
170 }
171
172
173 UserAgentData old = (UserAgentData)manager.Get(typeof(UserAgentData), agent.ProfileID);
174 if (old != null)
175 {
176 manager.Delete(old);
177 }
178
179 manager.Insert(agent);
180
181 }
182
183 public void UpdateUserAgent(UserAgentData agent)
184 {
185 m_log.InfoFormat("[NHIBERNATE] UpdateUserAgent: {0} ", agent.ProfileID);
186 manager.Update(agent);
187 }
188
189 override public UserAgentData GetAgentByUUID(UUID uuid)
190 {
191 m_log.InfoFormat("[NHIBERNATE] GetAgentByUUID: {0} ", uuid);
192 return (UserAgentData)manager.Get(typeof(UserAgentData), uuid);
193 }
194
195 override public UserProfileData GetUserByName(string fname, string lname)
196 {
197 m_log.InfoFormat("[NHIBERNATE] GetUserByName: {0} {1} ", fname, lname);
198 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(UserProfileData));
199 criteria.Add(Expression.Eq("FirstName", fname));
200 criteria.Add(Expression.Eq("SurName", lname));
201 foreach (UserProfileData profile in criteria.List())
202 {
203 profile.CurrentAgent = GetAgentByUUID(profile.ID);
204 return profile;
205 }
206 return null;
207 }
208
209 override public UserAgentData GetAgentByName(string fname, string lname)
210 {
211 return GetUserByName(fname, lname).CurrentAgent;
212 }
213
214 override public UserAgentData GetAgentByName(string name)
215 {
216 return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
217 }
218
219 override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
220 {
221 List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>();
222 string[] querysplit;
223 querysplit = query.Split(' ');
224
225 if (querysplit.Length == 2)
226 {
227 ICriteria criteria = manager.GetSession().CreateCriteria(typeof(UserProfileData));
228 criteria.Add(Expression.Like("FirstName", querysplit[0]));
229 criteria.Add(Expression.Like("SurName", querysplit[1]));
230 foreach (UserProfileData profile in criteria.List())
231 {
232 AvatarPickerAvatar user = new AvatarPickerAvatar();
233 user.AvatarID = profile.ID;
234 user.firstName = profile.FirstName;
235 user.lastName = profile.SurName;
236 results.Add(user);
237 }
238 }
239 return results;
240 }
241
242 // TODO: actually implement these
243 public override void StoreWebLoginKey(UUID agentID, UUID webLoginKey)
244 {
245 UserProfileData user=GetUserByUUID(agentID);
246 user.WebLoginKey = webLoginKey;
247 UpdateUserProfile(user);
248 return;
249 }
250
251 public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms)
252 {
253 if (!FriendRelationExists(ownerId,friendId))
254 {
255 manager.Insert(new UserFriend(UUID.Random(), ownerId, friendId, perms));
256 }
257 if (!FriendRelationExists(friendId, ownerId))
258 {
259 manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms));
260 }
261 return;
262 }
263
264 private bool FriendRelationExists(UUID ownerId, UUID friendId)
265 {
266 using (ISession session = manager.GetSession())
267 {
268 ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
269 criteria.Add(Expression.Eq("OwnerID", ownerId));
270 criteria.Add(Expression.Eq("FriendID", friendId));
271 return criteria.List().Count > 0;
272 }
273 }
274
275 public override void RemoveUserFriend(UUID ownerId, UUID friendId)
276 {
277 using (ISession session = manager.GetSession())
278 {
279 using (ITransaction transaction = session.BeginTransaction())
280 {
281
282 {
283 ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
284 criteria.Add(Expression.Eq("OwnerID", ownerId));
285 criteria.Add(Expression.Eq("FriendID", friendId));
286
287 foreach (UserFriend userFriend in criteria.List())
288 {
289 session.Delete(userFriend);
290 }
291 }
292
293 {
294 ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
295 criteria.Add(Expression.Eq("OwnerID", friendId));
296 criteria.Add(Expression.Eq("FriendID", ownerId));
297
298 foreach (UserFriend userFriend in criteria.List())
299 {
300 session.Delete(userFriend);
301 }
302 }
303
304 transaction.Commit();
305 }
306 }
307 return;
308 }
309
310
311 public override void UpdateUserFriendPerms(UUID ownerId, UUID friendId, uint perms)
312 {
313 using (ISession session = manager.GetSession())
314 {
315 using (ITransaction transaction = session.BeginTransaction())
316 {
317 {
318 ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
319 criteria.Add(Expression.Eq("OwnerID", ownerId));
320 criteria.Add(Expression.Eq("FriendID", friendId));
321
322 foreach (UserFriend userFriend in criteria.List())
323 {
324 userFriend.FriendPermissions = perms;
325 session.Update(userFriend);
326 }
327 }
328 transaction.Commit();
329 }
330 }
331 return;
332 }
333
334 public override List<FriendListItem> GetUserFriendList(UUID ownerId)
335 {
336 List<FriendListItem> friendList=new List<FriendListItem>();
337 Dictionary<UUID, FriendListItem> friendListItemDictionary = new Dictionary<UUID, FriendListItem>();
338
339 using (ISession session = manager.GetSession())
340 {
341 ICriteria criteria = session.CreateCriteria(typeof(UserFriend));
342 criteria.Add(Expression.Or(
343 Expression.Eq("OwnerID", ownerId),
344 Expression.Eq("FriendID", ownerId)
345 ));
346
347 foreach (UserFriend userFriend in criteria.List())
348 {
349 if (userFriend.OwnerID == ownerId)
350 {
351 FriendListItem friendListItem = new FriendListItem();
352 friendListItem.FriendListOwner = userFriend.OwnerID;
353 friendListItem.Friend = userFriend.FriendID;
354 friendListItem.FriendPerms = userFriend.FriendPermissions;
355 friendListItemDictionary.Add(userFriend.FriendID, friendListItem);
356 friendList.Add(friendListItem);
357 }
358 }
359
360 // Reading permissions to other direction
361 foreach (UserFriend userFriend in criteria.List())
362 {
363 if (userFriend.FriendID == ownerId)
364 {
365 //Ignore if there is no reverse relation existing.
366 //if (friendListItemDictionary.ContainsKey(userFriend.OwnerID))
367 {
368 FriendListItem friendListItem = friendListItemDictionary[userFriend.OwnerID];
369 friendListItem.FriendListOwnerPerms = userFriend.FriendPermissions;
370 }
371 }
372 }
373
374 }
375
376 return friendList;
377 }
378
379
380 public override Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> friendsIds)
381 {
382 Dictionary<UUID, FriendRegionInfo> friendRegionInfos=new Dictionary<UUID, FriendRegionInfo>();
383
384 foreach (UUID friendId in friendsIds)
385 {
386 UserAgentData agent=GetAgentByUUID(friendId);
387 if (agent != null)
388 {
389 FriendRegionInfo fri = new FriendRegionInfo();
390 fri.isOnline = agent.AgentOnline;
391 fri.regionHandle = agent.Handle;
392
393 friendRegionInfos[friendId] = fri;
394 }
395 }
396
397 return friendRegionInfos;
398 }
399
400 public override bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return true; }
401 public override bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return true; }
402
403 /// Appearance
404 /// TODO: stubs for now to get us to a compiling state gently
405 public override AvatarAppearance GetUserAppearance(UUID user)
406 {
407 return (AvatarAppearance)manager.Get(typeof(AvatarAppearance), user);
408 }
409
410 private bool ExistsAppearance(UUID uuid)
411 {
412 AvatarAppearance appearance = (AvatarAppearance)manager.Get(typeof(AvatarAppearance), uuid);
413 if (appearance == null)
414 {
415 return false;
416 }
417
418 return true;
419 }
420
421
422 public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
423 {
424 if (appearance == null)
425 return;
426
427 appearance.Owner = user;
428
429 bool exists = ExistsAppearance(user);
430 if (exists)
431 {
432 manager.Update(appearance);
433 }
434 else
435 {
436 manager.Insert(appearance);
437 }
438 }
439
440 public override void ResetAttachments(UUID userID)
441 {
442 }
443
444 public override void LogoutUsers(UUID regionID)
445 {
446 }
447
448 public override string Name {
449 get { return "NHibernate"; }
450 }
451
452 public override string Version {
453 get { return "0.1"; }
454 }
455
456 public override void Dispose()
457 {
458
459 }
460 }
461}
diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
deleted file mode 100644
index cb8b36d..0000000
--- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
+++ /dev/null
@@ -1,14 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false">
4 <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="Type" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
8 <property name="Name" type="String" length="64" />
9 <property name="Description" type="String" length="64" />
10 <property name="Local" type="boolean" />
11 <property name="Temporary" type="boolean" />
12 <property name="Data" type="binary" />
13 </class>
14</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml b/OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml
deleted file mode 100644
index fd66910..0000000
--- a/OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml
+++ /dev/null
@@ -1,12 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Data.NHibernate.EstateRegionLink, OpenSim.Data.NHibernate" table="EstateRegionLink" lazy="false">
4 <id name="EstateRegionLinkID" column="EstateRegionLinkID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7
8 <property name="EstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
9 <property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10
11 </class>
12</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml b/OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml
deleted file mode 100644
index d300b93..0000000
--- a/OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml
+++ /dev/null
@@ -1,68 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.EstateSettings, OpenSim.Framework" table="EstateSettings" lazy="false">
4
5 <id name="EstateID" column="EstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate">
6 <generator class="increment" />
7 </id>
8
9 <property name="ParentEstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
10 <property name="EstateOwner" column="EstateOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11
12 <property name="EstateName" column="Name" type="String" length="64" />
13
14 <property name="RedirectGridX" type="System.Int32" />
15 <property name="RedirectGridY" type="System.Int32" />
16
17 <property name="BillableFactor" type="System.Single" />
18 <property name="PricePerMeter" type="System.Int32" />
19 <property name="SunPosition" type="System.Double" />
20
21 <property name="UseGlobalTime" type="System.Boolean" />
22 <property name="FixedSun" type="System.Boolean" />
23 <property name="AllowVoice" type="System.Boolean" />
24 <property name="AllowDirectTeleport" type="System.Boolean" />
25 <property name="ResetHomeOnTeleport" type="System.Boolean" />
26 <property name="PublicAccess" type="System.Boolean" />
27 <property name="DenyAnonymous" type="System.Boolean" />
28 <property name="DenyIdentified" type="System.Boolean" />
29 <property name="DenyTransacted" type="System.Boolean" />
30 <property name="DenyMinors" type="System.Boolean" />
31 <property name="BlockDwell" type="System.Boolean" />
32 <property name="EstateSkipScripts" type="System.Boolean" />
33 <property name="TaxFree" type="System.Boolean" />
34 <property name="AbuseEmailToEstateOwner" type="System.Boolean" />
35
36 <property name="AbuseEmail" type="String" length="255" />
37
38 <array name="EstateManagers" table="EstateManagers" cascade="all">
39 <key column="EstateID" />
40 <index column="ArrayIndex" />
41 <element column="ManagerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
42 </array>
43
44 <array name="EstateAccess" table="EstateUsers" cascade="all">
45 <key column="EstateID" />
46 <index column="ArrayIndex" />
47 <element column="UserID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
48 </array>
49
50 <array name="EstateGroups" table="EstateGroups" cascade="all">
51 <key column="EstateID" />
52 <index column="ArrayIndex" />
53 <element column="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
54 </array>
55
56 <array name="EstateBans" table="EstateBans" cascade="all">
57 <key column="EstateID" />
58 <index column="ArrayIndex" />
59 <composite-element class="OpenSim.Framework.EstateBan, OpenSim.Framework">
60 <property name="BannedUserID" column="BannedUserID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
61 <property name="BannedHostAddress" column="BannedHostAddress" type="String" length="16"/>
62 <property name="BannedHostIPMask" column="BannedHostIPMask" type="String" length="16"/>
63 <property name="BannedHostNameMask" column="BannedHostNameMask" type="String" length="16"/>
64 </composite-element>
65 </array>
66
67 </class>
68</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml
deleted file mode 100644
index c5f0115..0000000
--- a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml
+++ /dev/null
@@ -1,13 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="Type" type="Int16" />
8 <property name="Version" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
9 <property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="Name" type="String" length="64" />
12 </class>
13</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml
deleted file mode 100644
index ea6032a..0000000
--- a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml
+++ /dev/null
@@ -1,26 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="InvType" type="System.Int32" />
8 <property name="AssetType" type="System.Int32" />
9 <property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="CreatorId" type="string" column="Creator"/>
13 <property name="Name" type="String" length="64" />
14 <property name="Description" type="String" length="64" />
15 <property name="NextPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
16 <property name="CurrentPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
17 <property name="BasePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
18 <property name="EveryOnePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
19 <property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="GroupOwned" type="boolean" />
21 <property name="SalePrice" type="System.Int32" />
22 <property name="SaleType" type="System.Byte" />
23 <property name="Flags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
24 <property name="CreationDate" type="System.Int32" />
25 </class>
26</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt b/OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt
deleted file mode 100644
index 1c89516..0000000
--- a/OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt
+++ /dev/null
@@ -1,14 +0,0 @@
1?This file describes the differences in schema creation and migration scripts.
2
3MySQL is used as reference script against which differences are listed.
4
5Generally MySQL create table options should be removed for other databases.
6
7_PostgreSQL_
8* DOUBLE->DOUBLE PRECISION
9* BIT->BOOLEAN
10
11_MsSql_
12* VARCHAR->NVARCHAR
13* Remove DEFAULT-keywords
14* DOUBLE->REAL
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql
deleted file mode 100644
index deee78b..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1create table Assets (
2 ID NVARCHAR(36) not null,
3 Type SMALLINT null,
4 Name NVARCHAR(64) null,
5 Description NVARCHAR(64) null,
6 Local BIT null,
7 Temporary BIT null,
8 Data VARBINARY(max) null,
9 primary key (ID)
10)
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql
deleted file mode 100644
index dd579f9..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql
+++ /dev/null
@@ -1,72 +0,0 @@
1CREATE TABLE EstateSettings (
2 EstateID INT NOT NULL,
3 ParentEstateID INT NULL,
4 EstateOwnerID NVARCHAR(36) NULL,
5 Name NVARCHAR(64) NULL,
6 RedirectGridX INT NULL,
7 RedirectGridY INT NULL,
8 BillableFactor REAL NULL,
9 PricePerMeter INT NULL,
10 SunPosition FLOAT NULL,
11
12 UseGlobalTime BIT NULL,
13 FixedSun BIT NULL,
14 AllowVoice BIT NULL,
15 AllowDirectTeleport BIT NULL,
16 ResetHomeOnTeleport BIT NULL,
17 PublicAccess BIT NULL,
18 DenyAnonymous BIT NULL,
19 DenyIdentified BIT NULL,
20 DenyTransacted BIT NULL,
21 DenyMinors BIT NULL,
22 BlockDwell BIT NULL,
23 EstateSkipScripts BIT NULL,
24 TaxFree BIT NULL,
25 AbuseEmailToEstateOwner BIT NULL,
26
27 AbuseEmail NVARCHAR(255) NULL,
28
29 PRIMARY KEY (EstateID)
30);
31
32CREATE TABLE EstateRegionLink (
33 EstateRegionLinkID NVARCHAR(36) NOT NULL,
34 EstateID INT NULL,
35 RegionID NVARCHAR(36) NULL,
36 PRIMARY KEY (EstateRegionLinkID)
37);
38
39CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
40CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
41
42
43CREATE TABLE EstateManagers (
44 EstateID INT NOT NULL,
45 ManagerID NVARCHAR(36) NOT NULL,
46 ArrayIndex INT NOT NULL,
47 PRIMARY KEY (EstateID,ArrayIndex)
48);
49
50CREATE TABLE EstateUsers (
51 EstateID INT NOT NULL,
52 UserID NVARCHAR(36) NOT NULL,
53 ArrayIndex INT NOT NULL,
54 PRIMARY KEY (EstateID,ArrayIndex)
55);
56
57CREATE TABLE EstateGroups (
58 EstateID INT NOT NULL,
59 GroupID NVARCHAR(36) NOT NULL,
60 ArrayIndex INT NOT NULL,
61 PRIMARY KEY (EstateID,ArrayIndex)
62);
63
64CREATE TABLE EstateBans (
65 EstateID INT NOT NULL,
66 ArrayIndex INT NOT NULL,
67 BannedUserID NVARCHAR(36) NOT NULL,
68 BannedHostAddress NVARCHAR(16) NOT NULL,
69 BannedHostIPMask NVARCHAR(16) NOT NULL,
70 BannedHostNameMask NVARCHAR(16) NOT NULL,
71 PRIMARY KEY (EstateID,ArrayIndex)
72); \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
deleted file mode 100644
index e4ad525..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
+++ /dev/null
@@ -1,35 +0,0 @@
1create table Regions (
2 Uuid NVARCHAR(36) not null,
3 RegionHandle BIGINT null,
4 RegionName NVARCHAR(32) null,
5 RegionRecvKey NVARCHAR(128) null,
6 RegionSendKey NVARCHAR(128) null,
7 RegionSecret NVARCHAR(128) null,
8 RegionDataURI NVARCHAR(255) null,
9 ServerIP NVARCHAR(64) null,
10 ServerPort INT null,
11 ServerURI NVARCHAR(255) null,
12 RegionLocX INT null,
13 RegionLocY INT null,
14 RegionLocZ INT null,
15 EastOverrideHandle BIGINT null,
16 WestOverrideHandle BIGINT null,
17 SouthOverrideHandle BIGINT null,
18 NorthOverrideHandle BIGINT null,
19 RegionAssetURI NVARCHAR(255) null,
20 RegionAssetRecvKey NVARCHAR(128) null,
21 RegionAssetSendKey NVARCHAR(128) null,
22 RegionUserURI NVARCHAR(255) null,
23 RegionUserRecvKey NVARCHAR(128) null,
24 RegionUserSendKey NVARCHAR(128) null,
25 ServerHttpPort INT null,
26 ServerRemotingPort INT null,
27 RegionMapTextureID NVARCHAR(36) null,
28 Owner_uuid NVARCHAR(36) null,
29 OriginUUID NVARCHAR(36) null,
30 primary key (Uuid)
31)
32create index region_handle on Regions (RegionHandle)
33create index region_name on Regions (RegionName)
34create index overrideHandles on Regions (EastOverrideHandle, WestOverrideHandle, SouthOverrideHandle, NorthOverrideHandle)
35
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql
deleted file mode 100644
index 82936c4..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql
+++ /dev/null
@@ -1,36 +0,0 @@
1create table InventoryFolders (
2 ID NVARCHAR(255) not null,
3 Type SMALLINT null,
4 Version INT null,
5 ParentID NVARCHAR(255) null,
6 Owner NVARCHAR(255) null,
7 Name NVARCHAR(64) null,
8 primary key (ID)
9)
10create table InventoryItems (
11 ID NVARCHAR(255) not null,
12 InvType INT null,
13 AssetType INT null,
14 AssetID NVARCHAR(255) null,
15 Folder NVARCHAR(255) null,
16 Owner NVARCHAR(255) null,
17 Creator NVARCHAR(255) null,
18 Name NVARCHAR(64) null,
19 Description NVARCHAR(64) null,
20 NextPermissions INT null,
21 CurrentPermissions INT null,
22 BasePermissions INT null,
23 EveryOnePermissions INT null,
24 GroupID NVARCHAR(255) null,
25 GroupOwned BIT null,
26 SalePrice INT null,
27 SaleType TINYINT null,
28 Flags INT null,
29 CreationDate INT null,
30 primary key (ID)
31)
32create index item_group_id on InventoryItems (GroupID)
33create index item_folder_id on InventoryItems (Folder)
34create index item_owner_id on InventoryItems (Owner)
35create index folder_owner_id on InventoryFolders (Owner)
36create index folder_parent_id on InventoryFolders (ParentID)
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql
deleted file mode 100644
index 181a74c..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql
+++ /dev/null
@@ -1,104 +0,0 @@
1create table Prims (
2 UUID NVARCHAR(255) not null,
3 ParentID INT null,
4 ParentUUID NVARCHAR(255) null,
5 RegionID NVARCHAR(255) null,
6 CreationDate INT null,
7 Name NVARCHAR(255) null,
8 Text NVARCHAR(255) null,
9 Description NVARCHAR(255) null,
10 SitName NVARCHAR(255) null,
11 TouchName NVARCHAR(255) null,
12 ObjectFlags INT null,
13 CreatorID NVARCHAR(255) null,
14 OwnerID NVARCHAR(255) null,
15 GroupID NVARCHAR(255) null,
16 LastOwnerID NVARCHAR(255) null,
17 OwnerMask INT null,
18 NextOwnerMask INT null,
19 GroupMask INT null,
20 EveryoneMask INT null,
21 BaseMask INT null,
22 PositionX REAL null,
23 PositionY REAL null,
24 PositionZ REAL null,
25 GroupPositionX REAL null,
26 GroupPositionY REAL null,
27 GroupPositionZ REAL null,
28 VelocityX REAL null,
29 VelocityY REAL null,
30 VelocityZ REAL null,
31 AngularVelocityX REAL null,
32 AngularVelocityY REAL null,
33 AngularVelocityZ REAL null,
34 AccelerationX REAL null,
35 AccelerationY REAL null,
36 AccelerationZ REAL null,
37 SitTargetOffsetX REAL null,
38 SitTargetOffsetY REAL null,
39 SitTargetOffsetZ REAL null,
40 RotationX REAL null,
41 RotationY REAL null,
42 RotationZ REAL null,
43 RotationW REAL null,
44 SitTargetOrientX REAL null,
45 SitTargetOrientY REAL null,
46 SitTargetOrientZ REAL null,
47 SitTargetOrientW REAL null,
48 ScaleX REAL null,
49 ScaleY REAL null,
50 ScaleZ REAL null,
51 PCode TINYINT null,
52 PathBegin INT null,
53 PathEnd INT null,
54 PathScaleX TINYINT null,
55 PathScaleY TINYINT null,
56 PathShearX TINYINT null,
57 PathShearY TINYINT null,
58 PathSkew TINYINT null,
59 PathCurve TINYINT null,
60 PathRadiusOffset TINYINT null,
61 PathRevolutions TINYINT null,
62 PathTaperX TINYINT null,
63 PathTaperY TINYINT null,
64 PathTwist TINYINT null,
65 ProfileBegin INT null,
66 ProfileEnd INT null,
67 ProfileCurve TINYINT null,
68 ProfileHollow INT null,
69 Texture VARBINARY(8000) null,
70 ExtraParams VARBINARY(8000) null,
71 State TINYINT null,
72 primary key (UUID)
73)
74
75create table PrimItems (
76 ItemID NVARCHAR(255) not null,
77 PrimID NVARCHAR(255) null,
78 AssetID NVARCHAR(255) null,
79 ParentFolderID NVARCHAR(255) null,
80 CreatorID NVARCHAR(255) null,
81 OwnerID NVARCHAR(255) null,
82 GroupID NVARCHAR(255) null,
83 LastOwnerID NVARCHAR(255) null,
84 CurrentPermissions INT null,
85 BasePermissions INT null,
86 EveryonePermissions INT null,
87 GroupPermissions INT null,
88 NextPermissions INT null,
89 Name NVARCHAR(255) null,
90 Description NVARCHAR(255) null,
91 CreationDate INT null,
92 Flags INT null,
93 Type INT null,
94 InvType INT null,
95 primary key (ItemID)
96)
97
98create table Terrain (
99 RegionID NVARCHAR(255) not null,
100 MapData VARBINARY(max) null,
101 primary key (RegionID)
102)
103
104
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql
deleted file mode 100644
index c9c6c89..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql
+++ /dev/null
@@ -1,77 +0,0 @@
1create table UserAgents (
2 ProfileID NVARCHAR(255) not null,
3 AgentIP NVARCHAR(24) null,
4 AgentPort INT null,
5 AgentOnline BIT null,
6 SessionID NVARCHAR(255) null,
7 SecureSessionID NVARCHAR(255) null,
8 InitialRegion NVARCHAR(255) null,
9 Region NVARCHAR(255) null,
10 LoginTime INT null,
11 LogoutTime INT null,
12 Handle BIGINT null,
13 primary key (ProfileID)
14)
15
16create table UserProfiles (
17 ID NVARCHAR(255) not null,
18 FirstName NVARCHAR(32) null,
19 SurName NVARCHAR(32) null,
20 PasswordHash NVARCHAR(32) null,
21 PasswordSalt NVARCHAR(32) null,
22 WebLoginKey NVARCHAR(255) null,
23 HomeRegionX INT null,
24 HomeRegionY INT null,
25 HomeLocationX REAL null,
26 HomeLocationY REAL null,
27 HomeLocationZ REAL null,
28 HomeLookAtX REAL null,
29 HomeLookAtY REAL null,
30 HomeLookAtZ REAL null,
31 Created INT null,
32 LastLogin INT null,
33 RootInventoryFolderID NVARCHAR(255) null,
34 UserInventoryURI NVARCHAR(255) null,
35 UserAssetURI NVARCHAR(255) null,
36 Image NVARCHAR(255) null,
37 FirstLifeImage NVARCHAR(255) null,
38 AboutText NVARCHAR(255) null,
39 FirstLifeAboutText NVARCHAR(255) null,
40 primary key (ID)
41)
42create table UserAppearances (
43 Owner NVARCHAR(255) not null,
44 BodyItem NVARCHAR(255) null,
45 BodyAsset NVARCHAR(255) null,
46 SkinItem NVARCHAR(255) null,
47 SkinAsset NVARCHAR(255) null,
48 HairItem NVARCHAR(255) null,
49 HairAsset NVARCHAR(255) null,
50 EyesItem NVARCHAR(255) null,
51 EyesAsset NVARCHAR(255) null,
52 ShirtItem NVARCHAR(255) null,
53 ShirtAsset NVARCHAR(255) null,
54 PantsItem NVARCHAR(255) null,
55 PantsAsset NVARCHAR(255) null,
56 ShoesItem NVARCHAR(255) null,
57 ShoesAsset NVARCHAR(255) null,
58 SocksItem NVARCHAR(255) null,
59 SocksAsset NVARCHAR(255) null,
60 JacketItem NVARCHAR(255) null,
61 JacketAsset NVARCHAR(255) null,
62 GlovesItem NVARCHAR(255) null,
63 GlovesAsset NVARCHAR(255) null,
64 UnderShirtItem NVARCHAR(255) null,
65 UnderShirtAsset NVARCHAR(255) null,
66 UnderPantsItem NVARCHAR(255) null,
67 UnderPantsAsset NVARCHAR(255) null,
68 SkirtItem NVARCHAR(255) null,
69 SkirtAsset NVARCHAR(255) null,
70 Texture VARBINARY(8000) null,
71 VisualParams VARBINARY(8000) null,
72 Serial INT null,
73 primary key (Owner)
74)
75
76create index user_surname on UserProfiles (SurName)
77create index user_firstname on UserProfiles (FirstName)
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql
deleted file mode 100644
index dfaac6e..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql
+++ /dev/null
@@ -1,51 +0,0 @@
1ALTER TABLE Prims ADD LinkNum INT null;
2ALTER TABLE Prims ADD Material TINYINT null;
3ALTER TABLE Prims ADD ScriptAccessPin INT null;
4ALTER TABLE Prims ADD TextureAnimation VARBINARY(max) null;
5ALTER TABLE Prims ADD ParticleSystem VARBINARY(max) null;
6ALTER TABLE Prims ADD ClickAction TINYINT null;
7ALTER TABLE Prims ADD Color INT null;
8
9CREATE TABLE RegionSettings
10(
11 RegionID NVARCHAR(255) NOT NULL,
12 BlockTerraform bit NOT NULL,
13 BlockFly bit NOT NULL,
14 AllowDamage bit NOT NULL,
15 RestrictPushing bit NOT NULL,
16 AllowLandResell bit NOT NULL,
17 AllowLandJoinDivide bit NOT NULL,
18 BlockShowInSearch bit NOT NULL,
19 AgentLimit int NOT NULL,
20 ObjectBonus float(53) NOT NULL,
21 Maturity int NOT NULL,
22 DisableScripts bit NOT NULL,
23 DisableCollisions bit NOT NULL,
24 DisablePhysics bit NOT NULL,
25 TerrainTexture1 NVARCHAR(36) NOT NULL,
26 TerrainTexture2 NVARCHAR(36) NOT NULL,
27 TerrainTexture3 NVARCHAR(36) NOT NULL,
28 TerrainTexture4 NVARCHAR(36) NOT NULL,
29 Elevation1NW float(53) NOT NULL,
30 Elevation2NW float(53) NOT NULL,
31 Elevation1NE float(53) NOT NULL,
32 Elevation2NE float(53) NOT NULL,
33 Elevation1SE float(53) NOT NULL,
34 Elevation2SE float(53) NOT NULL,
35 Elevation1SW float(53) NOT NULL,
36 Elevation2SW float(53) NOT NULL,
37 WaterHeight float(53) NOT NULL,
38 TerrainRaiseLimit float(53) NOT NULL,
39 TerrainLowerLimit float(53) NOT NULL,
40 UseEstateSun bit NOT NULL,
41 FixedSun bit NOT NULL,
42 SunPosition float(53) NOT NULL,
43 Covenant NVARCHAR(36) NULL DEFAULT (NULL),
44 Sandbox bit NOT NULL,
45 SunVectorX float(53) NOT NULL DEFAULT ((0)),
46 SunVectorY float(53) NOT NULL DEFAULT ((0)),
47 SunVectorZ float(53) NOT NULL DEFAULT ((0)),
48
49 primary key (RegionID)
50)
51
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql
deleted file mode 100644
index f5e0c00..0000000
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql
+++ /dev/null
@@ -1,27 +0,0 @@
1ALTER TABLE UserAgents ADD PositionX REAL null;
2ALTER TABLE UserAgents ADD PositionY REAL null;
3ALTER TABLE UserAgents ADD PositionZ REAL null;
4ALTER TABLE UserAgents ADD LookAtX REAL null;
5ALTER TABLE UserAgents ADD LookAtY REAL null;
6ALTER TABLE UserAgents ADD LookAtZ REAL null;
7
8ALTER TABLE UserProfiles ADD Email NVARCHAR(250) null;
9ALTER TABLE UserProfiles ADD HomeRegionID NVARCHAR(36) null;
10ALTER TABLE UserProfiles ADD CanDoMask INT null;
11ALTER TABLE UserProfiles ADD WantDoMask INT null;
12ALTER TABLE UserProfiles ADD UserFlags INT null;
13ALTER TABLE UserProfiles ADD GodLevel INT null;
14ALTER TABLE UserProfiles ADD CustomType NVARCHAR(32) null;
15ALTER TABLE UserProfiles ADD Partner NVARCHAR(36) null;
16
17ALTER TABLE UserAppearances ADD AvatarHeight FLOAT null;
18
19CREATE TABLE UserFriends (
20 UserFriendID NVARCHAR(36) NOT NULL,
21 OwnerID NVARCHAR(36) NULL,
22 FriendID NVARCHAR(36) NULL,
23 FriendPermissions INT NULL,
24 PRIMARY KEY (UserFriendID)
25);
26
27CREATE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
deleted file mode 100644
index cd0958d..0000000
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1CREATE TABLE Assets (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Name VARCHAR(64) DEFAULT NULL,
5 Description VARCHAR(64) DEFAULT NULL,
6 Local BIT DEFAULT NULL,
7 Temporary BIT DEFAULT NULL,
8 Data LONGBLOB,
9 PRIMARY KEY (ID)
10) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql
deleted file mode 100644
index e9ae07e..0000000
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql
+++ /dev/null
@@ -1,71 +0,0 @@
1CREATE TABLE EstateSettings (
2 EstateID INT NOT NULL,
3 ParentEstateID INT DEFAULT NULL,
4 EstateOwnerID VARCHAR(36) DEFAULT NULL,
5 Name VARCHAR(64) DEFAULT NULL,
6 RedirectGridX INT DEFAULT NULL,
7 RedirectGridY INT DEFAULT NULL,
8 BillableFactor DOUBLE DEFAULT NULL,
9 PricePerMeter INT DEFAULT NULL,
10 SunPosition DOUBLE DEFAULT NULL,
11
12 UseGlobalTime BIT DEFAULT NULL,
13 FixedSun BIT DEFAULT NULL,
14 AllowVoice BIT DEFAULT NULL,
15 AllowDirectTeleport BIT DEFAULT NULL,
16 ResetHomeOnTeleport BIT DEFAULT NULL,
17 PublicAccess BIT DEFAULT NULL,
18 DenyAnonymous BIT DEFAULT NULL,
19 DenyIdentified BIT DEFAULT NULL,
20 DenyTransacted BIT DEFAULT NULL,
21 DenyMinors BIT DEFAULT NULL,
22 BlockDwell BIT DEFAULT NULL,
23 EstateSkipScripts BIT DEFAULT NULL,
24 TaxFree BIT DEFAULT NULL,
25 AbuseEmailToEstateOwner BIT DEFAULT NULL,
26
27 AbuseEmail VARCHAR(255) DEFAULT NULL,
28
29 PRIMARY KEY (EstateID)
30) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
31
32CREATE TABLE EstateRegionLink (
33 EstateRegionLinkID VARCHAR(36) NOT NULL,
34 EstateID INT DEFAULT NULL,
35 RegionID VARCHAR(36) DEFAULT NULL,
36 PRIMARY KEY (EstateRegionLinkID)
37) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
38
39CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
40CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
41
42CREATE TABLE EstateManagers (
43 EstateID INT NOT NULL,
44 ManagerID VARCHAR(36) NOT NULL,
45 ArrayIndex INT NOT NULL,
46 PRIMARY KEY (EstateID,ArrayIndex)
47) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
48
49CREATE TABLE EstateUsers (
50 EstateID INT NOT NULL,
51 UserID VARCHAR(36) NOT NULL,
52 ArrayIndex INT NOT NULL,
53 PRIMARY KEY (EstateID,ArrayIndex)
54) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
55
56CREATE TABLE EstateGroups (
57 EstateID INT NOT NULL,
58 GroupID VARCHAR(36) NOT NULL,
59 ArrayIndex INT NOT NULL,
60 PRIMARY KEY (EstateID,ArrayIndex)
61) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
62
63CREATE TABLE EstateBans (
64 EstateID INT NOT NULL,
65 ArrayIndex INT NOT NULL,
66 BannedUserID VARCHAR(36) NOT NULL,
67 BannedHostAddress VARCHAR(16) NOT NULL,
68 BannedHostIPMask VARCHAR(16) NOT NULL,
69 BannedHostNameMask VARCHAR(16) NOT NULL,
70 PRIMARY KEY (EstateID,ArrayIndex)
71) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
deleted file mode 100644
index c6fe620..0000000
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
+++ /dev/null
@@ -1,35 +0,0 @@
1CREATE TABLE Regions (
2 RegionID VARCHAR(36) NOT NULL,
3 OwnerID VARCHAR(36) DEFAULT NULL,
4 OriginID VARCHAR(36) DEFAULT NULL,
5 RegionHandle BIGINT DEFAULT NULL,
6 RegionName VARCHAR(32) DEFAULT NULL,
7 RegionRecvKey VARCHAR(128) DEFAULT NULL,
8 RegionSendKey VARCHAR(128) DEFAULT NULL,
9 RegionSecret VARCHAR(128) DEFAULT NULL,
10 RegionDataURI VARCHAR(255) DEFAULT NULL,
11 ServerIP VARCHAR(64) DEFAULT NULL,
12 ServerPort INT DEFAULT NULL,
13 ServerURI VARCHAR(255) DEFAULT NULL,
14 RegionLocX INT DEFAULT NULL,
15 RegionLocY INT DEFAULT NULL,
16 RegionLocZ INT DEFAULT NULL,
17 EastOverrideHandle BIGINT DEFAULT NULL,
18 WestOverrideHandle BIGINT DEFAULT NULL,
19 SouthOverrideHandle BIGINT DEFAULT NULL,
20 NorthOverrideHandle BIGINT DEFAULT NULL,
21 RegionAssetURI VARCHAR(255) DEFAULT NULL,
22 RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
23 RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
24 RegionUserURI VARCHAR(255) DEFAULT NULL,
25 RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
26 RegionUserSendKey VARCHAR(128) DEFAULT NULL,
27 RegionMapTextureId VARCHAR(36) DEFAULT NULL,
28 ServerHttpPort INT DEFAULT NULL,
29 ServerRemotingPort INT DEFAULT NULL,
30 PRIMARY KEY (RegionID)
31) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
32
33CREATE INDEX RegionNameIndex ON Regions (RegionName);
34CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
35CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
deleted file mode 100644
index 93d282b..0000000
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
+++ /dev/null
@@ -1,39 +0,0 @@
1CREATE TABLE InventoryFolders (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Version INT DEFAULT NULL,
5 ParentID VARCHAR(36) DEFAULT NULL,
6 Owner VARCHAR(36) DEFAULT NULL,
7 Name VARCHAR(64) DEFAULT NULL,
8 PRIMARY KEY (ID)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
10
11CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
12CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
13
14CREATE TABLE InventoryItems (
15 ID VARCHAR(36) NOT NULL,
16 InvType INT DEFAULT NULL,
17 AssetType INT DEFAULT NULL,
18 AssetID VARCHAR(36) DEFAULT NULL,
19 Folder VARCHAR(36) DEFAULT NULL,
20 Owner VARCHAR(36) DEFAULT NULL,
21 Creator VARCHAR(36) DEFAULT NULL,
22 Name VARCHAR(64) DEFAULT NULL,
23 Description VARCHAR(64) DEFAULT NULL,
24 NextPermissions INT DEFAULT NULL,
25 CurrentPermissions INT DEFAULT NULL,
26 BasePermissions INT DEFAULT NULL,
27 EveryOnePermissions INT DEFAULT NULL,
28 GroupID VARCHAR(36) DEFAULT NULL,
29 GroupOwned BIT DEFAULT NULL,
30 SalePrice INT DEFAULT NULL,
31 SaleType TINYINT DEFAULT NULL,
32 Flags INT DEFAULT NULL,
33 CreationDate INT DEFAULT NULL,
34 PRIMARY KEY (ID)
35) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
36
37CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
38CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
39CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
deleted file mode 100644
index eb1d8fe..0000000
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
+++ /dev/null
@@ -1,169 +0,0 @@
1CREATE TABLE Prims (
2 UUID VARCHAR(36) NOT NULL,
3 RegionID VARCHAR(36) DEFAULT NULL,
4 GroupID VARCHAR(36) DEFAULT NULL,
5 ParentID INT DEFAULT NULL,
6 ParentUUID VARCHAR(36) DEFAULT NULL,
7 OwnerID VARCHAR(36) DEFAULT NULL,
8 LastOwnerID VARCHAR(36) DEFAULT NULL,
9 CreatorID VARCHAR(36) DEFAULT NULL,
10 CreationDate INT DEFAULT NULL,
11 LinkNum INT DEFAULT NULL,
12 Name VARCHAR(255) DEFAULT NULL,
13 Text VARCHAR(255) DEFAULT NULL,
14 Description VARCHAR(255) DEFAULT NULL,
15 SitName VARCHAR(255) DEFAULT NULL,
16 TouchName VARCHAR(255) DEFAULT NULL,
17 ObjectFlags INT DEFAULT NULL,
18 OwnerMask INT DEFAULT NULL,
19 NextOwnerMask INT DEFAULT NULL,
20 GroupMask INT DEFAULT NULL,
21 EveryoneMask INT DEFAULT NULL,
22 BaseMask INT DEFAULT NULL,
23 Material TINYINT DEFAULT NULL,
24 ScriptAccessPin INT DEFAULT NULL,
25 TextureAnimation BLOB,
26 ParticleSystem BLOB,
27 ClickAction TINYINT DEFAULT NULL,
28 Color INT DEFAULT NULL,
29 PositionX DOUBLE DEFAULT NULL,
30 PositionY DOUBLE DEFAULT NULL,
31 PositionZ DOUBLE DEFAULT NULL,
32 GroupPositionX DOUBLE DEFAULT NULL,
33 GroupPositionY DOUBLE DEFAULT NULL,
34 GroupPositionZ DOUBLE DEFAULT NULL,
35 VelocityX DOUBLE DEFAULT NULL,
36 VelocityY DOUBLE DEFAULT NULL,
37 VelocityZ DOUBLE DEFAULT NULL,
38 AngularVelocityX DOUBLE DEFAULT NULL,
39 AngularVelocityY DOUBLE DEFAULT NULL,
40 AngularVelocityZ DOUBLE DEFAULT NULL,
41 AccelerationX DOUBLE DEFAULT NULL,
42 AccelerationY DOUBLE DEFAULT NULL,
43 AccelerationZ DOUBLE DEFAULT NULL,
44 RotationX DOUBLE DEFAULT NULL,
45 RotationY DOUBLE DEFAULT NULL,
46 RotationZ DOUBLE DEFAULT NULL,
47 RotationW DOUBLE DEFAULT NULL,
48 SitTargetOffsetX DOUBLE DEFAULT NULL,
49 SitTargetOffsetY DOUBLE DEFAULT NULL,
50 SitTargetOffsetZ DOUBLE DEFAULT NULL,
51 SitTargetOrientW DOUBLE DEFAULT NULL,
52 SitTargetOrientX DOUBLE DEFAULT NULL,
53 SitTargetOrientY DOUBLE DEFAULT NULL,
54 SitTargetOrientZ DOUBLE DEFAULT NULL,
55 -- this is the shape
56 Shape INT DEFAULT NULL,
57 ScaleX DOUBLE DEFAULT NULL,
58 ScaleY DOUBLE DEFAULT NULL,
59 ScaleZ DOUBLE DEFAULT NULL,
60 PCode INT DEFAULT NULL,
61 PathBegin INT DEFAULT NULL,
62 PathEnd INT DEFAULT NULL,
63 PathScaleX INT DEFAULT NULL,
64 PathScaleY INT DEFAULT NULL,
65 PathShearX INT DEFAULT NULL,
66 PathShearY INT DEFAULT NULL,
67 PathSkew INT DEFAULT NULL,
68 PathCurve INT DEFAULT NULL,
69 PathRadiusOffset INT DEFAULT NULL,
70 PathRevolutions INT DEFAULT NULL,
71 PathTaperX INT DEFAULT NULL,
72 PathTaperY INT DEFAULT NULL,
73 PathTwist INT DEFAULT NULL,
74 ProfileBegin INT DEFAULT NULL,
75 ProfileEnd INT DEFAULT NULL,
76 ProfileCurve INT DEFAULT NULL,
77 ProfileHollow INT DEFAULT NULL,
78 State INT DEFAULT NULL,
79 Texture LONGBLOB,
80 ExtraParams LONGBLOB,
81 PRIMARY KEY (UUID)
82) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
83
84CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
85CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
86
87CREATE TABLE Terrain (
88 RegionID VARCHAR(36) not null,
89 MapData LONGBLOB,
90 PRIMARY KEY (RegionID)
91) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
92
93CREATE TABLE PrimItems (
94 ItemID VARCHAR(36) NOT NULL,
95 GroupID VARCHAR(36) DEFAULT NULL,
96 PrimID VARCHAR(36) DEFAULT NULL,
97 ParentFolderID VARCHAR(36) DEFAULT NULL,
98 AssetID VARCHAR(36) DEFAULT NULL,
99 OwnerID VARCHAR(36) DEFAULT NULL,
100 LastOwnerID VARCHAR(36) DEFAULT NULL,
101 CreatorID VARCHAR(36) DEFAULT NULL,
102 CreationDate BIGINT DEFAULT NULL,
103 Type INT DEFAULT NULL,
104 InvType INT DEFAULT NULL,
105 Name VARCHAR(255) DEFAULT NULL,
106 Description VARCHAR(255) DEFAULT NULL,
107 NextPermissions INT DEFAULT NULL,
108 CurrentPermissions INT DEFAULT NULL,
109 BasePermissions INT DEFAULT NULL,
110 EveryonePermissions INT DEFAULT NULL,
111 GroupPermissions INT DEFAULT NULL,
112 Flags INT DEFAULT NULL,
113 PRIMARY KEY (ItemID)
114) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
115
116CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
117
118CREATE TABLE RegionSettings (
119 RegionID VARCHAR(36) NOT NULL,
120
121 BlockTerraform BIT DEFAULT NULL,
122 BlockFly BIT DEFAULT NULL,
123 AllowDamage BIT DEFAULT NULL,
124 RestrictPushing BIT DEFAULT NULL,
125 AllowLandResell BIT DEFAULT NULL,
126 AllowLandJoinDivide BIT DEFAULT NULL,
127 BlockShowInSearch BIT DEFAULT NULL,
128
129 AgentLimit INT DEFAULT NULL,
130 ObjectBonus DOUBLE DEFAULT NULL,
131 Maturity INT DEFAULT NULL,
132
133 DisableScripts BIT DEFAULT NULL,
134 DisableCollisions BIT DEFAULT NULL,
135 DisablePhysics BIT DEFAULT NULL,
136
137 TerrainTexture1 VARCHAR(36) DEFAULT NULL,
138 TerrainTexture2 VARCHAR(36) DEFAULT NULL,
139 TerrainTexture3 VARCHAR(36) DEFAULT NULL,
140 TerrainTexture4 VARCHAR(36) DEFAULT NULL,
141
142 Elevation1NW DOUBLE DEFAULT NULL,
143 Elevation2NW DOUBLE DEFAULT NULL,
144 Elevation1NE DOUBLE DEFAULT NULL,
145 Elevation2NE DOUBLE DEFAULT NULL,
146 Elevation1SE DOUBLE DEFAULT NULL,
147 Elevation2SE DOUBLE DEFAULT NULL,
148 Elevation1SW DOUBLE DEFAULT NULL,
149 Elevation2SW DOUBLE DEFAULT NULL,
150
151 WaterHeight DOUBLE DEFAULT NULL,
152 TerrainRaiseLimit DOUBLE DEFAULT NULL,
153 TerrainLowerLimit DOUBLE DEFAULT NULL,
154
155 UseEstateSun BIT DEFAULT NULL,
156 Sandbox BIT DEFAULT NULL,
157
158 SunVectorX DOUBLE DEFAULT NULL,
159 SunVectorY DOUBLE DEFAULT NULL,
160 SunVectorZ DOUBLE DEFAULT NULL,
161
162 FixedSun BIT DEFAULT NULL,
163 SunPosition DOUBLE DEFAULT NULL,
164
165 Covenant VARCHAR(36) DEFAULT NULL,
166
167 PRIMARY KEY (RegionID)
168) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
169
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
deleted file mode 100644
index 140aea4..0000000
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
+++ /dev/null
@@ -1,104 +0,0 @@
1CREATE TABLE UserAgents (
2 ProfileID VARCHAR(36) NOT NULL,
3 AgentIP VARCHAR(24) DEFAULT NULL,
4 AgentPort INT DEFAULT NULL,
5 AgentOnline BIT DEFAULT NULL,
6 SessionID VARCHAR(36) DEFAULT NULL,
7 SecureSessionID VARCHAR(36) DEFAULT NULL,
8 InitialRegion VARCHAR(255) DEFAULT NULL,
9 Region VARCHAR(255) DEFAULT NULL,
10 LoginTime INT DEFAULT NULL,
11 LogoutTime INT DEFAULT NULL,
12 Handle BIGINT DEFAULT NULL,
13 PositionX DOUBLE DEFAULT NULL,
14 PositionY DOUBLE DEFAULT NULL,
15 PositionZ DOUBLE DEFAULT NULL,
16 LookAtX DOUBLE DEFAULT NULL,
17 LookAtY DOUBLE DEFAULT NULL,
18 LookAtZ DOUBLE DEFAULT NULL,
19 PRIMARY KEY (ProfileID)
20) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
21
22CREATE TABLE UserProfiles (
23 ID VARCHAR(36) NOT NULL,
24 WebLoginKey VARCHAR(36) DEFAULT NULL,
25 FirstName VARCHAR(32) DEFAULT NULL,
26 SurName VARCHAR(32) DEFAULT NULL,
27 Email VARCHAR(250) DEFAULT NULL,
28 PasswordHash VARCHAR(32) DEFAULT NULL,
29 PasswordSalt VARCHAR(32) DEFAULT NULL,
30 HomeRegionID VARCHAR(36) DEFAULT NULL,
31 HomeRegionX INT DEFAULT NULL,
32 HomeRegionY INT DEFAULT NULL,
33 HomeLocationX DOUBLE DEFAULT NULL,
34 HomeLocationY DOUBLE DEFAULT NULL,
35 HomeLocationZ DOUBLE DEFAULT NULL,
36 HomeLookAtX DOUBLE DEFAULT NULL,
37 HomeLookAtY DOUBLE DEFAULT NULL,
38 HomeLookAtZ DOUBLE DEFAULT NULL,
39 Created INT DEFAULT NULL,
40 LastLogin INT DEFAULT NULL,
41 UserInventoryURI VARCHAR(255) DEFAULT NULL,
42 UserAssetURI VARCHAR(255) DEFAULT NULL,
43 Image VARCHAR(36) DEFAULT NULL,
44 FirstLifeImage VARCHAR(36) DEFAULT NULL,
45 AboutText TEXT DEFAULT NULL,
46 FirstLifeAboutText TEXT DEFAULT NULL,
47 CanDoMask INT DEFAULT NULL,
48 WantDoMask INT DEFAULT NULL,
49 UserFlags INT DEFAULT NULL,
50 GodLevel INT DEFAULT NULL,
51 CustomType VARCHAR(32) DEFAULT NULL,
52 Partner VARCHAR(36) DEFAULT NULL,
53 RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
54 PRIMARY KEY (ID)
55) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
56
57CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
58CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
59CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
60
61CREATE TABLE UserAppearances (
62 Owner VARCHAR(36) NOT NULL,
63 BodyItem VARCHAR(36) DEFAULT NULL,
64 BodyAsset VARCHAR(36) DEFAULT NULL,
65 SkinItem VARCHAR(36) DEFAULT NULL,
66 SkinAsset VARCHAR(36) DEFAULT NULL,
67 HairItem VARCHAR(36) DEFAULT NULL,
68 HairAsset VARCHAR(36) DEFAULT NULL,
69 EyesItem VARCHAR(36) DEFAULT NULL,
70 EyesAsset VARCHAR(36) DEFAULT NULL,
71 ShirtItem VARCHAR(36) DEFAULT NULL,
72 ShirtAsset VARCHAR(36) DEFAULT NULL,
73 PantsItem VARCHAR(36) DEFAULT NULL,
74 PantsAsset VARCHAR(36) DEFAULT NULL,
75 ShoesItem VARCHAR(36) DEFAULT NULL,
76 ShoesAsset VARCHAR(36) DEFAULT NULL,
77 SocksItem VARCHAR(36) DEFAULT NULL,
78 SocksAsset VARCHAR(36) DEFAULT NULL,
79 JacketItem VARCHAR(36) DEFAULT NULL,
80 JacketAsset VARCHAR(36) DEFAULT NULL,
81 GlovesItem VARCHAR(36) DEFAULT NULL,
82 GlovesAsset VARCHAR(36) DEFAULT NULL,
83 UnderShirtItem VARCHAR(36) DEFAULT NULL,
84 UnderShirtAsset VARCHAR(36) DEFAULT NULL,
85 UnderPantsItem VARCHAR(36) DEFAULT NULL,
86 UnderPantsAsset VARCHAR(36) DEFAULT NULL,
87 SkirtItem VARCHAR(36) DEFAULT NULL,
88 SkirtAsset VARCHAR(36) DEFAULT NULL,
89 Texture LONGBLOB,
90 VisualParams LONGBLOB,
91 Serial INT DEFAULT NULL,
92 AvatarHeight FLOAT DEFAULT NULL,
93 PRIMARY KEY (Owner)
94) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
95
96CREATE TABLE UserFriends (
97 UserFriendID VARCHAR(36) NOT NULL,
98 OwnerID VARCHAR(36) DEFAULT NULL,
99 FriendID VARCHAR(36) DEFAULT NULL,
100 FriendPermissions INT DEFAULT NULL,
101 PRIMARY KEY (UserFriendID)
102) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
103
104CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
diff --git a/OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml b/OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml
deleted file mode 100644
index 37b23cb..0000000
--- a/OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
1<Addin id="OpenSim.Data.NHibernate" version="0.1">
2 <Runtime>
3 <Import assembly="OpenSim.Data.NHibernate.dll"/>
4 </Runtime>
5 <Dependencies>
6 <Addin id="OpenSim.Data" version="0.5" />
7 </Dependencies>
8 <Extension path = "/OpenSim/GridData">
9 <Plugin id="NHibernateGridData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateGridData" />
10 </Extension>
11 <!-- <Extension path = "/OpenSim/LogData">
12 <Plugin id="MySQLLogData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLLogData" />
13 </Extension> -->
14 <Extension path = "/OpenSim/AssetData">
15 <Plugin id="NHibernateAssetData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateAssetData" />
16 </Extension>
17 <Extension path = "/OpenSim/InventoryData">
18 <Plugin id="NHibernateInventoryData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateInventoryData" />
19 </Extension>
20 <Extension path = "/OpenSim/UserData">
21 <Plugin id="NHibernateUserData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateUserData" />
22 </Extension>
23</Addin>
diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql
deleted file mode 100644
index 4753123..0000000
--- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1CREATE TABLE Assets (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Name VARCHAR(64) DEFAULT NULL,
5 Description VARCHAR(64) DEFAULT NULL,
6 Local BOOLEAN DEFAULT NULL,
7 Temporary BOOLEAN DEFAULT NULL,
8 Data BYTEA,
9 PRIMARY KEY (ID)
10);
diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql
deleted file mode 100644
index 3f47930..0000000
--- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql
+++ /dev/null
@@ -1,72 +0,0 @@
1CREATE TABLE EstateSettings (
2 EstateID INT NOT NULL,
3 ParentEstateID INT DEFAULT NULL,
4 EstateOwnerID VARCHAR(36) DEFAULT NULL,
5 Name VARCHAR(64) DEFAULT NULL,
6 RedirectGridX INT DEFAULT NULL,
7 RedirectGridY INT DEFAULT NULL,
8 BillableFactor DOUBLE PRECISION DEFAULT NULL,
9 PricePerMeter INT DEFAULT NULL,
10 SunPosition DOUBLE PRECISION DEFAULT NULL,
11
12 UseGlobalTime BOOLEAN DEFAULT NULL,
13 FixedSun BOOLEAN DEFAULT NULL,
14 AllowVoice BOOLEAN DEFAULT NULL,
15 AllowDirectTeleport BOOLEAN DEFAULT NULL,
16 ResetHomeOnTeleport BOOLEAN DEFAULT NULL,
17 PublicAccess BOOLEAN DEFAULT NULL,
18 DenyAnonymous BOOLEAN DEFAULT NULL,
19 DenyIdentified BOOLEAN DEFAULT NULL,
20 DenyTransacted BOOLEAN DEFAULT NULL,
21 DenyMinors BOOLEAN DEFAULT NULL,
22 BlockDwell BOOLEAN DEFAULT NULL,
23 EstateSkipScripts BOOLEAN DEFAULT NULL,
24 TaxFree BOOLEAN DEFAULT NULL,
25 AbuseEmailToEstateOwner BOOLEAN DEFAULT NULL,
26
27 AbuseEmail VARCHAR(255) DEFAULT NULL,
28
29 PRIMARY KEY (EstateID)
30);
31
32CREATE TABLE EstateRegionLink (
33 EstateRegionLinkID VARCHAR(36) NOT NULL,
34 EstateID INT DEFAULT NULL,
35 RegionID VARCHAR(36) DEFAULT NULL,
36 PRIMARY KEY (EstateRegionLinkID)
37);
38
39CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
40CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
41
42
43CREATE TABLE EstateManagers (
44 EstateID INT NOT NULL,
45 ManagerID VARCHAR(36) NOT NULL,
46 ArrayIndex INT NOT NULL,
47 PRIMARY KEY (EstateID,ArrayIndex)
48);
49
50CREATE TABLE EstateUsers (
51 EstateID INT NOT NULL,
52 UserID VARCHAR(36) NOT NULL,
53 ArrayIndex INT NOT NULL,
54 PRIMARY KEY (EstateID,ArrayIndex)
55);
56
57CREATE TABLE EstateGroups (
58 EstateID INT NOT NULL,
59 GroupID VARCHAR(36) NOT NULL,
60 ArrayIndex INT NOT NULL,
61 PRIMARY KEY (EstateID,ArrayIndex)
62);
63
64CREATE TABLE EstateBans (
65 EstateID INT NOT NULL,
66 ArrayIndex INT NOT NULL,
67 BannedUserID VARCHAR(36) NOT NULL,
68 BannedHostAddress VARCHAR(16) NOT NULL,
69 BannedHostIPMask VARCHAR(16) NOT NULL,
70 BannedHostNameMask VARCHAR(16) NOT NULL,
71 PRIMARY KEY (EstateID,ArrayIndex)
72); \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql
deleted file mode 100644
index 4366c1e..0000000
--- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql
+++ /dev/null
@@ -1,35 +0,0 @@
1CREATE TABLE Regions (
2 RegionID VARCHAR(36) NOT NULL,
3 OwnerID VARCHAR(36) DEFAULT NULL,
4 OriginID VARCHAR(36) DEFAULT NULL,
5 RegionHandle BIGINT DEFAULT NULL,
6 RegionName VARCHAR(32) DEFAULT NULL,
7 RegionRecvKey VARCHAR(128) DEFAULT NULL,
8 RegionSendKey VARCHAR(128) DEFAULT NULL,
9 RegionSecret VARCHAR(128) DEFAULT NULL,
10 RegionDataURI VARCHAR(255) DEFAULT NULL,
11 ServerIP VARCHAR(64) DEFAULT NULL,
12 ServerPort INT DEFAULT NULL,
13 ServerURI VARCHAR(255) DEFAULT NULL,
14 RegionLocX INT DEFAULT NULL,
15 RegionLocY INT DEFAULT NULL,
16 RegionLocZ INT DEFAULT NULL,
17 EastOverrideHandle BIGINT DEFAULT NULL,
18 WestOverrideHandle BIGINT DEFAULT NULL,
19 SouthOverrideHandle BIGINT DEFAULT NULL,
20 NorthOverrideHandle BIGINT DEFAULT NULL,
21 RegionAssetURI VARCHAR(255) DEFAULT NULL,
22 RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
23 RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
24 RegionUserURI VARCHAR(255) DEFAULT NULL,
25 RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
26 RegionUserSendKey VARCHAR(128) DEFAULT NULL,
27 RegionMapTextureId VARCHAR(36) DEFAULT NULL,
28 ServerHttpPort INT DEFAULT NULL,
29 ServerRemotingPort INT DEFAULT NULL,
30 PRIMARY KEY (RegionID)
31);
32
33CREATE INDEX RegionNameIndex ON Regions (RegionName);
34CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
35CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql
deleted file mode 100644
index 42af659..0000000
--- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql
+++ /dev/null
@@ -1,39 +0,0 @@
1CREATE TABLE InventoryFolders (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Version INT DEFAULT NULL,
5 ParentID VARCHAR(36) DEFAULT NULL,
6 Owner VARCHAR(36) DEFAULT NULL,
7 Name VARCHAR(64) DEFAULT NULL,
8 PRIMARY KEY (ID)
9);
10
11CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
12CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
13
14CREATE TABLE InventoryItems (
15 ID VARCHAR(36) NOT NULL,
16 InvType INT DEFAULT NULL,
17 AssetType INT DEFAULT NULL,
18 AssetID VARCHAR(36) DEFAULT NULL,
19 Folder VARCHAR(36) DEFAULT NULL,
20 Owner VARCHAR(36) DEFAULT NULL,
21 Creator VARCHAR(36) DEFAULT NULL,
22 Name VARCHAR(64) DEFAULT NULL,
23 Description VARCHAR(64) DEFAULT NULL,
24 NextPermissions INT DEFAULT NULL,
25 CurrentPermissions INT DEFAULT NULL,
26 BasePermissions INT DEFAULT NULL,
27 EveryOnePermissions INT DEFAULT NULL,
28 GroupID VARCHAR(36) DEFAULT NULL,
29 GroupOwned BOOLEAN DEFAULT NULL,
30 SalePrice INT DEFAULT NULL,
31 SaleType SMALLINT DEFAULT NULL,
32 Flags INT DEFAULT NULL,
33 CreationDate INT DEFAULT NULL,
34 PRIMARY KEY (ID)
35);
36
37CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
38CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
39CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql
deleted file mode 100644
index f4a0e68..0000000
--- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql
+++ /dev/null
@@ -1,169 +0,0 @@
1CREATE TABLE Prims (
2 UUID VARCHAR(36) NOT NULL,
3 RegionID VARCHAR(36) DEFAULT NULL,
4 GroupID VARCHAR(36) DEFAULT NULL,
5 ParentID INT DEFAULT NULL,
6 ParentUUID VARCHAR(36) DEFAULT NULL,
7 OwnerID VARCHAR(36) DEFAULT NULL,
8 LastOwnerID VARCHAR(36) DEFAULT NULL,
9 CreatorID VARCHAR(36) DEFAULT NULL,
10 CreationDate INT DEFAULT NULL,
11 LinkNum INT DEFAULT NULL,
12 Name VARCHAR(255) DEFAULT NULL,
13 Text VARCHAR(255) DEFAULT NULL,
14 Description VARCHAR(255) DEFAULT NULL,
15 SitName VARCHAR(255) DEFAULT NULL,
16 TouchName VARCHAR(255) DEFAULT NULL,
17 ObjectFlags INT DEFAULT NULL,
18 OwnerMask INT DEFAULT NULL,
19 NextOwnerMask INT DEFAULT NULL,
20 GroupMask INT DEFAULT NULL,
21 EveryoneMask INT DEFAULT NULL,
22 BaseMask INT DEFAULT NULL,
23 Material SMALLINT DEFAULT NULL,
24 ScriptAccessPin INT DEFAULT NULL,
25 TextureAnimation BYTEA,
26 ParticleSystem BYTEA,
27 ClickAction SMALLINT DEFAULT NULL,
28 Color INT DEFAULT NULL,
29 PositionX DOUBLE PRECISION DEFAULT NULL,
30 PositionY DOUBLE PRECISION DEFAULT NULL,
31 PositionZ DOUBLE PRECISION DEFAULT NULL,
32 GroupPositionX DOUBLE PRECISION DEFAULT NULL,
33 GroupPositionY DOUBLE PRECISION DEFAULT NULL,
34 GroupPositionZ DOUBLE PRECISION DEFAULT NULL,
35 VelocityX DOUBLE PRECISION DEFAULT NULL,
36 VelocityY DOUBLE PRECISION DEFAULT NULL,
37 VelocityZ DOUBLE PRECISION DEFAULT NULL,
38 AngularVelocityX DOUBLE PRECISION DEFAULT NULL,
39 AngularVelocityY DOUBLE PRECISION DEFAULT NULL,
40 AngularVelocityZ DOUBLE PRECISION DEFAULT NULL,
41 AccelerationX DOUBLE PRECISION DEFAULT NULL,
42 AccelerationY DOUBLE PRECISION DEFAULT NULL,
43 AccelerationZ DOUBLE PRECISION DEFAULT NULL,
44 RotationX DOUBLE PRECISION DEFAULT NULL,
45 RotationY DOUBLE PRECISION DEFAULT NULL,
46 RotationZ DOUBLE PRECISION DEFAULT NULL,
47 RotationW DOUBLE PRECISION DEFAULT NULL,
48 SitTargetOffsetX DOUBLE PRECISION DEFAULT NULL,
49 SitTargetOffsetY DOUBLE PRECISION DEFAULT NULL,
50 SitTargetOffsetZ DOUBLE PRECISION DEFAULT NULL,
51 SitTargetOrientW DOUBLE PRECISION DEFAULT NULL,
52 SitTargetOrientX DOUBLE PRECISION DEFAULT NULL,
53 SitTargetOrientY DOUBLE PRECISION DEFAULT NULL,
54 SitTargetOrientZ DOUBLE PRECISION DEFAULT NULL,
55 -- this is the shape
56 Shape INT DEFAULT NULL,
57 ScaleX DOUBLE PRECISION DEFAULT NULL,
58 ScaleY DOUBLE PRECISION DEFAULT NULL,
59 ScaleZ DOUBLE PRECISION DEFAULT NULL,
60 PCode INT DEFAULT NULL,
61 PathBegin INT DEFAULT NULL,
62 PathEnd INT DEFAULT NULL,
63 PathScaleX INT DEFAULT NULL,
64 PathScaleY INT DEFAULT NULL,
65 PathShearX INT DEFAULT NULL,
66 PathShearY INT DEFAULT NULL,
67 PathSkew SMALLINT DEFAULT NULL,
68 PathCurve INT DEFAULT NULL,
69 PathRadiusOffset SMALLINT DEFAULT NULL,
70 PathRevolutions INT DEFAULT NULL,
71 PathTaperX SMALLINT DEFAULT NULL,
72 PathTaperY SMALLINT DEFAULT NULL,
73 PathTwist SMALLINT DEFAULT NULL,
74 ProfileBegin INT DEFAULT NULL,
75 ProfileEnd INT DEFAULT NULL,
76 ProfileCurve INT DEFAULT NULL,
77 ProfileHollow INT DEFAULT NULL,
78 State INT DEFAULT NULL,
79 Texture BYTEA,
80 ExtraParams BYTEA,
81 PRIMARY KEY (UUID)
82);
83
84CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
85CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
86
87CREATE TABLE Terrain (
88 RegionID VARCHAR(36) not null,
89 MapData BYTEA,
90 PRIMARY KEY (RegionID)
91);
92
93CREATE TABLE PrimItems (
94 ItemID VARCHAR(36) NOT NULL,
95 GroupID VARCHAR(36) DEFAULT NULL,
96 PrimID VARCHAR(36) DEFAULT NULL,
97 ParentFolderID VARCHAR(36) DEFAULT NULL,
98 AssetID VARCHAR(36) DEFAULT NULL,
99 OwnerID VARCHAR(36) DEFAULT NULL,
100 LastOwnerID VARCHAR(36) DEFAULT NULL,
101 CreatorID VARCHAR(36) DEFAULT NULL,
102 CreationDate INT DEFAULT NULL,
103 Type INT DEFAULT NULL,
104 InvType INT DEFAULT NULL,
105 Name VARCHAR(255) DEFAULT NULL,
106 Description VARCHAR(255) DEFAULT NULL,
107 NextPermissions INT DEFAULT NULL,
108 CurrentPermissions INT DEFAULT NULL,
109 BasePermissions INT DEFAULT NULL,
110 EveryonePermissions INT DEFAULT NULL,
111 GroupPermissions INT DEFAULT NULL,
112 Flags INT DEFAULT NULL,
113 PRIMARY KEY (ItemID)
114);
115
116CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
117
118CREATE TABLE RegionSettings (
119 RegionID VARCHAR(36) NOT NULL,
120
121 BlockTerraform BOOLEAN DEFAULT NULL,
122 BlockFly BOOLEAN DEFAULT NULL,
123 AllowDamage BOOLEAN DEFAULT NULL,
124 RestrictPushing BOOLEAN DEFAULT NULL,
125 AllowLandResell BOOLEAN DEFAULT NULL,
126 AllowLandJoinDivide BOOLEAN DEFAULT NULL,
127 BlockShowInSearch BOOLEAN DEFAULT NULL,
128
129 AgentLimit INT DEFAULT NULL,
130 ObjectBonus DOUBLE PRECISION DEFAULT NULL,
131 Maturity INT DEFAULT NULL,
132
133 DisableScripts BOOLEAN DEFAULT NULL,
134 DisableCollisions BOOLEAN DEFAULT NULL,
135 DisablePhysics BOOLEAN DEFAULT NULL,
136
137 TerrainTexture1 VARCHAR(36) DEFAULT NULL,
138 TerrainTexture2 VARCHAR(36) DEFAULT NULL,
139 TerrainTexture3 VARCHAR(36) DEFAULT NULL,
140 TerrainTexture4 VARCHAR(36) DEFAULT NULL,
141
142 Elevation1NW DOUBLE PRECISION DEFAULT NULL,
143 Elevation2NW DOUBLE PRECISION DEFAULT NULL,
144 Elevation1NE DOUBLE PRECISION DEFAULT NULL,
145 Elevation2NE DOUBLE PRECISION DEFAULT NULL,
146 Elevation1SE DOUBLE PRECISION DEFAULT NULL,
147 Elevation2SE DOUBLE PRECISION DEFAULT NULL,
148 Elevation1SW DOUBLE PRECISION DEFAULT NULL,
149 Elevation2SW DOUBLE PRECISION DEFAULT NULL,
150
151 WaterHeight DOUBLE PRECISION DEFAULT NULL,
152 TerrainRaiseLimit DOUBLE PRECISION DEFAULT NULL,
153 TerrainLowerLimit DOUBLE PRECISION DEFAULT NULL,
154
155 UseEstateSun BOOLEAN DEFAULT NULL,
156 Sandbox BOOLEAN DEFAULT NULL,
157
158 SunVectorX DOUBLE PRECISION DEFAULT NULL,
159 SunVectorY DOUBLE PRECISION DEFAULT NULL,
160 SunVectorZ DOUBLE PRECISION DEFAULT NULL,
161
162 FixedSun BOOLEAN DEFAULT NULL,
163 SunPosition DOUBLE PRECISION DEFAULT NULL,
164
165 Covenant VARCHAR(36) DEFAULT NULL,
166
167 PRIMARY KEY (RegionID)
168);
169
diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql
deleted file mode 100644
index b3c7ef1..0000000
--- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql
+++ /dev/null
@@ -1,104 +0,0 @@
1CREATE TABLE UserAgents (
2 ProfileID VARCHAR(36) NOT NULL,
3 AgentIP VARCHAR(24) DEFAULT NULL,
4 AgentPort INT DEFAULT NULL,
5 AgentOnline BOOLEAN DEFAULT NULL,
6 SessionID VARCHAR(36) DEFAULT NULL,
7 SecureSessionID VARCHAR(36) DEFAULT NULL,
8 InitialRegion VARCHAR(255) DEFAULT NULL,
9 Region VARCHAR(255) DEFAULT NULL,
10 LoginTime INT DEFAULT NULL,
11 LogoutTime INT DEFAULT NULL,
12 Handle BIGINT DEFAULT NULL,
13 PositionX DOUBLE PRECISION DEFAULT NULL,
14 PositionY DOUBLE PRECISION DEFAULT NULL,
15 PositionZ DOUBLE PRECISION DEFAULT NULL,
16 LookAtX DOUBLE PRECISION DEFAULT NULL,
17 LookAtY DOUBLE PRECISION DEFAULT NULL,
18 LookAtZ DOUBLE PRECISION DEFAULT NULL,
19 PRIMARY KEY (ProfileID)
20);
21
22CREATE TABLE UserProfiles (
23 ID VARCHAR(36) NOT NULL,
24 WebLoginKey VARCHAR(36) DEFAULT NULL,
25 FirstName VARCHAR(32) DEFAULT NULL,
26 SurName VARCHAR(32) DEFAULT NULL,
27 Email VARCHAR(250) DEFAULT NULL,
28 PasswordHash VARCHAR(32) DEFAULT NULL,
29 PasswordSalt VARCHAR(32) DEFAULT NULL,
30 HomeRegionID VARCHAR(36) DEFAULT NULL,
31 HomeRegionX INT DEFAULT NULL,
32 HomeRegionY INT DEFAULT NULL,
33 HomeLocationX DOUBLE PRECISION DEFAULT NULL,
34 HomeLocationY DOUBLE PRECISION DEFAULT NULL,
35 HomeLocationZ DOUBLE PRECISION DEFAULT NULL,
36 HomeLookAtX DOUBLE PRECISION DEFAULT NULL,
37 HomeLookAtY DOUBLE PRECISION DEFAULT NULL,
38 HomeLookAtZ DOUBLE PRECISION DEFAULT NULL,
39 Created INT DEFAULT NULL,
40 LastLogin INT DEFAULT NULL,
41 UserInventoryURI VARCHAR(255) DEFAULT NULL,
42 UserAssetURI VARCHAR(255) DEFAULT NULL,
43 Image VARCHAR(36) DEFAULT NULL,
44 FirstLifeImage VARCHAR(36) DEFAULT NULL,
45 AboutText TEXT DEFAULT NULL,
46 FirstLifeAboutText TEXT DEFAULT NULL,
47 CanDoMask INT DEFAULT NULL,
48 WantDoMask INT DEFAULT NULL,
49 UserFlags INT DEFAULT NULL,
50 GodLevel INT DEFAULT NULL,
51 CustomType VARCHAR(32) DEFAULT NULL,
52 Partner VARCHAR(36) DEFAULT NULL,
53 RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
54 PRIMARY KEY (ID)
55);
56
57CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
58CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
59CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
60
61CREATE TABLE UserAppearances (
62 Owner VARCHAR(36) NOT NULL,
63 BodyItem VARCHAR(36) DEFAULT NULL,
64 BodyAsset VARCHAR(36) DEFAULT NULL,
65 SkinItem VARCHAR(36) DEFAULT NULL,
66 SkinAsset VARCHAR(36) DEFAULT NULL,
67 HairItem VARCHAR(36) DEFAULT NULL,
68 HairAsset VARCHAR(36) DEFAULT NULL,
69 EyesItem VARCHAR(36) DEFAULT NULL,
70 EyesAsset VARCHAR(36) DEFAULT NULL,
71 ShirtItem VARCHAR(36) DEFAULT NULL,
72 ShirtAsset VARCHAR(36) DEFAULT NULL,
73 PantsItem VARCHAR(36) DEFAULT NULL,
74 PantsAsset VARCHAR(36) DEFAULT NULL,
75 ShoesItem VARCHAR(36) DEFAULT NULL,
76 ShoesAsset VARCHAR(36) DEFAULT NULL,
77 SocksItem VARCHAR(36) DEFAULT NULL,
78 SocksAsset VARCHAR(36) DEFAULT NULL,
79 JacketItem VARCHAR(36) DEFAULT NULL,
80 JacketAsset VARCHAR(36) DEFAULT NULL,
81 GlovesItem VARCHAR(36) DEFAULT NULL,
82 GlovesAsset VARCHAR(36) DEFAULT NULL,
83 UnderShirtItem VARCHAR(36) DEFAULT NULL,
84 UnderShirtAsset VARCHAR(36) DEFAULT NULL,
85 UnderPantsItem VARCHAR(36) DEFAULT NULL,
86 UnderPantsAsset VARCHAR(36) DEFAULT NULL,
87 SkirtItem VARCHAR(36) DEFAULT NULL,
88 SkirtAsset VARCHAR(36) DEFAULT NULL,
89 Texture BYTEA,
90 VisualParams BYTEA,
91 Serial INT DEFAULT NULL,
92 AvatarHeight FLOAT DEFAULT NULL,
93 PRIMARY KEY (Owner)
94);
95
96CREATE TABLE UserFriends (
97 UserFriendID VARCHAR(36) NOT NULL,
98 OwnerID VARCHAR(36) DEFAULT NULL,
99 FriendID VARCHAR(36) DEFAULT NULL,
100 FriendPermissions INT DEFAULT NULL,
101 PRIMARY KEY (UserFriendID)
102);
103
104CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
diff --git a/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml
deleted file mode 100644
index 5ff37d8..0000000
--- a/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml
+++ /dev/null
@@ -1,44 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Data.RegionProfileData, OpenSim.Data" table="Regions" lazy="false">
4 <id name="Uuid" column="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7
8 <property name="Owner_uuid" column="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="OriginUUID" column="OriginID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10
11 <property name="RegionHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
12 <property name="RegionName" type="String" length="32" />
13 <property name="RegionRecvKey" type="String" length="128" />
14 <property name="RegionSendKey" type="String" length="128" />
15 <property name="RegionSecret" type="String" length="128" />
16 <property name="RegionDataURI" type="String" length="255" />
17
18 <property name="ServerIP" type="String" length="64" />
19 <property name="ServerPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
20 <property name="ServerURI" type="String" length="255" />
21
22 <property name="RegionLocX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
23 <property name="RegionLocY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
24 <property name="RegionLocZ" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
25
26 <property name="EastOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
27 <property name="WestOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
28 <property name="SouthOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
29 <property name="NorthOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
30
31 <property name="RegionAssetURI" type="String" length="255" />
32 <property name="RegionAssetRecvKey" type="String" length="128" />
33 <property name="RegionAssetSendKey" type="String" length="128" />
34
35 <property name="RegionUserURI" type="String" length="255" />
36 <property name="RegionUserRecvKey" type="String" length="128" />
37 <property name="RegionUserSendKey" type="String" length="128" />
38 <property name="RegionMapTextureID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
39
40 <property name="ServerHttpPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
41 <property name="ServerRemotingPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
42
43 </class>
44</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml
deleted file mode 100644
index 3843a8d..0000000
--- a/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml
+++ /dev/null
@@ -1,56 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.RegionSettings, OpenSim.Framework" table="RegionSettings" lazy="false">
4 <id name="RegionUUID" column="RegionId" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7
8 <property name="BlockTerraform" type="System.Boolean" />
9 <property name="BlockFly" type="System.Boolean" />
10 <property name="AllowDamage" type="System.Boolean" />
11 <property name="RestrictPushing" type="System.Boolean" />
12 <property name="AllowLandResell" type="System.Boolean" />
13 <property name="AllowLandJoinDivide" type="System.Boolean" />
14 <property name="BlockShowInSearch" type="System.Boolean" />
15
16 <property name="AgentLimit" type="System.Int32" />
17 <property name="ObjectBonus" type="System.Double" />
18 <property name="Maturity" type="System.Int32" />
19
20 <property name="DisableScripts" type="System.Boolean" />
21 <property name="DisableCollisions" type="System.Boolean" />
22 <property name="DisablePhysics" type="System.Boolean" />
23
24 <property name="TerrainTexture1" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
25 <property name="TerrainTexture2" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
26 <property name="TerrainTexture3" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="TerrainTexture4" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
28
29 <property name="Elevation1NW" type="System.Double" />
30 <property name="Elevation2NW" type="System.Double" />
31 <property name="Elevation1NE" type="System.Double" />
32 <property name="Elevation2NE" type="System.Double" />
33 <property name="Elevation1SE" type="System.Double" />
34 <property name="Elevation2SE" type="System.Double" />
35 <property name="Elevation1SW" type="System.Double" />
36 <property name="Elevation2SW" type="System.Double" />
37
38 <property name="WaterHeight" type="System.Double" />
39 <property name="TerrainRaiseLimit" type="System.Double" />
40 <property name="TerrainLowerLimit" type="System.Double" />
41
42 <property name="UseEstateSun" type="System.Boolean" />
43 <property name="Sandbox" type="System.Boolean" />
44
45 <property name="SunVector" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
46 <column name="SunVectorX" />
47 <column name="SunVectorY" />
48 <column name="SunVectorZ" />
49 </property>
50
51 <property name="FixedSun" type="System.Boolean" />
52 <property name="SunPosition" type="System.Double" />
53 <property name="Covenant" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
54
55 </class>
56</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
deleted file mode 100644
index 98c648b..0000000
--- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
+++ /dev/null
@@ -1,147 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Region.Framework.Scenes.SceneObjectPart, OpenSim.Region.Framework" table="Prims" lazy="false">
4 <id name="UUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="ParentID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate"/>
8 <property name="ParentUUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="CreationDate" type="System.Int32" />
11 <property name="Name" type="String" length="255" />
12 <property name="Text" type="String" length="255" />
13 <property name="Description" type="String" length="255" />
14 <property name="SitName" type="String" length="255" />
15 <property name="TouchName" type="String" length="255" />
16 <property name="Color" type="OpenSim.Data.NHibernate.ColorUserType, OpenSim.Data.NHibernate" />
17
18 <property name="ObjectFlags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
19 <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
21 <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
22 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
23 <property name="LinkNum" type="System.Int32" />
24
25 <property name="OwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
26 <property name="NextOwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
27 <property name="GroupMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
28 <property name="EveryoneMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
29 <property name="BaseMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
30
31 <property name="Material" type="Byte" />
32 <property name="ScriptAccessPin" type="System.Int32" />
33 <property name="TextureAnimation" type="binary" />
34 <property name="ParticleSystem" type="binary" />
35 <property name="ClickAction" type="Byte" />
36
37 <property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
38 <column name="PositionX" />
39 <column name="PositionY" />
40 <column name="PositionZ" />
41 </property>
42
43 <property name="GroupPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
44 <column name="GroupPositionX" />
45 <column name="GroupPositionY" />
46 <column name="GroupPositionZ" />
47 </property>
48
49 <property name="Velocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
50 <column name="VelocityX" />
51 <column name="VelocityY" />
52 <column name="VelocityZ" />
53 </property>
54
55 <property name="AngularVelocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
56 <column name="AngularVelocityX" />
57 <column name="AngularVelocityY" />
58 <column name="AngularVelocityZ" />
59 </property>
60
61 <property name="Acceleration" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
62 <column name="AccelerationX" />
63 <column name="AccelerationY" />
64 <column name="AccelerationZ" />
65 </property>
66
67 <property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
68 <column name="SitTargetOffsetX" />
69 <column name="SitTargetOffsetY" />
70 <column name="SitTargetOffsetZ" />
71 </property>
72
73 <property name="RotationOffset" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
74 <column name="RotationX" />
75 <column name="RotationY" />
76 <column name="RotationZ" />
77 <column name="RotationW" />
78 </property>
79
80 <property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
81 <column name="SitTargetOrientX" />
82 <column name="SitTargetOrientY" />
83 <column name="SitTargetOrientZ" />
84 <column name="SitTargetOrientW" />
85 </property>
86
87 <component name="Shape">
88 <property name="Scale" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
89 <column name="ScaleX" />
90 <column name="ScaleY" />
91 <column name="ScaleZ" />
92 </property>
93 <property name="PCode" type="System.Byte" />
94 <property name="PathBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
95 <property name="PathEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
96 <property name="PathScaleX" type="System.Byte" />
97 <property name="PathScaleY" type="System.Byte" />
98 <property name="PathShearX" type="System.Byte" />
99 <property name="PathShearY" type="System.Byte" />
100 <property name="PathSkew" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
101 <property name="PathCurve" type="System.Byte" />
102 <property name="PathRadiusOffset" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
103 <property name="PathRevolutions" type="System.Byte" />
104 <property name="PathTaperX" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
105 <property name="PathTaperY" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
106 <property name="PathTwist" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
107 <property name="ProfileBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
108 <property name="ProfileEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
109 <property name="ProfileCurve" type="System.Byte" />
110 <property name="ProfileHollow" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
111 <property name="TextureEntry" column="Texture" type="binary" />
112 <property name="ExtraParams" type="binary" />
113 <property name="State" type="System.Byte" />
114 </component>
115 </class>
116 <class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false">
117 <id name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
118 <generator class="assigned" />
119 </id>
120 <!-- <property name="MapData" type="OpenSim.Data.NHibernate.BlobType, OpenSim.Data.NHibernate" /> -->
121 <property name="MapData" type="binary" />
122 </class>
123 <class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
124 <id name="ItemID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
125 <generator class="assigned" />
126 </id>
127 <property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
128 <property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
129 <property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
130 <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
131 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
132 <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
133 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
134 <property name="CurrentPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
135 <property name="BasePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
136 <property name="EveryonePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
137 <property name="GroupPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
138 <property name="NextPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
139 <property name="Name" type="String" length="255" />
140 <property name="Description" type="String" length="255" />
141 <property name="CreationDate" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
142 <property name="Flags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
143 <property name="InvType" type="System.Int32" />
144 <property name="Type" type="System.Int32" />
145 </class>
146
147</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
deleted file mode 100644
index aedf764..0000000
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1CREATE TABLE Assets (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Name VARCHAR(64) DEFAULT NULL,
5 Description VARCHAR(64) DEFAULT NULL,
6 Local BIT DEFAULT NULL,
7 Temporary BIT DEFAULT NULL,
8 Data BLOB,
9 PRIMARY KEY (ID)
10);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql
deleted file mode 100644
index afe702f..0000000
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql
+++ /dev/null
@@ -1,71 +0,0 @@
1CREATE TABLE EstateSettings (
2 EstateID INT NOT NULL,
3 ParentEstateID INT DEFAULT NULL,
4 EstateOwnerID VARCHAR(36) DEFAULT NULL,
5 Name VARCHAR(64) DEFAULT NULL,
6 RedirectGridX INT DEFAULT NULL,
7 RedirectGridY INT DEFAULT NULL,
8 BillableFactor DOUBLE DEFAULT NULL,
9 PricePerMeter INT DEFAULT NULL,
10 SunPosition DOUBLE DEFAULT NULL,
11
12 UseGlobalTime BIT DEFAULT NULL,
13 FixedSun BIT DEFAULT NULL,
14 AllowVoice BIT DEFAULT NULL,
15 AllowDirectTeleport BIT DEFAULT NULL,
16 ResetHomeOnTeleport BIT DEFAULT NULL,
17 PublicAccess BIT DEFAULT NULL,
18 DenyAnonymous BIT DEFAULT NULL,
19 DenyIdentified BIT DEFAULT NULL,
20 DenyTransacted BIT DEFAULT NULL,
21 DenyMinors BIT DEFAULT NULL,
22 BlockDwell BIT DEFAULT NULL,
23 EstateSkipScripts BIT DEFAULT NULL,
24 TaxFree BIT DEFAULT NULL,
25 AbuseEmailToEstateOwner BIT DEFAULT NULL,
26
27 AbuseEmail VARCHAR(255) DEFAULT NULL,
28
29 PRIMARY KEY (EstateID)
30);
31
32CREATE TABLE EstateRegionLink (
33 EstateRegionLinkID VARCHAR(36) NOT NULL,
34 EstateID INT DEFAULT NULL,
35 RegionID VARCHAR(36) DEFAULT NULL,
36 PRIMARY KEY (EstateRegionLinkID)
37);
38
39CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID);
40CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID);
41
42CREATE TABLE EstateManagers (
43 EstateID INT NOT NULL,
44 ManagerID VARCHAR(36) NOT NULL,
45 ArrayIndex INT NOT NULL,
46 PRIMARY KEY (EstateID,ArrayIndex)
47);
48
49CREATE TABLE EstateUsers (
50 EstateID INT NOT NULL,
51 UserID VARCHAR(36) NOT NULL,
52 ArrayIndex INT NOT NULL,
53 PRIMARY KEY (EstateID,ArrayIndex)
54);
55
56CREATE TABLE EstateGroups (
57 EstateID INT NOT NULL,
58 GroupID VARCHAR(36) NOT NULL,
59 ArrayIndex INT NOT NULL,
60 PRIMARY KEY (EstateID,ArrayIndex)
61);
62
63CREATE TABLE EstateBans (
64 EstateID INT NOT NULL,
65 ArrayIndex INT NOT NULL,
66 BannedUserID VARCHAR(36) NOT NULL,
67 BannedHostAddress VARCHAR(16) NOT NULL,
68 BannedHostIPMask VARCHAR(16) NOT NULL,
69 BannedHostNameMask VARCHAR(16) NOT NULL,
70 PRIMARY KEY (EstateID,ArrayIndex)
71);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
deleted file mode 100644
index 4f09848..0000000
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
+++ /dev/null
@@ -1,35 +0,0 @@
1CREATE TABLE Regions (
2 RegionId VARCHAR(36) NOT NULL,
3 RegionHandle BIGINT UNSIGNED NOT NULL,
4 RegionName VARCHAR(32) DEFAULT NULL,
5 RegionRecvKey VARCHAR(128) DEFAULT NULL,
6 RegionSendKey VARCHAR(128) DEFAULT NULL,
7 RegionSecret VARCHAR(128) DEFAULT NULL,
8 RegionDataURI VARCHAR(255) DEFAULT NULL,
9 ServerIP VARCHAR(64) DEFAULT NULL,
10 ServerPort INT UNSIGNED DEFAULT NULL,
11 ServerURI VARCHAR(255) DEFAULT NULL,
12 RegionLocX INT UNSIGNED DEFAULT NULL,
13 RegionLocY INT UNSIGNED DEFAULT NULL,
14 RegionLocZ INT UNSIGNED DEFAULT NULL,
15 EastOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
16 WestOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
17 SouthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
18 NorthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
19 RegionAssetURI VARCHAR(255) DEFAULT NULL,
20 RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
21 RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
22 RegionUserURI VARCHAR(255) DEFAULT NULL,
23 RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
24 RegionUserSendKey VARCHAR(128) DEFAULT NULL,
25 RegionMapTextureId VARCHAR(36) DEFAULT NULL,
26 ServerHttpPort INT DEFAULT NULL,
27 ServerRemotingPort INT DEFAULT NULL,
28 OwnerID VARCHAR(36) DEFAULT NULL,
29 OriginID VARCHAR(36) DEFAULT NULL,
30 PRIMARY KEY (RegionId)
31);
32
33CREATE INDEX RegionNameIndex ON Regions (RegionName);
34CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
35CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql
deleted file mode 100644
index 38978ee..0000000
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql
+++ /dev/null
@@ -1,39 +0,0 @@
1CREATE TABLE InventoryFolders (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Version INT DEFAULT NULL,
5 ParentID VARCHAR(36) DEFAULT NULL,
6 Owner VARCHAR(36) DEFAULT NULL,
7 Name VARCHAR(64) DEFAULT NULL,
8 PRIMARY KEY (ID)
9);
10
11CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
12CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
13
14CREATE TABLE InventoryItems (
15 ID VARCHAR(36) NOT NULL,
16 InvType INT DEFAULT NULL,
17 AssetType INT DEFAULT NULL,
18 AssetID VARCHAR(36) DEFAULT NULL,
19 Folder VARCHAR(36) DEFAULT NULL,
20 Owner VARCHAR(36) DEFAULT NULL,
21 Creator VARCHAR(36) DEFAULT NULL,
22 Name VARCHAR(64) DEFAULT NULL,
23 Description VARCHAR(64) DEFAULT NULL,
24 NextPermissions INT DEFAULT NULL,
25 CurrentPermissions INT DEFAULT NULL,
26 BasePermissions INT DEFAULT NULL,
27 EveryOnePermissions INT DEFAULT NULL,
28 GroupID VARCHAR(36) DEFAULT NULL,
29 GroupOwned BIT DEFAULT NULL,
30 SalePrice INT DEFAULT NULL,
31 SaleType TINYINT DEFAULT NULL,
32 Flags INT DEFAULT NULL,
33 CreationDate INT DEFAULT NULL,
34 PRIMARY KEY (ID)
35);
36
37CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
38CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
39CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
deleted file mode 100644
index 2b8e62a..0000000
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
+++ /dev/null
@@ -1,168 +0,0 @@
1CREATE TABLE Prims (
2 UUID VARCHAR(36) NOT NULL,
3 RegionID VARCHAR(36) DEFAULT NULL,
4 GroupID VARCHAR(36) DEFAULT NULL,
5 ParentID INT DEFAULT NULL,
6 ParentUUID VARCHAR(36) DEFAULT NULL,
7 OwnerID VARCHAR(36) DEFAULT NULL,
8 LastOwnerID VARCHAR(36) DEFAULT NULL,
9 CreatorID VARCHAR(36) DEFAULT NULL,
10 CreationDate INT DEFAULT NULL,
11 LinkNum INT DEFAULT NULL,
12 Name VARCHAR(255) DEFAULT NULL,
13 Text VARCHAR(255) DEFAULT NULL,
14 Description VARCHAR(255) DEFAULT NULL,
15 SitName VARCHAR(255) DEFAULT NULL,
16 TouchName VARCHAR(255) DEFAULT NULL,
17 ObjectFlags INT DEFAULT NULL,
18 OwnerMask INT DEFAULT NULL,
19 NextOwnerMask INT DEFAULT NULL,
20 GroupMask INT DEFAULT NULL,
21 EveryoneMask INT DEFAULT NULL,
22 BaseMask INT DEFAULT NULL,
23 Material TINYINT DEFAULT NULL,
24 ScriptAccessPin INT DEFAULT NULL,
25 TextureAnimation BLOB,
26 ParticleSystem BLOB,
27 ClickAction TINYINT DEFAULT NULL,
28 Color INT DEFAULT NULL,
29 PositionX DOUBLE DEFAULT NULL,
30 PositionY DOUBLE DEFAULT NULL,
31 PositionZ DOUBLE DEFAULT NULL,
32 GroupPositionX DOUBLE DEFAULT NULL,
33 GroupPositionY DOUBLE DEFAULT NULL,
34 GroupPositionZ DOUBLE DEFAULT NULL,
35 VelocityX DOUBLE DEFAULT NULL,
36 VelocityY DOUBLE DEFAULT NULL,
37 VelocityZ DOUBLE DEFAULT NULL,
38 AngularVelocityX DOUBLE DEFAULT NULL,
39 AngularVelocityY DOUBLE DEFAULT NULL,
40 AngularVelocityZ DOUBLE DEFAULT NULL,
41 AccelerationX DOUBLE DEFAULT NULL,
42 AccelerationY DOUBLE DEFAULT NULL,
43 AccelerationZ DOUBLE DEFAULT NULL,
44 RotationX DOUBLE DEFAULT NULL,
45 RotationY DOUBLE DEFAULT NULL,
46 RotationZ DOUBLE DEFAULT NULL,
47 RotationW DOUBLE DEFAULT NULL,
48 SitTargetOffsetX DOUBLE DEFAULT NULL,
49 SitTargetOffsetY DOUBLE DEFAULT NULL,
50 SitTargetOffsetZ DOUBLE DEFAULT NULL,
51 SitTargetOrientW DOUBLE DEFAULT NULL,
52 SitTargetOrientX DOUBLE DEFAULT NULL,
53 SitTargetOrientY DOUBLE DEFAULT NULL,
54 SitTargetOrientZ DOUBLE DEFAULT NULL,
55 -- this is the shape
56 Shape INT DEFAULT NULL,
57 ScaleX DOUBLE DEFAULT NULL,
58 ScaleY DOUBLE DEFAULT NULL,
59 ScaleZ DOUBLE DEFAULT NULL,
60 PCode INT DEFAULT NULL,
61 PathBegin INT DEFAULT NULL,
62 PathEnd INT DEFAULT NULL,
63 PathScaleX INT DEFAULT NULL,
64 PathScaleY INT DEFAULT NULL,
65 PathShearX INT DEFAULT NULL,
66 PathShearY INT DEFAULT NULL,
67 PathSkew INT DEFAULT NULL,
68 PathCurve INT DEFAULT NULL,
69 PathRadiusOffset INT DEFAULT NULL,
70 PathRevolutions INT DEFAULT NULL,
71 PathTaperX INT DEFAULT NULL,
72 PathTaperY INT DEFAULT NULL,
73 PathTwist INT DEFAULT NULL,
74 ProfileBegin INT DEFAULT NULL,
75 ProfileEnd INT DEFAULT NULL,
76 ProfileCurve INT DEFAULT NULL,
77 ProfileHollow INT DEFAULT NULL,
78 State INT DEFAULT NULL,
79 Texture BLOB,
80 ExtraParams BLOB,
81 PRIMARY KEY (UUID)
82);
83
84CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
85CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
86
87CREATE TABLE Terrain (
88 RegionID VARCHAR(36) NOT NULL,
89 MapData BLOB,
90 PRIMARY KEY (RegionID)
91);
92
93CREATE TABLE PrimItems (
94 ItemID VARCHAR(36) NOT NULL,
95 GroupID VARCHAR(36) DEFAULT NULL,
96 PrimID VARCHAR(36) DEFAULT NULL,
97 ParentFolderID VARCHAR(36) DEFAULT NULL,
98 AssetID VARCHAR(36) DEFAULT NULL,
99 OwnerID VARCHAR(36) DEFAULT NULL,
100 LastOwnerID VARCHAR(36) DEFAULT NULL,
101 CreatorID VARCHAR(36) DEFAULT NULL,
102 CreationDate BIGINT DEFAULT NULL,
103 Type INT DEFAULT NULL,
104 InvType INT DEFAULT NULL,
105 Name VARCHAR(255) DEFAULT NULL,
106 Description VARCHAR(255) DEFAULT NULL,
107 NextPermissions INT DEFAULT NULL,
108 CurrentPermissions INT DEFAULT NULL,
109 BasePermissions INT DEFAULT NULL,
110 EveryonePermissions INT DEFAULT NULL,
111 GroupPermissions INT DEFAULT NULL,
112 Flags INT DEFAULT NULL,
113 PRIMARY KEY (ItemID)
114);
115
116CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
117
118CREATE TABLE RegionSettings (
119 RegionID VARCHAR(36) NOT NULL,
120
121 BlockTerraform BIT DEFAULT NULL,
122 BlockFly BIT DEFAULT NULL,
123 AllowDamage BIT DEFAULT NULL,
124 RestrictPushing BIT DEFAULT NULL,
125 AllowLandResell BIT DEFAULT NULL,
126 AllowLandJoinDivide BIT DEFAULT NULL,
127 BlockShowInSearch BIT DEFAULT NULL,
128
129 AgentLimit INT DEFAULT NULL,
130 ObjectBonus DOUBLE DEFAULT NULL,
131 Maturity INT DEFAULT NULL,
132
133 DisableScripts BIT DEFAULT NULL,
134 DisableCollisions BIT DEFAULT NULL,
135 DisablePhysics BIT DEFAULT NULL,
136
137 TerrainTexture1 VARCHAR(36) DEFAULT NULL,
138 TerrainTexture2 VARCHAR(36) DEFAULT NULL,
139 TerrainTexture3 VARCHAR(36) DEFAULT NULL,
140 TerrainTexture4 VARCHAR(36) DEFAULT NULL,
141
142 Elevation1NW DOUBLE DEFAULT NULL,
143 Elevation2NW DOUBLE DEFAULT NULL,
144 Elevation1NE DOUBLE DEFAULT NULL,
145 Elevation2NE DOUBLE DEFAULT NULL,
146 Elevation1SE DOUBLE DEFAULT NULL,
147 Elevation2SE DOUBLE DEFAULT NULL,
148 Elevation1SW DOUBLE DEFAULT NULL,
149 Elevation2SW DOUBLE DEFAULT NULL,
150
151 WaterHeight DOUBLE DEFAULT NULL,
152 TerrainRaiseLimit DOUBLE DEFAULT NULL,
153 TerrainLowerLimit DOUBLE DEFAULT NULL,
154
155 UseEstateSun BIT DEFAULT NULL,
156 Sandbox BIT DEFAULT NULL,
157
158 SunVectorX DOUBLE DEFAULT NULL,
159 SunVectorY DOUBLE DEFAULT NULL,
160 SunVectorZ DOUBLE DEFAULT NULL,
161
162 FixedSun BIT DEFAULT NULL,
163 SunPosition DOUBLE DEFAULT NULL,
164
165 Covenant VARCHAR(36) DEFAULT NULL,
166
167 PRIMARY KEY (RegionID)
168);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
deleted file mode 100644
index 6084886..0000000
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
+++ /dev/null
@@ -1,104 +0,0 @@
1CREATE TABLE UserAgents (
2 ProfileID VARCHAR(36) NOT NULL,
3 AgentIP VARCHAR(24) DEFAULT NULL,
4 AgentPort INT DEFAULT NULL,
5 AgentOnline BIT DEFAULT NULL,
6 SessionID VARCHAR(36) DEFAULT NULL,
7 SecureSessionID VARCHAR(36) DEFAULT NULL,
8 InitialRegion VARCHAR(255) DEFAULT NULL,
9 Region VARCHAR(255) DEFAULT NULL,
10 LoginTime INT DEFAULT NULL,
11 LogoutTime INT DEFAULT NULL,
12 Handle BIGINT DEFAULT NULL,
13 PositionX DOUBLE DEFAULT NULL,
14 PositionY DOUBLE DEFAULT NULL,
15 PositionZ DOUBLE DEFAULT NULL,
16 LookAtX DOUBLE DEFAULT NULL,
17 LookAtY DOUBLE DEFAULT NULL,
18 LookAtZ DOUBLE DEFAULT NULL,
19 PRIMARY KEY (ProfileID)
20);
21
22CREATE TABLE UserProfiles (
23 ID VARCHAR(36) NOT NULL,
24 WebLoginKey VARCHAR(36) DEFAULT NULL,
25 FirstName VARCHAR(32) DEFAULT NULL,
26 SurName VARCHAR(32) DEFAULT NULL,
27 Email VARCHAR(250) DEFAULT NULL,
28 PasswordHash VARCHAR(32) DEFAULT NULL,
29 PasswordSalt VARCHAR(32) DEFAULT NULL,
30 HomeRegionID VARCHAR(36) DEFAULT NULL,
31 HomeRegionX INT DEFAULT NULL,
32 HomeRegionY INT DEFAULT NULL,
33 HomeLocationX DOUBLE DEFAULT NULL,
34 HomeLocationY DOUBLE DEFAULT NULL,
35 HomeLocationZ DOUBLE DEFAULT NULL,
36 HomeLookAtX DOUBLE DEFAULT NULL,
37 HomeLookAtY DOUBLE DEFAULT NULL,
38 HomeLookAtZ DOUBLE DEFAULT NULL,
39 Created INT DEFAULT NULL,
40 LastLogin INT DEFAULT NULL,
41 UserInventoryURI VARCHAR(255) DEFAULT NULL,
42 UserAssetURI VARCHAR(255) DEFAULT NULL,
43 Image VARCHAR(36) DEFAULT NULL,
44 FirstLifeImage VARCHAR(36) DEFAULT NULL,
45 AboutText TEXT DEFAULT NULL,
46 FirstLifeAboutText TEXT DEFAULT NULL,
47 CanDoMask INT DEFAULT NULL,
48 WantDoMask INT DEFAULT NULL,
49 UserFlags INT DEFAULT NULL,
50 GodLevel INT DEFAULT NULL,
51 CustomType VARCHAR(32) DEFAULT NULL,
52 Partner VARCHAR(36) DEFAULT NULL,
53 RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
54 PRIMARY KEY (ID)
55);
56
57CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
58CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
59CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
60
61CREATE TABLE UserAppearances (
62 Owner VARCHAR(36) NOT NULL,
63 BodyItem VARCHAR(36) DEFAULT NULL,
64 BodyAsset VARCHAR(36) DEFAULT NULL,
65 SkinItem VARCHAR(36) DEFAULT NULL,
66 SkinAsset VARCHAR(36) DEFAULT NULL,
67 HairItem VARCHAR(36) DEFAULT NULL,
68 HairAsset VARCHAR(36) DEFAULT NULL,
69 EyesItem VARCHAR(36) DEFAULT NULL,
70 EyesAsset VARCHAR(36) DEFAULT NULL,
71 ShirtItem VARCHAR(36) DEFAULT NULL,
72 ShirtAsset VARCHAR(36) DEFAULT NULL,
73 PantsItem VARCHAR(36) DEFAULT NULL,
74 PantsAsset VARCHAR(36) DEFAULT NULL,
75 ShoesItem VARCHAR(36) DEFAULT NULL,
76 ShoesAsset VARCHAR(36) DEFAULT NULL,
77 SocksItem VARCHAR(36) DEFAULT NULL,
78 SocksAsset VARCHAR(36) DEFAULT NULL,
79 JacketItem VARCHAR(36) DEFAULT NULL,
80 JacketAsset VARCHAR(36) DEFAULT NULL,
81 GlovesItem VARCHAR(36) DEFAULT NULL,
82 GlovesAsset VARCHAR(36) DEFAULT NULL,
83 UnderShirtItem VARCHAR(36) DEFAULT NULL,
84 UnderShirtAsset VARCHAR(36) DEFAULT NULL,
85 UnderPantsItem VARCHAR(36) DEFAULT NULL,
86 UnderPantsAsset VARCHAR(36) DEFAULT NULL,
87 SkirtItem VARCHAR(36) DEFAULT NULL,
88 SkirtAsset VARCHAR(36) DEFAULT NULL,
89 Texture BLOB,
90 VisualParams BLOB,
91 Serial INT DEFAULT NULL,
92 AvatarHeight FLOAT DEFAULT NULL,
93 PRIMARY KEY (Owner)
94);
95
96CREATE TABLE UserFriends (
97 UserFriendID VARCHAR(36) NOT NULL,
98 OwnerID VARCHAR(36) DEFAULT NULL,
99 FriendID VARCHAR(36) DEFAULT NULL,
100 FriendPermissions INT DEFAULT NULL,
101 PRIMARY KEY (UserFriendID)
102);
103
104CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
diff --git a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
deleted file mode 100644
index 70b6998..0000000
--- a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
+++ /dev/null
@@ -1,32 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false">
4 <id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7
8 <property name="AgentIP" type="String" length="24" />
9 <property name="AgentPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
10 <property name="AgentOnline" type="boolean" />
11 <property name="SessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="SecureSessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
13 <property name="InitialRegion" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
14 <property name="Region" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
15 <property name="LoginTime" type="Int32" />
16 <property name="LogoutTime" type="Int32" />
17 <property name="Handle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
18
19 <property name="Position" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
20 <column name="PositionX" />
21 <column name="PositionY" />
22 <column name="PositionZ" />
23 </property>
24
25 <property name="LookAt" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
26 <column name="LookAtX" />
27 <column name="LookAtY" />
28 <column name="LookAtZ" />
29 </property>
30
31 </class>
32</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
deleted file mode 100644
index 21e547f..0000000
--- a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
+++ /dev/null
@@ -1,38 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
4 <id name="Owner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="BodyItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
8 <property name="BodyAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="SkinItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="SkinAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="HairItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="HairAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
13 <property name="EyesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
14 <property name="EyesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
15 <property name="ShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
16 <property name="ShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
17 <property name="PantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
18 <property name="PantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
19 <property name="ShoesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="ShoesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
21 <property name="SocksItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
22 <property name="SocksAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
23 <property name="JacketItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
24 <property name="JacketAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
25 <property name="GlovesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
26 <property name="GlovesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="UnderShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
28 <property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
29 <property name="UnderPantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
30 <property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
31 <property name="SkirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
32 <property name="SkirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
33 <property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" />
34 <property name="VisualParams" type="binary" />
35 <property name="Serial" type="Int32" />
36 <property name="AvatarHeight" type="Single" />
37 </class>
38</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml
deleted file mode 100644
index cb23858..0000000
--- a/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml
+++ /dev/null
@@ -1,11 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Data.NHibernate.UserFriend, OpenSim.Data.NHibernate" table="UserFriends" lazy="false">
4 <id name="UserFriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
8 <property name="FriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="FriendPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
10 </class>
11</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
deleted file mode 100644
index 5b1f9b0..0000000
--- a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
+++ /dev/null
@@ -1,38 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
8 <property name="FirstName" index="UserFirstNameIndex" type="String" length="32" />
9 <property name="SurName" index="UserSurnameIndex" type="String" length="32" />
10 <property name="Email" type="String" length="250" />
11 <property name="PasswordHash" type="String" length="32" />
12 <property name="PasswordSalt" type="String" length="32" />
13 <property name="HomeRegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
14 <property name="HomeRegionX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
15 <property name="HomeRegionY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
16 <property name="HomeLocationX" type="Single" />
17 <property name="HomeLocationY" type="Single" />
18 <property name="HomeLocationZ" type="Single" />
19 <property name="HomeLookAtX" type="Single" />
20 <property name="HomeLookAtY" type="Single" />
21 <property name="HomeLookAtZ" type="Single" />
22 <property name="Created" type="Int32" />
23 <property name="LastLogin" type="Int32" />
24 <property name="UserInventoryURI" type="String" length="255"/>
25 <property name="UserAssetURI" type="String" length="255"/>
26 <property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
28 <property name="AboutText" type="String" length="255" />
29 <property name="FirstLifeAboutText" type="String" length="255" />
30 <property name="CanDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
31 <property name="WantDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
32 <property name="UserFlags" type="Int32" />
33 <property name="GodLevel" type="Int32" />
34 <property name="CustomType" type="String" length="32" />
35 <property name="Partner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
36 <property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
37 </class>
38</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/SByteType.cs b/OpenSim/Data/NHibernate/SByteType.cs
deleted file mode 100644
index 92ab0ba..0000000
--- a/OpenSim/Data/NHibernate/SByteType.cs
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33
34namespace OpenSim.Data.NHibernate
35{
36 [Serializable]
37 public class SByteType: IUserType
38 {
39 public object Assemble(object cached, object owner)
40 {
41 return cached;
42 }
43
44 bool IUserType.Equals(object sbyte1, object sbyte2)
45 {
46 return sbyte1.Equals(sbyte2);
47 }
48
49 public object DeepCopy(object sbyte1)
50 {
51 return sbyte1;
52 }
53
54 public object Disassemble(object sbyte1)
55 {
56 return sbyte1;
57 }
58
59 public int GetHashCode(object sbyte1)
60 {
61 return (sbyte1 == null) ? 0 : sbyte1.GetHashCode();
62 }
63
64 public bool IsMutable
65 {
66 get { return false; }
67 }
68
69 public object NullSafeGet(IDataReader rs, string[] names, object owner)
70 {
71 object sbyte1 = null;
72
73 int ord = rs.GetOrdinal(names[0]);
74 if (!rs.IsDBNull(ord))
75 {
76 object tempO = rs.GetValue(ord);
77 if (tempO is Byte)
78 {
79 sbyte1 = Convert.ToSByte(((byte)tempO));
80 }
81 else
82 {
83 short temp = rs.GetInt16(ord);
84 sbyte1 = Convert.ToSByte(temp);
85 }
86 }
87 return sbyte1;
88 }
89
90 public void NullSafeSet(IDbCommand cmd, object obj, int index)
91 {
92 sbyte b = (sbyte)obj;
93 ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt16(b);
94 }
95
96 public object Replace(object original, object target, object owner)
97 {
98 return original;
99 }
100
101 public Type ReturnedType
102 {
103 get { return typeof(sbyte); }
104 }
105
106 public SqlType[] SqlTypes
107 {
108 get { return new SqlType [] { NHibernateUtil.Byte.SqlType }; }
109 }
110 }
111}
diff --git a/OpenSim/Data/NHibernate/Terrain.cs b/OpenSim/Data/NHibernate/Terrain.cs
deleted file mode 100644
index 4be35c6..0000000
--- a/OpenSim/Data/NHibernate/Terrain.cs
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using System.Reflection;
31using log4net;
32using OpenMetaverse;
33using OpenSim.Framework;
34
35namespace OpenSim.Data.NHibernate
36{
37 public class Terrain
38 {
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40
41 private double[,] map;
42 private UUID regionID;
43
44 public Terrain(UUID Region, double[,] array)
45 {
46 map = array;
47 regionID = Region;
48 }
49
50 public Terrain()
51 {
52 map = new double[Constants.RegionSize, Constants.RegionSize];
53 map.Initialize();
54 regionID = UUID.Zero;
55 }
56
57 public UUID RegionID
58 {
59 get { return regionID; }
60 set { regionID = value; }
61 }
62
63 public byte[] MapData
64 {
65 get { return serializeTerrain(map); }
66 set { map = parseTerrain(value); }
67 }
68
69 public double[,] Doubles
70 {
71 get {return map;}
72 set {map = value;}
73 }
74
75 private static double[,] parseTerrain(byte[] data)
76 {
77 double[,] terret = new double[Constants.RegionSize, Constants.RegionSize];
78 terret.Initialize();
79
80 MemoryStream str = new MemoryStream(data);
81 BinaryReader br = new BinaryReader(str);
82 try {
83 for (int x = 0; x < Constants.RegionSize; x++)
84 {
85 for (int y = 0; y < Constants.RegionSize; y++)
86 {
87 terret[x, y] = br.ReadDouble();
88 }
89 }
90 }
91 catch (Exception e)
92 {
93 m_log.Error("Issue parsing Map", e);
94 }
95 return terret;
96 }
97
98 private static byte[] serializeTerrain(double[,] val)
99 {
100 MemoryStream str = new MemoryStream((int) ((Constants.RegionSize*Constants.RegionSize)*sizeof (double)));
101 BinaryWriter bw = new BinaryWriter(str);
102
103 // TODO: COMPATIBILITY - Add byte-order conversions
104 for (int x = 0; x < Constants.RegionSize; x++)
105 {
106 for (int y = 0; y < Constants.RegionSize; y++)
107 {
108 double height = val[x, y];
109 if (height <= 0.0)
110 height = double.Epsilon;
111
112 bw.Write(height);
113 }
114 }
115 return str.ToArray();
116 }
117 }
118}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs
deleted file mode 100644
index 89c9567..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMsSqlAssetTest : BasicAssetTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43
44 [TestFixtureSetUp]
45 public void Init()
46 {
47 SuperInit();
48 // If we manage to connect to the database with the user
49 // and password above it is our test database, and run
50 // these tests. If anything goes wrong, ignore these
51 // tests.
52 try
53 {
54 string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
55
56 db = new NHibernateAssetData();
57 db.Initialise(connect);
58 database = ((NHibernateAssetData)db).Manager;
59 }
60 catch (Exception e)
61 {
62 m_log.Error(e.ToString());
63 Assert.Ignore();
64 }
65 }
66
67 [TestFixtureTearDown]
68 public void Cleanup()
69 {
70 if (db != null)
71 {
72 db.Dispose();
73 }
74 if (database != null)
75 {
76 database.DropSchema();
77 }
78 }
79
80 }
81}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs
deleted file mode 100644
index 6d431a7..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMsSqlEstateTest : BasicEstateTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43
44 [TestFixtureSetUp]
45 public void Init()
46 {
47 SuperInit();
48 // If we manage to connect to the database with the user
49 // and password above it is our test database, and run
50 // these tests. If anything goes wrong, ignore these
51 // tests.
52 try
53 {
54 string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
55
56 db = new NHibernateEstateData();
57 db.Initialise(connect);
58 database = ((NHibernateEstateData)db).Manager;
59 }
60 catch (Exception e)
61 {
62 m_log.Error(e.ToString());
63 Assert.Ignore();
64 }
65 }
66
67 [TestFixtureTearDown]
68 public void Cleanup()
69 {
70 if (db != null)
71 {
72 ((NHibernateEstateData)db).Dispose();
73 }
74 if (database != null)
75 {
76 database.DropSchema();
77 }
78 }
79
80 }
81}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs
deleted file mode 100644
index 30280af..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMsSqlGridTest : BasicGridTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateGridData();
56 db.Initialise(connect);
57 database = ((NHibernateGridData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78 }
79}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs
deleted file mode 100644
index 6d60006..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMsSqlInventoryTest : BasicInventoryTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateInventoryData();
56 db.Initialise(connect);
57 database = ((NHibernateInventoryData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs
deleted file mode 100644
index 9a9c41d..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMsSqlRegionTest : BasicRegionTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45
46 [TestFixtureSetUp]
47 public void Init()
48 {
49 SuperInit();
50 // If we manage to connect to the database with the user
51 // and password above it is our test database, and run
52 // these tests. If anything goes wrong, ignore these
53 // tests.
54 try
55 {
56 db = new NHibernateRegionData();
57 db.Initialise(connect);
58 database = ((NHibernateRegionData)db).Manager;
59 }
60 catch (Exception e)
61 {
62 m_log.Error(e.ToString());
63 Assert.Ignore();
64 }
65 }
66
67 [TestFixtureTearDown]
68 public void Cleanup()
69 {
70 if (db != null)
71 {
72 db.Dispose();
73 }
74 if (database != null)
75 {
76 database.DropSchema();
77 }
78 }
79
80 }
81}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs
deleted file mode 100644
index cd861de..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMsSqlUserTest : BasicUserTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateUserData();
56 db.Initialise(connect);
57 database = ((NHibernateUserData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78 }
79}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs
deleted file mode 100644
index 7c7b5f7..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMySQLAssetTest : BasicAssetTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateAssetData();
56 db.Initialise(connect);
57 database = ((NHibernateAssetData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs
deleted file mode 100644
index dbb1d14..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMySQLGridTest : BasicGridTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateGridData();
56 db.Initialise(connect);
57 database = ((NHibernateGridData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78 }
79}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs
deleted file mode 100644
index 6c31a63..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMySQLInventoryTest : BasicInventoryTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateInventoryData();
56 db.Initialise(connect);
57 database = ((NHibernateInventoryData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs
deleted file mode 100644
index 28660d9..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMySQLRegionTest : BasicRegionTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45
46 [TestFixtureSetUp]
47 public void Init()
48 {
49 SuperInit();
50 // If we manage to connect to the database with the user
51 // and password above it is our test database, and run
52 // these tests. If anything goes wrong, ignore these
53 // tests.
54 try
55 {
56 db = new NHibernateRegionData();
57 db.Initialise(connect);
58 database = ((NHibernateRegionData)db).Manager;
59 }
60 catch (Exception e)
61 {
62 m_log.Error(e.ToString());
63 Assert.Ignore();
64 }
65 }
66
67 [TestFixtureTearDown]
68 public void Cleanup()
69 {
70 if (db != null)
71 {
72 db.Dispose();
73 }
74 if (database != null)
75 {
76 database.DropSchema();
77 }
78 }
79
80 }
81}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs
deleted file mode 100644
index d5caa3e..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMySQLUserTest : BasicUserTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateUserData();
56 db.Initialise(connect);
57 database = ((NHibernateUserData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78 }
79}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs
deleted file mode 100644
index 72b4320..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernateMySQLEstateTest : BasicEstateTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateEstateData();
56 db.Initialise(connect);
57 database = ((NHibernateEstateData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 ((NHibernateEstateData)db).Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs
deleted file mode 100644
index d1ec3d0..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernatePostgreSQLAssetTest : BasicAssetTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateAssetData();
56 db.Initialise(connect);
57 database = ((NHibernateAssetData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs
deleted file mode 100644
index fdd99ab..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernatePostgreSQLEstateTest : BasicEstateTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateEstateData();
56 db.Initialise(connect);
57 database = ((NHibernateEstateData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 ((NHibernateEstateData)db).Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs
deleted file mode 100644
index fe874cb..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernatePostgreSQLGridTest : BasicGridTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateGridData();
56 db.Initialise(connect);
57 database = ((NHibernateGridData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78 }
79}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs
deleted file mode 100644
index 048d36f..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernatePostgreSQLInventoryTest : BasicInventoryTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateInventoryData();
56 db.Initialise(connect);
57 database = ((NHibernateInventoryData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs
deleted file mode 100644
index 76b6fea..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernatePostgreSQLRegionTest : BasicRegionTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateRegionData();
56 db.Initialise(connect);
57 database = ((NHibernateRegionData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs
deleted file mode 100644
index c437cd8..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using NUnit.Framework;
30using OpenSim.Data.Tests;
31using log4net;
32using System.Reflection;
33using OpenSim.Tests.Common;
34
35namespace OpenSim.Data.NHibernate.Tests
36{
37 [TestFixture, DatabaseTest]
38 public class NHibernatePostgreSQLUserTest : BasicUserTest
39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 public string file;
42 public NHibernateManager database;
43 public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 db = new NHibernateUserData();
56 db.Initialise(connect);
57 database = ((NHibernateUserData)db).Manager;
58 }
59 catch (Exception e)
60 {
61 m_log.Error(e.ToString());
62 Assert.Ignore();
63 }
64 }
65
66 [TestFixtureTearDown]
67 public void Cleanup()
68 {
69 if (db != null)
70 {
71 db.Dispose();
72 }
73 if (database != null)
74 {
75 database.DropSchema();
76 }
77 }
78 }
79}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs
deleted file mode 100644
index c8d6e75..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using NUnit.Framework;
31using OpenSim.Data.Tests;
32using log4net;
33using System.Reflection;
34using OpenSim.Tests.Common;
35
36namespace OpenSim.Data.NHibernate.Tests
37{
38 [TestFixture, DatabaseTest]
39 public class NHibernateSQLiteAssetTest : BasicAssetTest
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 public string file;
43 public NHibernateManager database;
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
56
57 db = new NHibernateAssetData();
58 db.Initialise(connect);
59 database = ((NHibernateAssetData)db).Manager;
60 }
61 catch (Exception e)
62 {
63 m_log.Error(e.ToString());
64 Assert.Ignore();
65 }
66 }
67
68 [TestFixtureTearDown]
69 public void Cleanup()
70 {
71 if (db != null)
72 {
73 db.Dispose();
74 }
75 if (database != null)
76 {
77 database.DropSchema();
78 }
79 }
80
81 }
82}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs
deleted file mode 100644
index 345db84..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using NUnit.Framework;
31using OpenSim.Data.Tests;
32using log4net;
33using System.Reflection;
34using OpenSim.Tests.Common;
35
36namespace OpenSim.Data.NHibernate.Tests
37{
38 [TestFixture, DatabaseTest]
39 public class NHibernateSQLiteEstateTest : BasicEstateTest
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 public string file;
43 public NHibernateManager database;
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
56
57 db = new NHibernateEstateData();
58 db.Initialise(connect);
59 database = ((NHibernateEstateData)db).Manager;
60 }
61 catch (Exception e)
62 {
63 m_log.Error(e.ToString());
64 Assert.Ignore();
65 }
66 }
67
68 [TestFixtureTearDown]
69 public void Cleanup()
70 {
71 if (db != null)
72 {
73 ((NHibernateEstateData)db).Dispose();
74 }
75 if (database != null)
76 {
77 database.DropSchema();
78 }
79 }
80
81 }
82}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs
deleted file mode 100644
index 24a19c9..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using NUnit.Framework;
31using OpenSim.Data.Tests;
32using log4net;
33using System.Reflection;
34using OpenSim.Tests.Common;
35
36namespace OpenSim.Data.NHibernate.Tests
37{
38 [TestFixture, DatabaseTest]
39 public class NHibernateSQLiteGridTest : BasicGridTest
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 public string file;
43 public NHibernateManager database;
44 public string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
45
46 [TestFixtureSetUp]
47 public void Init()
48 {
49 SuperInit();
50 // If we manage to connect to the database with the user
51 // and password above it is our test database, and run
52 // these tests. If anything goes wrong, ignore these
53 // tests.
54 try
55 {
56 db = new NHibernateGridData();
57 db.Initialise(connect);
58 database = ((NHibernateGridData)db).Manager;
59 }
60 catch (Exception e)
61 {
62 m_log.Error(e.ToString());
63 Assert.Ignore();
64 }
65 }
66
67 [TestFixtureTearDown]
68 public void Cleanup()
69 {
70 if (db != null)
71 {
72 db.Dispose();
73 }
74 if (database != null)
75 {
76 database.DropSchema();
77 }
78 }
79 }
80}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs
deleted file mode 100644
index ec15c55..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using NUnit.Framework;
31using OpenSim.Data.Tests;
32using log4net;
33using System.Reflection;
34using OpenSim.Tests.Common;
35
36namespace OpenSim.Data.NHibernate.Tests
37{
38 [TestFixture, DatabaseTest]
39 public class NHibernateSQLiteInventoryTest : BasicInventoryTest
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 public string file;
43 public NHibernateManager database;
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
56
57 db = new NHibernateInventoryData();
58 db.Initialise(connect);
59 database = ((NHibernateInventoryData)db).Manager;
60 }
61 catch (Exception e)
62 {
63 m_log.Error(e.ToString());
64 Assert.Ignore();
65 }
66 }
67
68 [TestFixtureTearDown]
69 public void Cleanup()
70 {
71 if (db != null)
72 {
73 db.Dispose();
74 }
75 if (database != null)
76 {
77 database.DropSchema();
78 }
79 }
80
81 }
82}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs
deleted file mode 100644
index 692ba5a..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using NUnit.Framework;
31using OpenSim.Data.Tests;
32using log4net;
33using System.Reflection;
34using OpenSim.Tests.Common;
35
36namespace OpenSim.Data.NHibernate.Tests
37{
38 [TestFixture, DatabaseTest]
39 public class NHibernateSQLiteRegionTest : BasicRegionTest
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 public string file;
43 public NHibernateManager database;
44
45 [TestFixtureSetUp]
46 public void Init()
47 {
48 SuperInit();
49 // If we manage to connect to the database with the user
50 // and password above it is our test database, and run
51 // these tests. If anything goes wrong, ignore these
52 // tests.
53 try
54 {
55 string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
56
57 db = new NHibernateRegionData();
58 db.Initialise(connect);
59 database = ((NHibernateRegionData)db).Manager;
60 }
61 catch (Exception e)
62 {
63 m_log.Error(e.ToString());
64 Assert.Ignore();
65 }
66 }
67
68 [TestFixtureTearDown]
69 public void Cleanup()
70 {
71 if (db != null)
72 {
73 db.Dispose();
74 }
75 if (database != null)
76 {
77 database.DropSchema();
78 }
79 }
80
81 }
82}
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs
deleted file mode 100644
index 32a5bbe..0000000
--- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using NUnit.Framework;
31using OpenSim.Data.Tests;
32using log4net;
33using System.Reflection;
34using OpenSim.Tests.Common;
35
36namespace OpenSim.Data.NHibernate.Tests
37{
38
39 [TestFixture, DatabaseTest]
40 public class NHibernateSQLiteUserTest : BasicUserTest
41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 public string file;
44 public NHibernateManager database;
45
46 [TestFixtureSetUp]
47 public void Init()
48 {
49 SuperInit();
50 // If we manage to connect to the database with the user
51 // and password above it is our test database, and run
52 // these tests. If anything goes wrong, ignore these
53 // tests.
54 try
55 {
56 string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
57
58 db = new NHibernateUserData();
59 db.Initialise(connect);
60 database = ((NHibernateUserData)db).Manager;
61 }
62 catch (Exception e)
63 {
64 m_log.Error(e.ToString());
65 Assert.Ignore();
66 }
67 }
68
69 [TestFixtureTearDown]
70 public void Cleanup()
71 {
72 if (db != null)
73 {
74 db.Dispose();
75 }
76 if (database != null)
77 {
78 database.DropSchema();
79 }
80 }
81 }
82}
diff --git a/OpenSim/Data/NHibernate/TextureUserType.cs b/OpenSim/Data/NHibernate/TextureUserType.cs
deleted file mode 100644
index 57a5296..0000000
--- a/OpenSim/Data/NHibernate/TextureUserType.cs
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33using OpenMetaverse;
34using OpenSim.Framework;
35
36namespace OpenSim.Data.NHibernate
37{
38 [Serializable]
39 public class TextureUserType: IUserType
40 {
41 public object Assemble(object cached, object owner)
42 {
43 return cached;
44 }
45
46 bool IUserType.Equals(object texture1, object texture2)
47 {
48 return texture1.Equals(texture2);
49 }
50
51 public object DeepCopy(object texture)
52 {
53 if (texture == null)
54 {
55 // TODO: should parametrize this texture out
56 return new Primitive.TextureEntry(new UUID(Constants.DefaultTexture));
57 }
58 else
59 {
60 byte[] bytes = ((Primitive.TextureEntry)texture).GetBytes();
61 return new Primitive.TextureEntry(bytes, 0, bytes.Length);
62 }
63 }
64
65 public object Disassemble(object texture)
66 {
67 return texture;
68 }
69
70 public int GetHashCode(object texture)
71 {
72 return (texture == null) ? 0 : texture.GetHashCode();
73 }
74
75 public bool IsMutable
76 {
77 get { return false; }
78 }
79
80 public object NullSafeGet(IDataReader rs, string[] names, object owner)
81 {
82 object texture = null;
83
84 int ord = rs.GetOrdinal(names[0]);
85 if (!rs.IsDBNull(ord))
86 {
87 byte[] bytes = (byte[])rs[ord];
88 texture = new Primitive.TextureEntry(bytes, 0, bytes.Length);
89 }
90
91 return texture;
92 }
93
94 public void NullSafeSet(IDbCommand cmd, object obj, int index)
95 {
96 Primitive.TextureEntry texture = (Primitive.TextureEntry)obj;
97 ((IDataParameter)cmd.Parameters[index]).Value = texture.GetBytes();
98 }
99
100 public object Replace(object original, object target, object owner)
101 {
102 return original;
103 }
104
105 public Type ReturnedType
106 {
107 get { return typeof(Primitive.TextureEntry); }
108 }
109
110 public SqlType[] SqlTypes
111 {
112 get { return new SqlType [] { NHibernateUtil.Binary.SqlType }; }
113 }
114 }
115}
diff --git a/OpenSim/Data/NHibernate/UInt16Type.cs b/OpenSim/Data/NHibernate/UInt16Type.cs
deleted file mode 100644
index 8e17463..0000000
--- a/OpenSim/Data/NHibernate/UInt16Type.cs
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33
34namespace OpenSim.Data.NHibernate
35{
36 [Serializable]
37 public class UInt16Type : IUserType
38 {
39 public object Assemble(object cached, object owner)
40 {
41 return cached;
42 }
43
44 bool IUserType.Equals(object uint1, object uint2)
45 {
46 return uint1.Equals(uint2);
47 }
48
49 public object DeepCopy(object uint1)
50 {
51 return uint1;
52 }
53
54 public object Disassemble(object uint1)
55 {
56 return uint1;
57 }
58
59 public int GetHashCode(object uint1)
60 {
61 return (uint1 == null) ? 0 : uint1.GetHashCode();
62 }
63
64 public bool IsMutable
65 {
66 get { return false; }
67 }
68
69 public object NullSafeGet(IDataReader rs, string[] names, object owner)
70 {
71 object uint1 = null;
72
73 int ord = rs.GetOrdinal(names[0]);
74 if (!rs.IsDBNull(ord))
75 {
76 uint1 = (UInt16)rs.GetInt32(ord);
77 }
78
79 return uint1;
80 }
81
82 public void NullSafeSet(IDbCommand cmd, object obj, int index)
83 {
84 UInt16 uint1 = (UInt16)obj;
85 ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1);
86 }
87
88 public object Replace(object original, object target, object owner)
89 {
90 return original;
91 }
92
93 public Type ReturnedType
94 {
95 get { return typeof(UInt16); }
96 }
97
98 public SqlType[] SqlTypes
99 {
100 get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
101 }
102 }
103}
diff --git a/OpenSim/Data/NHibernate/UInt32Type.cs b/OpenSim/Data/NHibernate/UInt32Type.cs
deleted file mode 100644
index 6b1cb36..0000000
--- a/OpenSim/Data/NHibernate/UInt32Type.cs
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33
34namespace OpenSim.Data.NHibernate
35{
36 [Serializable]
37 public class UInt32Type : IUserType
38 {
39 public object Assemble(object cached, object owner)
40 {
41 return cached;
42 }
43
44 bool IUserType.Equals(object uint1, object uint2)
45 {
46 return uint1.Equals(uint2);
47 }
48
49 public object DeepCopy(object uint1)
50 {
51 return uint1;
52 }
53
54 public object Disassemble(object uint1)
55 {
56 return uint1;
57 }
58
59 public int GetHashCode(object uint1)
60 {
61 return (uint1 == null) ? 0 : uint1.GetHashCode();
62 }
63
64 public bool IsMutable
65 {
66 get { return false; }
67 }
68
69 public object NullSafeGet(IDataReader rs, string[] names, object owner)
70 {
71 object uint1 = null;
72
73 int ord = rs.GetOrdinal(names[0]);
74 if (!rs.IsDBNull(ord))
75 {
76 uint1 = (UInt32)rs.GetInt32(ord);
77 }
78
79 return uint1;
80 }
81
82 public void NullSafeSet(IDbCommand cmd, object obj, int index)
83 {
84 UInt32 uint1 = (UInt32)obj;
85 ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1);
86 }
87
88 public object Replace(object original, object target, object owner)
89 {
90 return original;
91 }
92
93 public Type ReturnedType
94 {
95 get { return typeof(UInt32); }
96 }
97
98 public SqlType[] SqlTypes
99 {
100 get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; }
101 }
102 }
103}
diff --git a/OpenSim/Data/NHibernate/UInt64Type.cs b/OpenSim/Data/NHibernate/UInt64Type.cs
deleted file mode 100644
index 6484367..0000000
--- a/OpenSim/Data/NHibernate/UInt64Type.cs
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Data;
30using NHibernate;
31using NHibernate.SqlTypes;
32using NHibernate.UserTypes;
33
34namespace OpenSim.Data.NHibernate
35{
36 [Serializable]
37 public class UInt64Type : IUserType
38 {
39 public object Assemble(object cached, object owner)
40 {
41 return cached;
42 }
43
44 bool IUserType.Equals(object uint1, object uint2)
45 {
46 return uint1.Equals(uint2);
47 }
48
49 public object DeepCopy(object uint1)
50 {
51 return uint1;
52 }
53
54 public object Disassemble(object uint1)
55 {
56 return uint1;
57 }
58
59 public int GetHashCode(object uint1)
60 {
61 return (uint1 == null) ? 0 : uint1.GetHashCode();
62 }
63
64 public bool IsMutable
65 {
66 get { return false; }
67 }
68
69 public object NullSafeGet(IDataReader rs, string[] names, object owner)
70 {
71 object uint1 = null;
72
73 int ord = rs.GetOrdinal(names[0]);
74 if (!rs.IsDBNull(ord))
75 {
76 uint1 = (UInt64)rs.GetInt64(ord);
77 }
78
79 return uint1;
80 }
81
82 public void NullSafeSet(IDbCommand cmd, object obj, int index)
83 {
84 UInt64 uint1 = (UInt64)obj;
85 ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt64(uint1);
86 }
87
88 public object Replace(object original, object target, object owner)
89 {
90 return original;
91 }
92
93 public Type ReturnedType
94 {
95 get { return typeof(UInt64); }
96 }
97
98 public SqlType[] SqlTypes
99 {
100 get { return new SqlType [] { NHibernateUtil.Int64.SqlType }; }
101 }
102 }
103}
diff --git a/OpenSim/Data/NHibernate/UserFriend.cs b/OpenSim/Data/NHibernate/UserFriend.cs
deleted file mode 100644
index f0868a1..0000000
--- a/OpenSim/Data/NHibernate/UserFriend.cs
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29
30namespace OpenSim.Data.NHibernate
31{
32 public class UserFriend
33 {
34 public UserFriend()
35 {
36 }
37
38 public UserFriend(UUID userFriendID, UUID ownerID, UUID friendID, uint friendPermissions)
39 {
40 this.UserFriendID = userFriendID;
41 this.OwnerID = ownerID;
42 this.FriendID = friendID;
43 this.FriendPermissions = friendPermissions;
44 }
45
46 private UUID userFriendId;
47 public UUID UserFriendID
48 {
49 get { return userFriendId; }
50 set { userFriendId = value; }
51 }
52 private UUID ownerId;
53 public UUID OwnerID
54 {
55 get { return ownerId; }
56 set { ownerId = value; }
57 }
58 private UUID friendId;
59 public UUID FriendID
60 {
61 get { return friendId; }
62 set { friendId = value; }
63 }
64 private uint friendPermissions;
65 public uint FriendPermissions
66 {
67 get { return friendPermissions; }
68 set { friendPermissions = value; }
69 }
70
71 }
72}
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index 97990e1..60a8874 100644
--- a/OpenSim/Data/Tests/BasicRegionTest.cs
+++ b/OpenSim/Data/Tests/BasicRegionTest.cs
@@ -323,7 +323,6 @@ namespace OpenSim.Data.Tests
323 sop.ObjectFlags = 0; 323 sop.ObjectFlags = 0;
324 324
325 SceneObjectGroup sog = new SceneObjectGroup(sop); 325 SceneObjectGroup sog = new SceneObjectGroup(sop);
326 sog.SetScene(scene); // Reguired by nhibernate database module.
327 326
328 // Inserts group in DB 327 // Inserts group in DB
329 db.StoreObject(sog,region3); 328 db.StoreObject(sog,region3);
diff --git a/OpenSim/Data/Tests/DataTestUtil.cs b/OpenSim/Data/Tests/DataTestUtil.cs
index f781ea6..d211ab3 100644
--- a/OpenSim/Data/Tests/DataTestUtil.cs
+++ b/OpenSim/Data/Tests/DataTestUtil.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Data.Tests
39 public class DataTestUtil 39 public class DataTestUtil
40 { 40 {
41 public const uint UNSIGNED_INTEGER_MIN = uint.MinValue; 41 public const uint UNSIGNED_INTEGER_MIN = uint.MinValue;
42 public const uint UNSIGNED_INTEGER_MAX = uint.MaxValue / 2; // NHibernate does not support unsigned integer range. 42 public const uint UNSIGNED_INTEGER_MAX = uint.MaxValue;
43 43
44 public const int INTEGER_MIN = int.MinValue + 1; // Postgresql requires +1 to .NET int.MinValue 44 public const int INTEGER_MIN = int.MinValue + 1; // Postgresql requires +1 to .NET int.MinValue
45 public const int INTEGER_MAX = int.MaxValue; 45 public const int INTEGER_MAX = int.MaxValue;
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index a74169e..317b3a0 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -403,7 +403,7 @@ namespace OpenSim.Framework.Communications
403 /// In case, we are invoked asynchroneously this object will keep track of the state 403 /// In case, we are invoked asynchroneously this object will keep track of the state
404 /// </summary> 404 /// </summary>
405 AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state); 405 AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state);
406 ThreadPool.QueueUserWorkItem(RequestHelper, ar); 406 ThreadPool.UnsafeQueueUserWorkItem(RequestHelper, ar);
407 return ar; 407 return ar;
408 } 408 }
409 409
diff --git a/OpenSim/Framework/Parallel.cs b/OpenSim/Framework/Parallel.cs
index cf4f773..ab2e108 100644
--- a/OpenSim/Framework/Parallel.cs
+++ b/OpenSim/Framework/Parallel.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Framework
66 66
67 for (int i = 0; i < threadCount; i++) 67 for (int i = 0; i < threadCount; i++)
68 { 68 {
69 ThreadPool.QueueUserWorkItem( 69 ThreadPool.UnsafeQueueUserWorkItem(
70 delegate(object o) 70 delegate(object o)
71 { 71 {
72 int threadIndex = (int)o; 72 int threadIndex = (int)o;
@@ -122,7 +122,7 @@ namespace OpenSim.Framework
122 122
123 for (int i = 0; i < threadCount; i++) 123 for (int i = 0; i < threadCount; i++)
124 { 124 {
125 ThreadPool.QueueUserWorkItem( 125 ThreadPool.UnsafeQueueUserWorkItem(
126 delegate(object o) 126 delegate(object o)
127 { 127 {
128 int threadIndex = (int)o; 128 int threadIndex = (int)o;
@@ -178,7 +178,7 @@ namespace OpenSim.Framework
178 178
179 for (int i = 0; i < threadCount; i++) 179 for (int i = 0; i < threadCount; i++)
180 { 180 {
181 ThreadPool.QueueUserWorkItem( 181 ThreadPool.UnsafeQueueUserWorkItem(
182 delegate(object o) 182 delegate(object o)
183 { 183 {
184 int threadIndex = (int)o; 184 int threadIndex = (int)o;
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 942fed9..85d7be2 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1609,7 +1609,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1609 //while (true) 1609 //while (true)
1610 //{ 1610 //{
1611 // context = m_httpListener.GetContext(); 1611 // context = m_httpListener.GetContext();
1612 // ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context); 1612 // ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(HandleRequest), context);
1613 // } 1613 // }
1614 } 1614 }
1615 catch (Exception e) 1615 catch (Exception e)
diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs
index df5eaab..49f0fa8 100644
--- a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs
@@ -149,7 +149,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
149 friendlistupdater.OnGetRegionData += m_regionModule.GetRegionInfo; 149 friendlistupdater.OnGetRegionData += m_regionModule.GetRegionInfo;
150 friendlistupdater.OnDone += PresenceUpdateDone; 150 friendlistupdater.OnDone += PresenceUpdateDone;
151 WaitCallback cb = new WaitCallback(friendlistupdater.go); 151 WaitCallback cb = new WaitCallback(friendlistupdater.go);
152 ThreadPool.QueueUserWorkItem(cb); 152 ThreadPool.UnsafeQueueUserWorkItem(cb, null);
153 } 153 }
154 else 154 else
155 { 155 {
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index b027882..a966b42 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
791 /// <param name="map">heightmap</param> 791 /// <param name="map">heightmap</param>
792 public virtual void SendLayerData(float[] map) 792 public virtual void SendLayerData(float[] map)
793 { 793 {
794 ThreadPool.QueueUserWorkItem(DoSendLayerData, map); 794 ThreadPool.UnsafeQueueUserWorkItem(DoSendLayerData, map);
795 } 795 }
796 796
797 /// <summary> 797 /// <summary>
@@ -912,7 +912,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
912 /// <param name="windSpeeds">16x16 array of wind speeds</param> 912 /// <param name="windSpeeds">16x16 array of wind speeds</param>
913 public virtual void SendWindData(Vector2[] windSpeeds) 913 public virtual void SendWindData(Vector2[] windSpeeds)
914 { 914 {
915 ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds); 915 ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds);
916 } 916 }
917 917
918 /// <summary> 918 /// <summary>
@@ -921,7 +921,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
921 /// <param name="windSpeeds">16x16 array of cloud densities</param> 921 /// <param name="windSpeeds">16x16 array of cloud densities</param>
922 public virtual void SendCloudData(float[] cloudDensity) 922 public virtual void SendCloudData(float[] cloudDensity)
923 { 923 {
924 ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendCloudData), (object)cloudDensity); 924 ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(DoSendCloudData), (object)cloudDensity);
925 } 925 }
926 926
927 /// <summary> 927 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 5ca4178..d45c35c 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -313,11 +313,11 @@ namespace Flotsam.RegionModules.AssetCache
313 313
314 } 314 }
315 315
316 ThreadPool.QueueUserWorkItem( 316 ThreadPool.UnsafeQueueUserWorkItem(
317 delegate 317 delegate
318 { 318 {
319 WriteFileCache(filename, asset); 319 WriteFileCache(filename, asset);
320 } 320 }, null
321 ); 321 );
322 } 322 }
323 } 323 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 4fb4c51..1260584 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1095,7 +1095,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1095 // The reason is so we don't cause the thread to freeze waiting 1095 // The reason is so we don't cause the thread to freeze waiting
1096 // for the 1 second it costs to start a thread manually. 1096 // for the 1 second it costs to start a thread manually.
1097 if (!threadrunning) 1097 if (!threadrunning)
1098 ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread)); 1098 ThreadPool.UnsafeQueueUserWorkItem(this.StartThread, null);
1099 1099
1100 lock (m_rootAgents) 1100 lock (m_rootAgents)
1101 { 1101 {