diff options
author | gareth | 2007-03-22 10:11:15 +0000 |
---|---|---|
committer | gareth | 2007-03-22 10:11:15 +0000 |
commit | 7daa3955bc3a1918e40962851f9e8d38597a245e (patch) | |
tree | bee3e1372a7eed0c1b220a8a49f7bee7d29a6b91 /OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | |
parent | Load XML for neighbourinfo from grid (diff) | |
download | opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.zip opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.gz opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.bz2 opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.xz |
brought zircon branch into trunk
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs (renamed from src/LocalStorage/Db4LocalStorage/Db4LocalStorage.cs) | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/LocalStorage/Db4LocalStorage/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs index bb9825c..93ed9cc 100644 --- a/src/LocalStorage/Db4LocalStorage/Db4LocalStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -29,9 +29,10 @@ using System.Collections.Generic; | |||
29 | using Db4objects.Db4o; | 29 | using Db4objects.Db4o; |
30 | using Db4objects.Db4o.Query; | 30 | using Db4objects.Db4o.Query; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using GridInterfaces; | 32 | using OpenSim.Framework.Interfaces; |
33 | using OpenSim.Framework.Assets; | ||
33 | 34 | ||
34 | namespace Db4LocalStorage | 35 | namespace OpenSim.Storage.LocalStorageDb4o |
35 | { | 36 | { |
36 | /// <summary> | 37 | /// <summary> |
37 | /// | 38 | /// |
@@ -45,13 +46,13 @@ namespace Db4LocalStorage | |||
45 | try | 46 | try |
46 | { | 47 | { |
47 | db = Db4oFactory.OpenFile("localworld.yap"); | 48 | db = Db4oFactory.OpenFile("localworld.yap"); |
48 | ServerConsole.MainConsole.Instance.WriteLine("Db4LocalStorage creation"); | 49 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation"); |
49 | } | 50 | } |
50 | catch(Exception e) | 51 | catch(Exception e) |
51 | { | 52 | { |
52 | db.Close(); | 53 | db.Close(); |
53 | ServerConsole.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured"); | 54 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured"); |
54 | ServerConsole.MainConsole.Instance.WriteLine(e.ToString()); | 55 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString()); |
55 | } | 56 | } |
56 | } | 57 | } |
57 | 58 | ||
@@ -84,6 +85,7 @@ namespace Db4LocalStorage | |||
84 | found.ProfileHollow = prim.ProfileHollow; | 85 | found.ProfileHollow = prim.ProfileHollow; |
85 | found.Position = prim.Position; | 86 | found.Position = prim.Position; |
86 | found.Rotation = prim.Rotation; | 87 | found.Rotation = prim.Rotation; |
88 | found.Texture = prim.Texture; | ||
87 | db.Set(found); | 89 | db.Set(found); |
88 | db.Commit(); | 90 | db.Commit(); |
89 | } | 91 | } |
@@ -109,7 +111,7 @@ namespace Db4LocalStorage | |||
109 | public void LoadPrimitives(ILocalStorageReceiver receiver) | 111 | public void LoadPrimitives(ILocalStorageReceiver receiver) |
110 | { | 112 | { |
111 | IObjectSet result = db.Get(typeof(PrimData)); | 113 | IObjectSet result = db.Get(typeof(PrimData)); |
112 | ServerConsole.MainConsole.Instance.WriteLine("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count); | 114 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count); |
113 | foreach (PrimData prim in result) { | 115 | foreach (PrimData prim in result) { |
114 | receiver.PrimFromStorage(prim); | 116 | receiver.PrimFromStorage(prim); |
115 | } | 117 | } |
@@ -121,19 +123,4 @@ namespace Db4LocalStorage | |||
121 | db.Close(); | 123 | db.Close(); |
122 | } | 124 | } |
123 | } | 125 | } |
124 | |||
125 | public class UUIDQuery : Predicate | ||
126 | { | ||
127 | private LLUUID _findID; | ||
128 | |||
129 | public UUIDQuery(LLUUID find) | ||
130 | { | ||
131 | _findID = find; | ||
132 | } | ||
133 | public bool Match(PrimData prim) | ||
134 | { | ||
135 | return (prim.FullID == _findID); | ||
136 | } | ||
137 | } | ||
138 | |||
139 | } | 126 | } |