From 76c0935ec744f2d230489398f879eb7f42b11d37 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Tue, 17 Feb 2009 01:36:44 +0000 Subject: - remove the Metadata property from AssetBase and return all previous properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit --- OpenSim/Data/MSSQL/MSSQLAssetData.cs | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'OpenSim/Data/MSSQL/MSSQLAssetData.cs') diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 27deef7..0361a7d 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs @@ -132,12 +132,12 @@ namespace OpenSim.Data.MSSQL { AssetBase asset = new AssetBase(); // Region Main - asset.Metadata.FullID = new UUID((string)reader["id"]); - asset.Metadata.Name = (string)reader["name"]; - asset.Metadata.Description = (string)reader["description"]; - asset.Metadata.Type = Convert.ToSByte(reader["assetType"]); - asset.Metadata.Local = Convert.ToBoolean(reader["local"]); - asset.Metadata.Temporary = Convert.ToBoolean(reader["temporary"]); + asset.FullID = new UUID((string)reader["id"]); + asset.Name = (string)reader["name"]; + asset.Description = (string)reader["description"]; + asset.Type = Convert.ToSByte(reader["assetType"]); + asset.Local = Convert.ToBoolean(reader["local"]); + asset.Temporary = Convert.ToBoolean(reader["temporary"]); asset.Data = (byte[])reader["data"]; return asset; } @@ -152,7 +152,7 @@ namespace OpenSim.Data.MSSQL /// the asset override public void CreateAsset(AssetBase asset) { - if (ExistsAsset(asset.Metadata.FullID)) + if (ExistsAsset(asset.FullID)) { return; } @@ -163,12 +163,12 @@ namespace OpenSim.Data.MSSQL "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) { int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); - command.Parameters.Add(database.CreateParameter("id", asset.Metadata.FullID)); - command.Parameters.Add(database.CreateParameter("name", asset.Metadata.Name)); - command.Parameters.Add(database.CreateParameter("description", asset.Metadata.Description)); - command.Parameters.Add(database.CreateParameter("assetType", asset.Metadata.Type)); - command.Parameters.Add(database.CreateParameter("local", asset.Metadata.Local)); - command.Parameters.Add(database.CreateParameter("temporary", asset.Metadata.Temporary)); + command.Parameters.Add(database.CreateParameter("id", asset.FullID)); + command.Parameters.Add(database.CreateParameter("name", asset.Name)); + command.Parameters.Add(database.CreateParameter("description", asset.Description)); + command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); + command.Parameters.Add(database.CreateParameter("local", asset.Local)); + command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); command.Parameters.Add(database.CreateParameter("access_time", now)); command.Parameters.Add(database.CreateParameter("create_time", now)); command.Parameters.Add(database.CreateParameter("data", asset.Data)); @@ -192,14 +192,14 @@ namespace OpenSim.Data.MSSQL "data = @data where " + "id = @keyId;")) { - command.Parameters.Add(database.CreateParameter("id", asset.Metadata.FullID)); - command.Parameters.Add(database.CreateParameter("name", asset.Metadata.Name)); - command.Parameters.Add(database.CreateParameter("description", asset.Metadata.Description)); - command.Parameters.Add(database.CreateParameter("assetType", asset.Metadata.Type)); - command.Parameters.Add(database.CreateParameter("local", asset.Metadata.Local)); - command.Parameters.Add(database.CreateParameter("temporary", asset.Metadata.Temporary)); + command.Parameters.Add(database.CreateParameter("id", asset.FullID)); + command.Parameters.Add(database.CreateParameter("name", asset.Name)); + command.Parameters.Add(database.CreateParameter("description", asset.Description)); + command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); + command.Parameters.Add(database.CreateParameter("local", asset.Local)); + command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); command.Parameters.Add(database.CreateParameter("data", asset.Data)); - command.Parameters.Add(database.CreateParameter("@keyId", asset.Metadata.FullID)); + command.Parameters.Add(database.CreateParameter("@keyId", asset.FullID)); try { -- cgit v1.1