From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- OpenSim/Data/NHibernate/NHibernateRegionData.cs | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'OpenSim/Data/NHibernate/NHibernateRegionData.cs') diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index 52db32d..9682d87 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs @@ -89,10 +89,10 @@ namespace OpenSim.Data.NHibernate using (MemoryStream stream = HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); - + factory = cfg.BuildSessionFactory(); session = factory.OpenSession(); - + // This actually does the roll forward assembly stuff Assembly assem = GetType().Assembly; Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "RegionStore"); @@ -113,7 +113,7 @@ namespace OpenSim.Data.NHibernate { return null; } - + // This looks inefficient, but it turns out that it isn't // based on trial runs with nhibernate 1.2 private void SaveOrUpdate(SceneObjectPart p) @@ -164,7 +164,7 @@ namespace OpenSim.Data.NHibernate /// the region UUID public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) { - try + try { foreach (SceneObjectPart part in obj.Children.Values) { @@ -173,7 +173,7 @@ namespace OpenSim.Data.NHibernate } session.Flush(); } - catch (Exception e) + catch (Exception e) { m_log.Error("Can't save: ", e); } @@ -196,7 +196,7 @@ namespace OpenSim.Data.NHibernate group.AddPart(p); group.RootPart = p; } - else + else { group.AddPart(p); } @@ -232,7 +232,7 @@ namespace OpenSim.Data.NHibernate { Dictionary SOG = new Dictionary(); List ret = new List(); - + ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart)); criteria.Add(Expression.Eq("RegionID", regionUUID)); criteria.AddOrder( Order.Asc("ParentID") ); @@ -246,12 +246,12 @@ namespace OpenSim.Data.NHibernate group.RootPart = p; SOG.Add(p.ParentUUID, group); } - else + else { SOG[p.ParentUUID].AddPart(p); } // get the inventory - + ICriteria InvCriteria = session.CreateCriteria(typeof(TaskInventoryItem)); InvCriteria.Add(Expression.Eq("ParentPartID", p.UUID)); IList inventory = new List(); @@ -263,7 +263,7 @@ namespace OpenSim.Data.NHibernate if (inventory.Count > 0) p.RestoreInventoryItems(inventory); } - foreach (SceneObjectGroup g in SOG.Values) + foreach (SceneObjectGroup g in SOG.Values) { ret.Add(g); } @@ -304,7 +304,7 @@ namespace OpenSim.Data.NHibernate } /// - /// + /// /// /// public void RemoveLandObject(LLUUID globalID) @@ -313,7 +313,7 @@ namespace OpenSim.Data.NHibernate } /// - /// + /// /// /// public void StoreLandObject(ILandObject parcel) @@ -322,7 +322,7 @@ namespace OpenSim.Data.NHibernate } /// - /// + /// /// /// /// @@ -341,7 +341,7 @@ namespace OpenSim.Data.NHibernate { session.Flush(); } - + /// /// Load a region banlist /// @@ -373,7 +373,7 @@ namespace OpenSim.Data.NHibernate } /// - /// + /// /// /// /// @@ -399,17 +399,17 @@ namespace OpenSim.Data.NHibernate { ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem)); criteria.Add(Expression.Eq("ParentPartID", primID)); - try + try { foreach (TaskInventoryItem i in criteria.List()) { session.Delete(i); } - + foreach (TaskInventoryItem i in items) { session.Save(i); - + } session.Flush(); } -- cgit v1.1