aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Storage/LocalStorageDb4o
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Storage/LocalStorageDb4o')
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs58
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs271
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs43
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj116
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj.user12
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs52
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs52
7 files changed, 604 insertions, 0 deletions
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
new file mode 100644
index 0000000..ea2b62e
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
@@ -0,0 +1,58 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("Db4LocalStorage")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("Db4LocalStorage")]
43[assembly: AssemblyCopyright("")]
44[assembly: AssemblyTrademark("")]
45[assembly: AssemblyCulture("")]
46
47// This sets the default COM visibility of types in the assembly to invisible.
48// If you need to expose a type to COM, use [ComVisible(true)] on that type.
49[assembly: ComVisible(false)]
50
51// The assembly version has following format :
52//
53// Major.Minor.Build.Revision
54//
55// You can specify all values by your own or you can build default build and revision
56// numbers with the '*' character (the default):
57
58[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
new file mode 100644
index 0000000..8e6b04d
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -0,0 +1,271 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using Db4objects.Db4o;
31using Db4objects.Db4o.Query;
32
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using OpenSim.Framework.Console;
37
38
39namespace OpenSim.Storage.LocalStorageDb4o
40{
41 /// <summary>
42 ///
43 /// </summary>
44 public class Db4LocalStorage : ILocalStorage
45 {
46 private IObjectContainer db;
47 private string datastore;
48
49 public Db4LocalStorage()
50 {
51
52 }
53
54 public void Initialise(string dfile)
55 {
56 OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile);
57 datastore = dfile;
58 try
59 {
60 db = Db4oFactory.OpenFile(datastore);
61 OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage creation");
62 }
63 catch (Exception e)
64 {
65 db.Close();
66 OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured");
67 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
68 }
69 }
70
71 public void StorePrim(PrimData prim)
72 {
73 IObjectSet result = db.Query(new UUIDPrimQuery(prim.FullID));
74 if (result.Count > 0)
75 {
76 //prim already in storage
77 //so update it
78 PrimData found = (PrimData)result.Next();
79 found.PathBegin = prim.PathBegin;
80 found.PathCurve = prim.PathCurve;
81 found.PathEnd = prim.PathEnd;
82 found.PathRadiusOffset = prim.PathRadiusOffset;
83 found.PathRevolutions = prim.PathRevolutions;
84 found.PathScaleX = prim.PathScaleX;
85 found.PathScaleY = prim.PathScaleY;
86 found.PathShearX = prim.PathShearX;
87 found.PathShearY = prim.PathShearY;
88 found.PathSkew = prim.PathSkew;
89 found.PathTaperX = prim.PathTaperX;
90 found.PathTaperY = prim.PathTaperY;
91 found.PathTwist = prim.PathTwist;
92 found.PathTwistBegin = prim.PathTwistBegin;
93 found.PCode = prim.PCode;
94 found.ProfileBegin = prim.ProfileBegin;
95 found.ProfileCurve = prim.ProfileCurve;
96 found.ProfileEnd = prim.ProfileEnd;
97 found.ProfileHollow = prim.ProfileHollow;
98 found.Position = prim.Position;
99 found.Rotation = prim.Rotation;
100 found.TextureEntry = prim.TextureEntry;
101 db.Set(found);
102 db.Commit();
103 }
104 else
105 {
106 //not in storage
107 db.Set(prim);
108 db.Commit();
109 }
110 }
111
112 public void RemovePrim(LLUUID primID)
113 {
114 IObjectSet result = db.Query(new UUIDPrimQuery(primID));
115 if (result.Count > 0)
116 {
117 PrimData found = (PrimData)result.Next();
118 db.Delete(found);
119 }
120 }
121
122
123 public void LoadPrimitives(ILocalStorageReceiver receiver)
124 {
125 IObjectSet result = db.Get(typeof(PrimData));
126 OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count);
127 foreach (PrimData prim in result)
128 {
129 receiver.PrimFromStorage(prim);
130 }
131 }
132
133 public float[] LoadWorld()
134 {
135 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Loading world....");
136 float[] heightmap = null;
137 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB");
138 IObjectSet world_result = db.Get(typeof(MapStorage));
139 if (world_result.Count > 0)
140 {
141 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading");
142 MapStorage map = (MapStorage)world_result.Next();
143 //blank.LandMap = map.Map;
144 heightmap = map.Map;
145 }
146 return heightmap;
147 }
148
149 public void SaveMap(float[] heightmap)
150 {
151 IObjectSet world_result = db.Get(typeof(MapStorage));
152 if (world_result.Count > 0)
153 {
154 OpenSim.Framework.Console.MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database");
155 MapStorage map = (MapStorage)world_result.Next();
156 db.Delete(map);
157 }
158 MapStorage map1 = new MapStorage();
159 map1.Map = heightmap; //OpenSim_Main.local_world.LandMap;
160 db.Set(map1);
161 db.Commit();
162 }
163
164 public void SaveParcel(ParcelData parcel)
165 {
166 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID));
167 if (result.Count > 0)
168 {
169 //Old Parcel
170 ParcelData updateParcel = (ParcelData)result.Next();
171 updateParcel.AABBMax = parcel.AABBMax;
172 updateParcel.AABBMin = parcel.AABBMin;
173 updateParcel.area = parcel.area;
174 updateParcel.auctionID = parcel.auctionID;
175 updateParcel.authBuyerID = parcel.authBuyerID;
176 updateParcel.category = parcel.category;
177 updateParcel.claimDate = parcel.claimDate;
178 updateParcel.claimPrice = parcel.claimPrice;
179 updateParcel.groupID = parcel.groupID;
180 updateParcel.groupPrims = parcel.groupPrims;
181 updateParcel.isGroupOwned = parcel.isGroupOwned;
182 updateParcel.landingType = parcel.landingType;
183 updateParcel.mediaAutoScale = parcel.mediaAutoScale;
184 updateParcel.mediaID = parcel.mediaID;
185 updateParcel.mediaURL = parcel.mediaURL;
186 updateParcel.musicURL = parcel.musicURL;
187 updateParcel.localID = parcel.localID;
188 updateParcel.ownerID = parcel.ownerID;
189 updateParcel.passHours = parcel.passHours;
190 updateParcel.passPrice = parcel.passPrice;
191 updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone();
192 updateParcel.parcelDesc = parcel.parcelDesc;
193 updateParcel.parcelFlags = parcel.parcelFlags;
194 updateParcel.parcelName = parcel.parcelName;
195 updateParcel.parcelStatus = parcel.parcelStatus;
196 updateParcel.salePrice = parcel.salePrice;
197 updateParcel.snapshotID = parcel.snapshotID;
198 updateParcel.userLocation = parcel.userLocation;
199 updateParcel.userLookAt = parcel.userLookAt;
200
201 db.Set(updateParcel);
202 }
203 else
204 {
205 db.Set(parcel);
206 }
207 db.Commit();
208 }
209
210 public void SaveParcels(ParcelData[] parcel_data)
211 {
212 MainLog.Instance.Notice("Parcel Backup: Saving Parcels...");
213 int i;
214 for (i = 0; i < parcel_data.GetLength(0); i++)
215 {
216
217 SaveParcel(parcel_data[i]);
218
219 }
220 MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete");
221 }
222
223 public void RemoveParcel(ParcelData parcel)
224 {
225 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID));
226 if (result.Count > 0)
227 {
228 db.Delete(result[0]);
229 }
230 db.Commit();
231 }
232 public void RemoveAllParcels()
233 {
234 MainLog.Instance.Notice("Parcel Backup: Removing all parcels...");
235 IObjectSet result = db.Get(typeof(ParcelData));
236 if (result.Count > 0)
237 {
238 foreach (ParcelData parcelData in result)
239 {
240 RemoveParcel(parcelData);
241 }
242 }
243 }
244
245 public void LoadParcels(ILocalStorageParcelReceiver recv)
246 {
247 MainLog.Instance.Notice("Parcel Backup: Loading Parcels...");
248 IObjectSet result = db.Get(typeof(ParcelData));
249 if (result.Count > 0)
250 {
251 MainLog.Instance.Notice("Parcel Backup: Parcels exist in database.");
252 foreach (ParcelData parcelData in result)
253 {
254
255 recv.ParcelFromStorage(parcelData);
256 }
257 }
258 else
259 {
260 MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel.");
261 recv.NoParcelDataFromStorage();
262 }
263 MainLog.Instance.Notice("Parcel Backup: Parcels Restored");
264 }
265 public void ShutDown()
266 {
267 db.Commit();
268 db.Close();
269 }
270 }
271} \ No newline at end of file
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
new file mode 100644
index 0000000..56387ac
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
@@ -0,0 +1,43 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Storage.LocalStorageDb4o
33{
34 public class MapStorage
35 {
36 public float[] Map;
37
38 public MapStorage()
39 {
40
41 }
42 }
43} \ No newline at end of file
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
new file mode 100644
index 0000000..147158c
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
@@ -0,0 +1,116 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{43DB702D-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Region.Storage.LocalStorageDb4o</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Region.Storage.LocalStorageDb4o</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Xml" >
74 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
80 <Name>OpenSim.Framework</Name>
81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
86 <Name>OpenSim.Framework.Console</Name>
87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
89 <Private>False</Private>
90 </ProjectReference>
91 </ItemGroup>
92 <ItemGroup>
93 <Compile Include="AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="Db4LocalStorage.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="MapStorage.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="UUIDParcelQuery.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="UUIDPrimQuery.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 </ItemGroup>
109 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
110 <PropertyGroup>
111 <PreBuildEvent>
112 </PreBuildEvent>
113 <PostBuildEvent>
114 </PostBuildEvent>
115 </PropertyGroup>
116</Project>
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj.user b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj.user
new file mode 100644
index 0000000..6841907
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\NameSpaceChanges\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
new file mode 100644
index 0000000..d24fb5f
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
@@ -0,0 +1,52 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using Db4objects.Db4o;
32using Db4objects.Db4o.Query;
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Storage.LocalStorageDb4o
38{
39 public class UUIDParcelQuery : Predicate
40 {
41 private LLUUID globalIDSearch;
42
43 public UUIDParcelQuery(LLUUID find)
44 {
45 globalIDSearch = find;
46 }
47 public bool Match(ParcelData parcel)
48 {
49 return (parcel.globalID == globalIDSearch);
50 }
51 }
52}
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
new file mode 100644
index 0000000..b2e8a91
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
@@ -0,0 +1,52 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using Db4objects.Db4o;
32using Db4objects.Db4o.Query;
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Storage.LocalStorageDb4o
38{
39 public class UUIDPrimQuery : Predicate
40 {
41 private LLUUID _findID;
42
43 public UUIDPrimQuery(LLUUID find)
44 {
45 _findID = find;
46 }
47 public bool Match(PrimData prim)
48 {
49 return (prim.FullID == _findID);
50 }
51 }
52}