diff options
author | Charles Krinke | 2009-02-14 19:47:02 +0000 |
---|---|---|
committer | Charles Krinke | 2009-02-14 19:47:02 +0000 |
commit | a583d8ad70daad8c755c2f43e2f2af7bc5b7ee4d (patch) | |
tree | 7e90740b7ea86922db55905a34e3b6e065cb6041 /OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |
parent | Add an override for the % operator. (diff) | |
download | opensim-SC_OLD-a583d8ad70daad8c755c2f43e2f2af7bc5b7ee4d.zip opensim-SC_OLD-a583d8ad70daad8c755c2f43e2f2af7bc5b7ee4d.tar.gz opensim-SC_OLD-a583d8ad70daad8c755c2f43e2f2af7bc5b7ee4d.tar.bz2 opensim-SC_OLD-a583d8ad70daad8c755c2f43e2f2af7bc5b7ee4d.tar.xz |
Thank you kindly, TLaukkan (Tommil) for a patch that:
* Created value object for EstateRegionLink for storing the estate region relationship.
* Refactored slightly NHibernateManager and NHibernateXXXXData implementations for accesing nhibernate generated ID on insert.
** Changed NHibernateManager.Save method name to Insert as it does Insert.
** Changed NHibernateManager.Save return value object as ID can be both UUID and uint currently.
** Changed NHibernateManager.Load method Id parameter to object as it can be both UUID and uint.
* Created NHibernateEstateData implementation. This is the actual estate storage.
* Created NHibernate mapping files for both EstateSettings and EstateRegionLink
* Created MigrationSyntaxDifferences.txt files to write notes about differences in migration scripts between different databases.
* Created estate storage migration scripts for all four databases.
* Created estate unit test classes for all four databases.
* Updated one missing field to BasicEstateTest.cs
* Tested NHibernate unit tests with NUnit GUI. Asset databases fail but that is not related to this patch.
* Tested build with both Visual Studio and nant.
* Executed build tests with nant succesfully.
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateInventoryData.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 0129800..7657ae5 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -42,6 +42,34 @@ namespace OpenSim.Data.NHibernate | |||
42 | 42 | ||
43 | public NHibernateManager manager; | 43 | public NHibernateManager manager; |
44 | 44 | ||
45 | /// <summary> | ||
46 | /// The plugin being loaded | ||
47 | /// </summary> | ||
48 | /// <returns>A string containing the plugin name</returns> | ||
49 | public string Name | ||
50 | { | ||
51 | get { return "NHibernate Inventory Data Interface"; } | ||
52 | } | ||
53 | |||
54 | /// <summary> | ||
55 | /// The plugins version | ||
56 | /// </summary> | ||
57 | /// <returns>A string containing the plugin version</returns> | ||
58 | public string Version | ||
59 | { | ||
60 | get | ||
61 | { | ||
62 | Module module = GetType().Module; | ||
63 | // string dllName = module.Assembly.ManifestModule.Name; | ||
64 | Version dllVersion = module.Assembly.GetName().Version; | ||
65 | |||
66 | |||
67 | return | ||
68 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | ||
69 | dllVersion.Revision); | ||
70 | } | ||
71 | } | ||
72 | |||
45 | public void Initialise() | 73 | public void Initialise() |
46 | { | 74 | { |
47 | m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!"); | 75 | m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!"); |
@@ -57,6 +85,13 @@ namespace OpenSim.Data.NHibernate | |||
57 | manager = new NHibernateManager(connect, "InventoryStore"); | 85 | manager = new NHibernateManager(connect, "InventoryStore"); |
58 | } | 86 | } |
59 | 87 | ||
88 | /// <summary> | ||
89 | /// Closes the interface | ||
90 | /// </summary> | ||
91 | public void Dispose() | ||
92 | { | ||
93 | } | ||
94 | |||
60 | /***************************************************************** | 95 | /***************************************************************** |
61 | * | 96 | * |
62 | * Basic CRUD operations on Data | 97 | * Basic CRUD operations on Data |
@@ -92,7 +127,7 @@ namespace OpenSim.Data.NHibernate | |||
92 | { | 127 | { |
93 | if (!ExistsItem(item.ID)) | 128 | if (!ExistsItem(item.ID)) |
94 | { | 129 | { |
95 | manager.Save(item); | 130 | manager.Insert(item); |
96 | } | 131 | } |
97 | else | 132 | else |
98 | { | 133 | { |
@@ -161,7 +196,7 @@ namespace OpenSim.Data.NHibernate | |||
161 | { | 196 | { |
162 | if (!ExistsFolder(folder.ID)) | 197 | if (!ExistsFolder(folder.ID)) |
163 | { | 198 | { |
164 | manager.Save(folder); | 199 | manager.Insert(folder); |
165 | } | 200 | } |
166 | else | 201 | else |
167 | { | 202 | { |
@@ -220,41 +255,6 @@ namespace OpenSim.Data.NHibernate | |||
220 | // TODO: DataSet commit | 255 | // TODO: DataSet commit |
221 | } | 256 | } |
222 | 257 | ||
223 | /// <summary> | ||
224 | /// Closes the interface | ||
225 | /// </summary> | ||
226 | public void Dispose() | ||
227 | { | ||
228 | } | ||
229 | |||
230 | /// <summary> | ||
231 | /// The plugin being loaded | ||
232 | /// </summary> | ||
233 | /// <returns>A string containing the plugin name</returns> | ||
234 | public string Name | ||
235 | { | ||
236 | get { return "NHibernate Inventory Data Interface"; } | ||
237 | } | ||
238 | |||
239 | /// <summary> | ||
240 | /// The plugins version | ||
241 | /// </summary> | ||
242 | /// <returns>A string containing the plugin version</returns> | ||
243 | public string Version | ||
244 | { | ||
245 | get | ||
246 | { | ||
247 | Module module = GetType().Module; | ||
248 | // string dllName = module.Assembly.ManifestModule.Name; | ||
249 | Version dllVersion = module.Assembly.GetName().Version; | ||
250 | |||
251 | |||
252 | return | ||
253 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | ||
254 | dllVersion.Revision); | ||
255 | } | ||
256 | } | ||
257 | |||
258 | // Move seems to be just update | 258 | // Move seems to be just update |
259 | 259 | ||
260 | public void moveInventoryFolder(InventoryFolderBase folder) | 260 | public void moveInventoryFolder(InventoryFolderBase folder) |