aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/NHibernate')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs14
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs18
-rw-r--r--OpenSim/Data/NHibernate/NHibernateManager.cs9
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs16
-rw-r--r--OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs6
5 files changed, 26 insertions, 37 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index cc018dd..db90d09 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -26,17 +26,15 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Data; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using libsecondlife;
32using log4net;
32using NHibernate; 33using NHibernate;
33using NHibernate.Cfg; 34using NHibernate.Cfg;
34using NHibernate.Tool.hbm2ddl;
35using NHibernate.Mapping.Attributes; 35using NHibernate.Mapping.Attributes;
36using OpenSim.Data;
37using OpenSim.Framework; 36using OpenSim.Framework;
38using OpenSim.Framework.Console; 37using Environment=NHibernate.Cfg.Environment;
39using Environment = NHibernate.Cfg.Environment;
40 38
41namespace OpenSim.Data.NHibernate 39namespace OpenSim.Data.NHibernate
42{ 40{
@@ -45,7 +43,7 @@ namespace OpenSim.Data.NHibernate
45 /// </summary> 43 /// </summary>
46 public class NHibernateAssetData : AssetDataBase, IDisposable 44 public class NHibernateAssetData : AssetDataBase, IDisposable
47 { 45 {
48 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 47
50 private Configuration cfg; 48 private Configuration cfg;
51 private ISessionFactory factory; 49 private ISessionFactory factory;
@@ -67,8 +65,8 @@ namespace OpenSim.Data.NHibernate
67 cfg.AddAssembly("OpenSim.Data.NHibernate"); 65 cfg.AddAssembly("OpenSim.Data.NHibernate");
68 66
69 HbmSerializer.Default.Validate = true; 67 HbmSerializer.Default.Validate = true;
70 using ( System.IO.MemoryStream stream = 68 using ( MemoryStream stream =
71 HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) 69 HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
72 cfg.AddInputStream(stream); 70 cfg.AddInputStream(stream);
73 71
74 // new SchemaExport(cfg).Create(true, true); 72 // new SchemaExport(cfg).Create(true, true);
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index a004e29..1ac0f0c 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -26,25 +26,23 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Data;
30using System.Reflection;
31using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO;
31using System.Reflection;
32using libsecondlife; 32using libsecondlife;
33using log4net;
33using NHibernate; 34using NHibernate;
34using NHibernate.Expression;
35using NHibernate.Cfg; 35using NHibernate.Cfg;
36using NHibernate.Tool.hbm2ddl; 36using NHibernate.Expression;
37using NHibernate.Mapping.Attributes; 37using NHibernate.Mapping.Attributes;
38using OpenSim.Data;
39using OpenSim.Framework; 38using OpenSim.Framework;
40using OpenSim.Framework.Console; 39using Environment=NHibernate.Cfg.Environment;
41using Environment = NHibernate.Cfg.Environment;
42 40
43namespace OpenSim.Data.NHibernate 41namespace OpenSim.Data.NHibernate
44{ 42{
45 public class NHibernateInventoryData: IInventoryData 43 public class NHibernateInventoryData: IInventoryData
46 { 44 {
47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 46
49 private Configuration cfg; 47 private Configuration cfg;
50 private ISessionFactory factory; 48 private ISessionFactory factory;
@@ -74,8 +72,8 @@ namespace OpenSim.Data.NHibernate
74 cfg.AddAssembly("OpenSim.Data.NHibernate"); 72 cfg.AddAssembly("OpenSim.Data.NHibernate");
75 73
76 HbmSerializer.Default.Validate = true; 74 HbmSerializer.Default.Validate = true;
77 using ( System.IO.MemoryStream stream = 75 using ( MemoryStream stream =
78 HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) 76 HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
79 cfg.AddInputStream(stream); 77 cfg.AddInputStream(stream);
80 78
81 // new SchemaExport(cfg).Create(true, true); 79 // new SchemaExport(cfg).Create(true, true);
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs
index edef8ad..6f13294 100644
--- a/OpenSim/Data/NHibernate/NHibernateManager.cs
+++ b/OpenSim/Data/NHibernate/NHibernateManager.cs
@@ -25,18 +25,15 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System.Reflection;
29using System.Collections.Generic; 29using log4net;
30using System.Data;
31using libsecondlife;
32using NHibernate; 30using NHibernate;
33using NHibernate.Cfg;
34 31
35namespace OpenSim.Data.NHibernate 32namespace OpenSim.Data.NHibernate
36{ 33{
37 internal class NHibernateManager 34 internal class NHibernateManager
38 { 35 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 36 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 37
41 private ISessionFactory factory; 38 private ISessionFactory factory;
42 private ISession session; 39 private ISession session;
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 0bbebaa..c0fe26c 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -25,20 +25,16 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
29using System.Data;
30using System.Reflection;
31using System.Collections.Generic; 28using System.Collections.Generic;
29using System.IO;
30using System.Reflection;
32using libsecondlife; 31using libsecondlife;
32using log4net;
33using NHibernate; 33using NHibernate;
34using NHibernate.Cfg; 34using NHibernate.Cfg;
35using NHibernate.Expression; 35using NHibernate.Expression;
36using NHibernate.Tool.hbm2ddl;
37using NHibernate.Mapping.Attributes; 36using NHibernate.Mapping.Attributes;
38using OpenSim.Data;
39using OpenSim.Framework; 37using OpenSim.Framework;
40using OpenSim.Framework.Console;
41using Environment = NHibernate.Cfg.Environment;
42 38
43namespace OpenSim.Data.NHibernate 39namespace OpenSim.Data.NHibernate
44{ 40{
@@ -47,7 +43,7 @@ namespace OpenSim.Data.NHibernate
47 /// </summary> 43 /// </summary>
48 public class NHibernateUserData : UserDataBase 44 public class NHibernateUserData : UserDataBase
49 { 45 {
50 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 47
52 private Configuration cfg; 48 private Configuration cfg;
53 private ISessionFactory factory; 49 private ISessionFactory factory;
@@ -69,8 +65,8 @@ namespace OpenSim.Data.NHibernate
69 cfg.AddAssembly("OpenSim.Data.NHibernate"); 65 cfg.AddAssembly("OpenSim.Data.NHibernate");
70 66
71 HbmSerializer.Default.Validate = true; 67 HbmSerializer.Default.Validate = true;
72 using ( System.IO.MemoryStream stream = 68 using ( MemoryStream stream =
73 HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) 69 HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
74 cfg.AddInputStream(stream); 70 cfg.AddInputStream(stream);
75 71
76 // new SchemaExport(cfg).Create(true, true); 72 // new SchemaExport(cfg).Create(true, true);
diff --git a/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs
index 2c1f7dd..e4f1dc2 100644
--- a/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs
+++ b/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs
@@ -27,10 +27,10 @@
27 27
28using System; 28using System;
29using System.Data; 29using System.Data;
30using libsecondlife;
30using NHibernate; 31using NHibernate;
31using NHibernate.SqlTypes; 32using NHibernate.SqlTypes;
32using NHibernate.UserTypes; 33using NHibernate.UserTypes;
33using libsecondlife;
34 34
35namespace OpenSim.Data.NHibernate 35namespace OpenSim.Data.NHibernate
36{ 36{
@@ -67,7 +67,7 @@ namespace OpenSim.Data.NHibernate
67 get { return false; } 67 get { return false; }
68 } 68 }
69 69
70 public object NullSafeGet(System.Data.IDataReader rs, string[] names, object owner) 70 public object NullSafeGet(IDataReader rs, string[] names, object owner)
71 { 71 {
72 object uuid = null; 72 object uuid = null;
73 73
@@ -81,7 +81,7 @@ namespace OpenSim.Data.NHibernate
81 return uuid; 81 return uuid;
82 } 82 }
83 83
84 public void NullSafeSet(System.Data.IDbCommand cmd, object obj, int index) 84 public void NullSafeSet(IDbCommand cmd, object obj, int index)
85 { 85 {
86 LLUUID uuid = (LLUUID)obj; 86 LLUUID uuid = (LLUUID)obj;
87 ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString(); 87 ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString();