diff options
author | mingchen | 2007-07-16 19:40:25 +0000 |
---|---|---|
committer | mingchen | 2007-07-16 19:40:25 +0000 |
commit | 2873b82b788244852fd1dad3a747f3ba33a73be5 (patch) | |
tree | 1a447a3e880743860a7fb4e4f726fedf816bf9d6 /OpenSim/Region/Storage/LocalStorageDb4o | |
parent | *Renamed ParcelManager to LandManager (diff) | |
download | opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.zip opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.tar.gz opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.tar.bz2 opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.tar.xz |
*Renamed everything Parcels and ParcelData to Land and LandData
*Added missing files (I hope)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs | 112 | ||||
-rw-r--r-- | OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs (renamed from OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs) | 94 |
2 files changed, 103 insertions, 103 deletions
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs index 8d9f473..5dc5a3b 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -157,106 +157,106 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o | |||
157 | db.Commit(); | 157 | db.Commit(); |
158 | } | 158 | } |
159 | 159 | ||
160 | public void SaveParcel(ParcelData parcel) | 160 | public void SaveLandObject(LandData landObject) |
161 | { | 161 | { |
162 | IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); | 162 | IObjectSet result = db.Query(new UUIDLandQuery(landObject.globalID)); |
163 | if (result.Count > 0) | 163 | if (result.Count > 0) |
164 | { | 164 | { |
165 | //Old Parcel | 165 | //Old Land |
166 | ParcelData updateParcel = (ParcelData)result.Next(); | 166 | LandData updateLand = (LandData)result.Next(); |
167 | updateParcel.AABBMax = parcel.AABBMax; | 167 | updateLand.AABBMax = landObject.AABBMax; |
168 | updateParcel.AABBMin = parcel.AABBMin; | 168 | updateLand.AABBMin = landObject.AABBMin; |
169 | updateParcel.area = parcel.area; | 169 | updateLand.area = landObject.area; |
170 | updateParcel.auctionID = parcel.auctionID; | 170 | updateLand.auctionID = landObject.auctionID; |
171 | updateParcel.authBuyerID = parcel.authBuyerID; | 171 | updateLand.authBuyerID = landObject.authBuyerID; |
172 | updateParcel.category = parcel.category; | 172 | updateLand.category = landObject.category; |
173 | updateParcel.claimDate = parcel.claimDate; | 173 | updateLand.claimDate = landObject.claimDate; |
174 | updateParcel.claimPrice = parcel.claimPrice; | 174 | updateLand.claimPrice = landObject.claimPrice; |
175 | updateParcel.groupID = parcel.groupID; | 175 | updateLand.groupID = landObject.groupID; |
176 | updateParcel.groupPrims = parcel.groupPrims; | 176 | updateLand.groupPrims = landObject.groupPrims; |
177 | updateParcel.isGroupOwned = parcel.isGroupOwned; | 177 | updateLand.isGroupOwned = landObject.isGroupOwned; |
178 | updateParcel.landingType = parcel.landingType; | 178 | updateLand.landingType = landObject.landingType; |
179 | updateParcel.mediaAutoScale = parcel.mediaAutoScale; | 179 | updateLand.mediaAutoScale = landObject.mediaAutoScale; |
180 | updateParcel.mediaID = parcel.mediaID; | 180 | updateLand.mediaID = landObject.mediaID; |
181 | updateParcel.mediaURL = parcel.mediaURL; | 181 | updateLand.mediaURL = landObject.mediaURL; |
182 | updateParcel.musicURL = parcel.musicURL; | 182 | updateLand.musicURL = landObject.musicURL; |
183 | updateParcel.localID = parcel.localID; | 183 | updateLand.localID = landObject.localID; |
184 | updateParcel.ownerID = parcel.ownerID; | 184 | updateLand.ownerID = landObject.ownerID; |
185 | updateParcel.passHours = parcel.passHours; | 185 | updateLand.passHours = landObject.passHours; |
186 | updateParcel.passPrice = parcel.passPrice; | 186 | updateLand.passPrice = landObject.passPrice; |
187 | updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone(); | 187 | updateLand.landBitmapByteArray = (byte[])landObject.landBitmapByteArray.Clone(); |
188 | updateParcel.parcelDesc = parcel.parcelDesc; | 188 | updateLand.landDesc = landObject.landDesc; |
189 | updateParcel.parcelFlags = parcel.parcelFlags; | 189 | updateLand.landFlags = landObject.landFlags; |
190 | updateParcel.parcelName = parcel.parcelName; | 190 | updateLand.landName = landObject.landName; |
191 | updateParcel.parcelStatus = parcel.parcelStatus; | 191 | updateLand.landStatus = landObject.landStatus; |
192 | updateParcel.salePrice = parcel.salePrice; | 192 | updateLand.salePrice = landObject.salePrice; |
193 | updateParcel.snapshotID = parcel.snapshotID; | 193 | updateLand.snapshotID = landObject.snapshotID; |
194 | updateParcel.userLocation = parcel.userLocation; | 194 | updateLand.userLocation = landObject.userLocation; |
195 | updateParcel.userLookAt = parcel.userLookAt; | 195 | updateLand.userLookAt = landObject.userLookAt; |
196 | 196 | ||
197 | db.Set(updateParcel); | 197 | db.Set(updateLand); |
198 | } | 198 | } |
199 | else | 199 | else |
200 | { | 200 | { |
201 | db.Set(parcel); | 201 | db.Set(landObject); |
202 | } | 202 | } |
203 | db.Commit(); | 203 | db.Commit(); |
204 | } | 204 | } |
205 | 205 | ||
206 | public void SaveParcels(ParcelData[] parcel_data) | 206 | public void SaveLandObjects(LandData[] landObject_data) |
207 | { | 207 | { |
208 | MainLog.Instance.Notice("Parcel Backup: Saving Parcels..."); | 208 | MainLog.Instance.Notice("Land Backup: Saving Lands..."); |
209 | int i; | 209 | int i; |
210 | for (i = 0; i < parcel_data.GetLength(0); i++) | 210 | for (i = 0; i < landObject_data.GetLength(0); i++) |
211 | { | 211 | { |
212 | 212 | ||
213 | SaveParcel(parcel_data[i]); | 213 | SaveLandObject(landObject_data[i]); |
214 | 214 | ||
215 | } | 215 | } |
216 | MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete"); | 216 | MainLog.Instance.Notice("Land Backup: Land Save Complete"); |
217 | } | 217 | } |
218 | 218 | ||
219 | public void RemoveParcel(ParcelData parcel) | 219 | public void RemoveLandObject(LandData landObject) |
220 | { | 220 | { |
221 | IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); | 221 | IObjectSet result = db.Query(new UUIDLandQuery(landObject.globalID)); |
222 | if (result.Count > 0) | 222 | if (result.Count > 0) |
223 | { | 223 | { |
224 | db.Delete(result[0]); | 224 | db.Delete(result[0]); |
225 | } | 225 | } |
226 | db.Commit(); | 226 | db.Commit(); |
227 | } | 227 | } |
228 | public void RemoveAllParcels() | 228 | public void RemoveAllLandObjects() |
229 | { | 229 | { |
230 | MainLog.Instance.Notice("Parcel Backup: Removing all parcels..."); | 230 | MainLog.Instance.Notice("Land Backup: Removing all land objects..."); |
231 | IObjectSet result = db.Get(typeof(ParcelData)); | 231 | IObjectSet result = db.Get(typeof(LandData)); |
232 | if (result.Count > 0) | 232 | if (result.Count > 0) |
233 | { | 233 | { |
234 | foreach (ParcelData parcelData in result) | 234 | foreach (LandData landData in result) |
235 | { | 235 | { |
236 | RemoveParcel(parcelData); | 236 | RemoveLandObject(landData); |
237 | } | 237 | } |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | public void LoadParcels(ILocalStorageParcelReceiver recv) | 241 | public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) |
242 | { | 242 | { |
243 | MainLog.Instance.Notice("Parcel Backup: Loading Parcels..."); | 243 | MainLog.Instance.Notice("Land Backup: Loading Lands..."); |
244 | IObjectSet result = db.Get(typeof(ParcelData)); | 244 | IObjectSet result = db.Get(typeof(LandData)); |
245 | if (result.Count > 0) | 245 | if (result.Count > 0) |
246 | { | 246 | { |
247 | MainLog.Instance.Notice("Parcel Backup: Parcels exist in database."); | 247 | MainLog.Instance.Notice("Land Backup: Lands exist in database."); |
248 | foreach (ParcelData parcelData in result) | 248 | foreach (LandData landData in result) |
249 | { | 249 | { |
250 | 250 | ||
251 | recv.ParcelFromStorage(parcelData); | 251 | recv.LandFromStorage(landData); |
252 | } | 252 | } |
253 | } | 253 | } |
254 | else | 254 | else |
255 | { | 255 | { |
256 | MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel."); | 256 | MainLog.Instance.Notice("Land Backup: No landObjects exist. Creating basic landObject."); |
257 | recv.NoParcelDataFromStorage(); | 257 | recv.NoLandDataFromStorage(); |
258 | } | 258 | } |
259 | MainLog.Instance.Notice("Parcel Backup: Parcels Restored"); | 259 | MainLog.Instance.Notice("Land Backup: Lands Restored"); |
260 | } | 260 | } |
261 | public void ShutDown() | 261 | public void ShutDown() |
262 | { | 262 | { |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs index debaa88..6c5b2fb 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs | |||
@@ -1,47 +1,47 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using Db4objects.Db4o.Query; | 28 | using Db4objects.Db4o.Query; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | using OpenSim.Framework.Types; | 30 | using OpenSim.Framework.Types; |
31 | 31 | ||
32 | namespace OpenSim.Region.Storage.LocalStorageDb4o | 32 | namespace OpenSim.Region.Storage.LocalStorageDb4o |
33 | { | 33 | { |
34 | public class UUIDParcelQuery : Predicate | 34 | public class UUIDLandQuery : Predicate |
35 | { | 35 | { |
36 | private LLUUID globalIDSearch; | 36 | private LLUUID globalIDSearch; |
37 | 37 | ||
38 | public UUIDParcelQuery(LLUUID find) | 38 | public UUIDLandQuery(LLUUID find) |
39 | { | 39 | { |
40 | globalIDSearch = find; | 40 | globalIDSearch = find; |
41 | } | 41 | } |
42 | public bool Match(ParcelData parcel) | 42 | public bool Match(LandData land) |
43 | { | 43 | { |
44 | return (parcel.globalID == globalIDSearch); | 44 | return (land.globalID == globalIDSearch); |
45 | } | 45 | } |
46 | } | 46 | } |
47 | } | 47 | } |