diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-20 19:25:52 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-20 19:25:52 -0400 |
commit | 181b992b4a8dab3423b52f705e20dcb63e7fdb47 (patch) | |
tree | 309f2255464873944a5478472596cbc24b130b27 /OpenSim/Data/NHibernate/NHibernateAssetData.cs | |
parent | * Deal with git thinking that file was changed even though it wasn't and it's... (diff) | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-181b992b4a8dab3423b52f705e20dcb63e7fdb47.zip opensim-SC-181b992b4a8dab3423b52f705e20dcb63e7fdb47.tar.gz opensim-SC-181b992b4a8dab3423b52f705e20dcb63e7fdb47.tar.bz2 opensim-SC-181b992b4a8dab3423b52f705e20dcb63e7fdb47.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateAssetData.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateAssetData.cs | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 9d8cec5..aaba15c 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs | |||
@@ -65,30 +65,24 @@ namespace OpenSim.Data.NHibernate | |||
65 | 65 | ||
66 | } | 66 | } |
67 | 67 | ||
68 | override protected AssetBase FetchStoredAsset(UUID uuid) | 68 | override public AssetBase GetAsset(UUID uuid) |
69 | { | 69 | { |
70 | return (AssetBase)manager.Get(typeof(AssetBase), uuid); | 70 | return (AssetBase)manager.Get(typeof(AssetBase), uuid); |
71 | } | 71 | } |
72 | 72 | ||
73 | private void Save(AssetBase asset) | 73 | override public void StoreAsset(AssetBase asset) |
74 | { | 74 | { |
75 | AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID); | 75 | AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID); |
76 | if (temp == null) | 76 | if (temp == null) |
77 | { | 77 | { |
78 | m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID); | ||
78 | manager.Insert(asset); | 79 | manager.Insert(asset); |
79 | } | 80 | } |
80 | } | 81 | else |
81 | 82 | { | |
82 | override public void CreateAsset(AssetBase asset) | 83 | m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID); |
83 | { | 84 | manager.Update(asset); |
84 | m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID); | 85 | } |
85 | Save(asset); | ||
86 | } | ||
87 | |||
88 | override public void UpdateAsset(AssetBase asset) | ||
89 | { | ||
90 | m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID); | ||
91 | manager.Update(asset); | ||
92 | } | 86 | } |
93 | 87 | ||
94 | // private void LogAssetLoad(AssetBase asset) | 88 | // private void LogAssetLoad(AssetBase asset) |
@@ -107,7 +101,7 @@ namespace OpenSim.Data.NHibernate | |||
107 | override public bool ExistsAsset(UUID uuid) | 101 | override public bool ExistsAsset(UUID uuid) |
108 | { | 102 | { |
109 | m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); | 103 | m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); |
110 | return (FetchAsset(uuid) != null); | 104 | return (GetAsset(uuid) != null); |
111 | } | 105 | } |
112 | 106 | ||
113 | /// <summary> | 107 | /// <summary> |