aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/NHibernateAssetData.cs
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-25 16:13:02 -0400
committerTeravus Ovares (Dan Olivares)2009-08-25 16:13:02 -0400
commita7917b428a6bc3c9e33da64879b9e473516540a3 (patch)
tree2c38d9c33c4977a3d0356912915082a8bd568a23 /OpenSim/Data/NHibernate/NHibernateAssetData.cs
parentPatch from jhurliman to HttpServer (diff)
parentImplemented osPenCap, that sets EndCap and StartCap to Pen. This allows using... (diff)
downloadopensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.zip
opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.gz
opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.bz2
opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.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.cs24
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>