diff options
author | Adam Frisby | 2007-05-05 21:49:24 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-05 21:49:24 +0000 |
commit | 51da80a8506f08511c45e8fd87044989f8221b87 (patch) | |
tree | b7951215e4a07f1742766540ea4f9464fbdd4061 /OpenGrid.Framework.Data.DB4o/DB4oManager.cs | |
parent | Run prebuild to generate working project files. (diff) | |
download | opensim-SC_OLD-51da80a8506f08511c45e8fd87044989f8221b87.zip opensim-SC_OLD-51da80a8506f08511c45e8fd87044989f8221b87.tar.gz opensim-SC_OLD-51da80a8506f08511c45e8fd87044989f8221b87.tar.bz2 opensim-SC_OLD-51da80a8506f08511c45e8fd87044989f8221b87.tar.xz |
Grid Framework for DB4o - supports all framework.data interfaces.
*** Important Note *** Framework.Data interfaces are not yet complete (they are strictly read-only right now), because of this, write support is not yet implemented.
Diffstat (limited to 'OpenGrid.Framework.Data.DB4o/DB4oManager.cs')
-rw-r--r-- | OpenGrid.Framework.Data.DB4o/DB4oManager.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/OpenGrid.Framework.Data.DB4o/DB4oManager.cs new file mode 100644 index 0000000..f889636 --- /dev/null +++ b/OpenGrid.Framework.Data.DB4o/DB4oManager.cs | |||
@@ -0,0 +1,27 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using Db4objects.Db4o; | ||
5 | using OpenGrid.Framework.Data; | ||
6 | using libsecondlife; | ||
7 | |||
8 | namespace OpenGrid.Framework.Data.DB4o | ||
9 | { | ||
10 | class DB4oManager | ||
11 | { | ||
12 | public Dictionary<LLUUID, SimProfileData> profiles = new Dictionary<LLUUID, SimProfileData>(); | ||
13 | |||
14 | public DB4oManager(string db4odb) | ||
15 | { | ||
16 | IObjectContainer database; | ||
17 | database = Db4oFactory.OpenFile(db4odb); | ||
18 | IObjectSet result = database.Get(typeof(SimProfileData)); | ||
19 | foreach(SimProfileData row in result) { | ||
20 | profiles.Add(row.UUID, row); | ||
21 | } | ||
22 | database.Close(); | ||
23 | } | ||
24 | |||
25 | |||
26 | } | ||
27 | } | ||