diff options
author | Jeff Ames | 2008-08-18 00:39:10 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-18 00:39:10 +0000 |
commit | 6ef9d4da901a346c232458317cca6268da888e2e (patch) | |
tree | dd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Data/NHibernate/NHibernateUserData.cs | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.zip opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2 opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz |
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateUserData.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index bceae7c..c776474 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -53,8 +53,8 @@ namespace OpenSim.Data.NHibernate | |||
53 | private ISessionFactory factory; | 53 | private ISessionFactory factory; |
54 | private ISession session; | 54 | private ISession session; |
55 | 55 | ||
56 | public override void Initialise() | 56 | public override void Initialise() |
57 | { | 57 | { |
58 | m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!"); | 58 | m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!"); |
59 | throw new PluginNotInitialisedException (Name); | 59 | throw new PluginNotInitialisedException (Name); |
60 | } | 60 | } |
@@ -83,7 +83,7 @@ namespace OpenSim.Data.NHibernate | |||
83 | 83 | ||
84 | factory = cfg.BuildSessionFactory(); | 84 | factory = cfg.BuildSessionFactory(); |
85 | session = factory.OpenSession(); | 85 | session = factory.OpenSession(); |
86 | 86 | ||
87 | // This actually does the roll forward assembly stuff | 87 | // This actually does the roll forward assembly stuff |
88 | Assembly assem = GetType().Assembly; | 88 | Assembly assem = GetType().Assembly; |
89 | Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "UserStore"); | 89 | Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "UserStore"); |
@@ -97,7 +97,7 @@ namespace OpenSim.Data.NHibernate | |||
97 | { | 97 | { |
98 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 98 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
99 | } | 99 | } |
100 | catch (ObjectNotFoundException) | 100 | catch (ObjectNotFoundException) |
101 | { | 101 | { |
102 | user = null; | 102 | user = null; |
103 | } | 103 | } |
@@ -109,12 +109,12 @@ namespace OpenSim.Data.NHibernate | |||
109 | { | 109 | { |
110 | UserProfileData user; | 110 | UserProfileData user; |
111 | // TODO: I'm sure I'll have to do something silly here | 111 | // TODO: I'm sure I'll have to do something silly here |
112 | try | 112 | try |
113 | { | 113 | { |
114 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 114 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
115 | user.CurrentAgent = GetAgentByUUID(uuid); | 115 | user.CurrentAgent = GetAgentByUUID(uuid); |
116 | } | 116 | } |
117 | catch (ObjectNotFoundException) | 117 | catch (ObjectNotFoundException) |
118 | { | 118 | { |
119 | user = null; | 119 | user = null; |
120 | } | 120 | } |
@@ -144,12 +144,12 @@ namespace OpenSim.Data.NHibernate | |||
144 | } | 144 | } |
145 | else | 145 | else |
146 | { | 146 | { |
147 | try | 147 | try |
148 | { | 148 | { |
149 | UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData; | 149 | UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData; |
150 | session.Delete(old); | 150 | session.Delete(old); |
151 | } | 151 | } |
152 | catch (ObjectNotFoundException) | 152 | catch (ObjectNotFoundException) |
153 | { | 153 | { |
154 | } | 154 | } |
155 | session.Save(agent); | 155 | session.Save(agent); |
@@ -174,12 +174,12 @@ namespace OpenSim.Data.NHibernate | |||
174 | 174 | ||
175 | override public void AddNewUserAgent(UserAgentData agent) | 175 | override public void AddNewUserAgent(UserAgentData agent) |
176 | { | 176 | { |
177 | try | 177 | try |
178 | { | 178 | { |
179 | UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; | 179 | UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; |
180 | session.Delete(old); | 180 | session.Delete(old); |
181 | } | 181 | } |
182 | catch (ObjectNotFoundException) | 182 | catch (ObjectNotFoundException) |
183 | { | 183 | { |
184 | } | 184 | } |
185 | session.Save(agent); | 185 | session.Save(agent); |
@@ -287,9 +287,9 @@ namespace OpenSim.Data.NHibernate | |||
287 | 287 | ||
288 | public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 288 | public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
289 | { | 289 | { |
290 | if (appearance == null) | 290 | if (appearance == null) |
291 | return; | 291 | return; |
292 | 292 | ||
293 | appearance.Owner = user; | 293 | appearance.Owner = user; |
294 | 294 | ||
295 | bool exists = ExistsAppearance(user); | 295 | bool exists = ExistsAppearance(user); |