aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-07 23:15:35 +0000
committerSean Dague2008-04-07 23:15:35 +0000
commitf43681510725f5b95fcb864a1f3e4b744fcaf992 (patch)
tree2d34caa75488d1c608d1a21b4888cb0f264a6cba /OpenSim/Data/NHibernate/NHibernateInventoryData.cs
parentneeded to add 4 characters to support the dashes (diff)
downloadopensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.zip
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.gz
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.bz2
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.xz
Refactor InventoryItemBase to do the following:
* wrap fields as Properties * rename some fields/properties to more sensible names * set style to PropName to match more standard C# approach
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateInventoryData.cs')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index d6cd664..ba1d3e9 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Data.NHibernate
112 /// <param name="item">The item to be created</param> 112 /// <param name="item">The item to be created</param>
113 public void addInventoryItem(InventoryItemBase item) 113 public void addInventoryItem(InventoryItemBase item)
114 { 114 {
115 if (!ExistsItem(item.inventoryID)) { 115 if (!ExistsItem(item.ID)) {
116 using(ISession session = factory.OpenSession()) { 116 using(ISession session = factory.OpenSession()) {
117 using(ITransaction transaction = session.BeginTransaction()) { 117 using(ITransaction transaction = session.BeginTransaction()) {
118 session.Save(item); 118 session.Save(item);
@@ -120,7 +120,7 @@ namespace OpenSim.Data.NHibernate
120 } 120 }
121 } 121 }
122 } else { 122 } else {
123 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists, updating instead", item.inventoryID); 123 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists, updating instead", item.ID);
124 updateInventoryItem(item); 124 updateInventoryItem(item);
125 } 125 }
126 } 126 }
@@ -131,7 +131,7 @@ namespace OpenSim.Data.NHibernate
131 /// <param name="item">The updated item</param> 131 /// <param name="item">The updated item</param>
132 public void updateInventoryItem(InventoryItemBase item) 132 public void updateInventoryItem(InventoryItemBase item)
133 { 133 {
134 if (ExistsItem(item.inventoryID)) { 134 if (ExistsItem(item.ID)) {
135 using(ISession session = factory.OpenSession()) { 135 using(ISession session = factory.OpenSession()) {
136 using(ITransaction transaction = session.BeginTransaction()) { 136 using(ITransaction transaction = session.BeginTransaction()) {
137 session.Update(item); 137 session.Update(item);
@@ -139,7 +139,7 @@ namespace OpenSim.Data.NHibernate
139 } 139 }
140 } 140 }
141 } else { 141 } else {
142 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists", item.inventoryID); 142 m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists", item.ID);
143 } 143 }
144 } 144 }
145 145