From 65c5efe43b68700bad94076d4cd421160203c5de Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 16 May 2008 01:22:11 +0000 Subject: Formatting cleanup. --- OpenSim/Data/NHibernate/LLUUIDUserType.cs | 4 +-- OpenSim/Data/NHibernate/NHibernateAssetData.cs | 10 +++--- OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 30 ++++++++-------- OpenSim/Data/NHibernate/NHibernateUserData.cs | 42 +++++++++++----------- 4 files changed, 43 insertions(+), 43 deletions(-) (limited to 'OpenSim/Data/NHibernate') diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs index e4f1dc2..0f10344 100644 --- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs +++ b/OpenSim/Data/NHibernate/LLUUIDUserType.cs @@ -35,7 +35,7 @@ using NHibernate.UserTypes; namespace OpenSim.Data.NHibernate { [Serializable] - public class LLUUIDUserType: IUserType + public class LLUUIDUserType: IUserType { public object Assemble(object cached, object owner) { @@ -69,7 +69,7 @@ namespace OpenSim.Data.NHibernate public object NullSafeGet(IDataReader rs, string[] names, object owner) { - object uuid = null; + object uuid = null; int ord = rs.GetOrdinal(names[0]); if (!rs.IsDBNull(ord)) diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 4eb9eef..075f2e9 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs @@ -65,20 +65,20 @@ namespace OpenSim.Data.NHibernate // TODO: make this a real exception type throw new Exception("Malformed Inventory connection string '" + connect + "'"); } - + // NHibernate setup cfg = new Configuration(); - cfg.SetProperty(Environment.ConnectionProvider, + cfg.SetProperty(Environment.ConnectionProvider, "NHibernate.Connection.DriverConnectionProvider"); - cfg.SetProperty(Environment.Dialect, + cfg.SetProperty(Environment.Dialect, "NHibernate.Dialect." + parts[0]); - cfg.SetProperty(Environment.ConnectionDriver, + cfg.SetProperty(Environment.ConnectionDriver, "NHibernate.Driver." + parts[1]); cfg.SetProperty(Environment.ConnectionString, parts[2]); cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( MemoryStream stream = + using ( MemoryStream stream = HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index fa75588..228e0b6 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs @@ -62,23 +62,23 @@ namespace OpenSim.Data.NHibernate // TODO: make this a real exception type throw new Exception("Malformed Inventory connection string '" + connect + "'"); } - + // Establish NHibernate Connection cfg = new Configuration(); - cfg.SetProperty(Environment.ConnectionProvider, + cfg.SetProperty(Environment.ConnectionProvider, "NHibernate.Connection.DriverConnectionProvider"); - cfg.SetProperty(Environment.Dialect, + cfg.SetProperty(Environment.Dialect, "NHibernate.Dialect." + parts[0]); - cfg.SetProperty(Environment.ConnectionDriver, + cfg.SetProperty(Environment.ConnectionDriver, "NHibernate.Driver." + parts[1]); cfg.SetProperty(Environment.ConnectionString, parts[2]); cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( MemoryStream stream = + using ( MemoryStream stream = HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); - + // If uncommented this will auto create tables, but it // does drops of the old tables, so we need a smarter way // to acturally manage this. @@ -120,8 +120,8 @@ namespace OpenSim.Data.NHibernate /***************************************************************** * - * Basic CRUD operations on Data - * + * Basic CRUD operations on Data + * ****************************************************************/ // READ @@ -195,7 +195,7 @@ namespace OpenSim.Data.NHibernate } /// - /// + /// /// /// public void deleteInventoryItem(LLUUID itemID) @@ -279,7 +279,7 @@ namespace OpenSim.Data.NHibernate } /// - /// + /// /// /// public void deleteInventoryFolder(LLUUID folderID) @@ -353,7 +353,7 @@ namespace OpenSim.Data.NHibernate { updateInventoryItem(item); } - + /// @@ -403,9 +403,9 @@ namespace OpenSim.Data.NHibernate return null; } } - + /// - /// Append a list of all the child folders of a parent folder + /// Append a list of all the child folders of a parent folder /// /// list where folders will be appended /// ID of parent @@ -413,7 +413,7 @@ namespace OpenSim.Data.NHibernate { using (ISession session = factory.OpenSession()) { - + ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); criteria.Add(Expression.Eq("ParentID", parentID)); foreach (InventoryFolderBase item in criteria.List()) @@ -443,7 +443,7 @@ namespace OpenSim.Data.NHibernate for (int i = 0; i < folders.Count; i++) getInventoryFolders(ref folders, folders[i].ID); - + return folders; } } diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 6ba2783..4de0291 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs @@ -64,20 +64,20 @@ namespace OpenSim.Data.NHibernate // This is stubbing for now, it will become dynamic later and support different db backends cfg = new Configuration(); - cfg.SetProperty(Environment.ConnectionProvider, + cfg.SetProperty(Environment.ConnectionProvider, "NHibernate.Connection.DriverConnectionProvider"); - cfg.SetProperty(Environment.Dialect, + cfg.SetProperty(Environment.Dialect, "NHibernate.Dialect." + parts[0]); - cfg.SetProperty(Environment.ConnectionDriver, + cfg.SetProperty(Environment.ConnectionDriver, "NHibernate.Driver." + parts[1]); cfg.SetProperty(Environment.ConnectionString, parts[2]); cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( MemoryStream stream = + using ( MemoryStream stream = HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); - + // new SchemaExport(cfg).Create(true, true); factory = cfg.BuildSessionFactory(); @@ -122,7 +122,7 @@ namespace OpenSim.Data.NHibernate // BUG: CATCHALL IS BAD. } catch (Exception) {} - + return (user != null); } @@ -151,7 +151,7 @@ namespace OpenSim.Data.NHibernate // TODO: save agent transaction.Commit(); } - } + } } else { @@ -162,7 +162,7 @@ namespace OpenSim.Data.NHibernate private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) { - if (agent == null) + if (agent == null) { // TODO: got to figure out how to do a delete right } @@ -178,7 +178,7 @@ namespace OpenSim.Data.NHibernate session.Update(agent); } } - + } override public bool UpdateUserProfile(UserProfileData profile) { @@ -193,7 +193,7 @@ namespace OpenSim.Data.NHibernate transaction.Commit(); return true; } - } + } } else { @@ -202,7 +202,7 @@ namespace OpenSim.Data.NHibernate return true; } } - + override public void AddNewUserAgent(UserAgentData agent) { using (ISession session = factory.OpenSession()) @@ -212,9 +212,9 @@ namespace OpenSim.Data.NHibernate session.Save(agent); transaction.Commit(); } - } + } } - + public void UpdateUserAgent(UserAgentData agent) { using (ISession session = factory.OpenSession()) @@ -224,7 +224,7 @@ namespace OpenSim.Data.NHibernate session.Update(agent); transaction.Commit(); } - } + } } override public UserAgentData GetAgentByUUID(LLUUID uuid) @@ -262,7 +262,7 @@ namespace OpenSim.Data.NHibernate { return GetUserByName(fname, lname).CurrentAgent; } - + override public UserAgentData GetAgentByName(string name) { return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); @@ -273,7 +273,7 @@ namespace OpenSim.Data.NHibernate List results = new List(); string[] querysplit; querysplit = query.Split(' '); - + if (querysplit.Length == 2) { using (ISession session = factory.OpenSession()) @@ -293,7 +293,7 @@ namespace OpenSim.Data.NHibernate } return results; } - + // TODO: actually implement these public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) {return;} public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;} @@ -306,7 +306,7 @@ namespace OpenSim.Data.NHibernate /// Appearance /// TODO: stubs for now to get us to a compiling state gently - public AvatarAppearance GetUserAppearance(LLUUID user) + public AvatarAppearance GetUserAppearance(LLUUID user) { AvatarAppearance appearance; // TODO: I'm sure I'll have to do something silly here @@ -345,19 +345,19 @@ namespace OpenSim.Data.NHibernate } transaction.Commit(); } - } + } } override public void AddAttachment(LLUUID user, LLUUID item) { return; } - + override public void RemoveAttachment(LLUUID user, LLUUID item) { return; } - + override public List GetAttachments(LLUUID user) { return new List(); -- cgit v1.1