aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Base/AppearanceTableMapper.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Base/AppearanceTableMapper.cs116
1 files changed, 58 insertions, 58 deletions
diff --git a/OpenSim/Data/Base/AppearanceTableMapper.cs b/OpenSim/Data/Base/AppearanceTableMapper.cs
index 7964880..c1bb739 100644
--- a/OpenSim/Data/Base/AppearanceTableMapper.cs
+++ b/OpenSim/Data/Base/AppearanceTableMapper.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Data.Base; 30using OpenSim.Data.Base;
31using OpenSim.Framework; 31using OpenSim.Framework;
32 32
@@ -55,15 +55,15 @@ namespace OpenSim.Data.Base
55 m_schema = rowMapperSchema; 55 m_schema = rowMapperSchema;
56 56
57 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID", 57 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID",
58 delegate(AppearanceRowMapper mapper) { return mapper.Object.Owner.UUID; }, 58 delegate(AppearanceRowMapper mapper) { return mapper.Object.Owner.Guid; },
59 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Owner = new LLUUID(value.ToString()); }); 59 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Owner = new UUID(value.ToString()); });
60 60
61 rowMapperSchema.AddMapping<uint>("Serial", 61 rowMapperSchema.AddMapping<uint>("Serial",
62 delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.Serial; }, 62 delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.Serial; },
63 delegate(AppearanceRowMapper mapper, uint value) { mapper.Object.Serial = (int)value; }); 63 delegate(AppearanceRowMapper mapper, uint value) { mapper.Object.Serial = (int)value; });
64 64
65 rowMapperSchema.AddMapping<Guid>("WearableItem0", 65 rowMapperSchema.AddMapping<Guid>("WearableItem0",
66 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].ItemID.UUID; }, 66 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].ItemID.Guid; },
67 delegate(AppearanceRowMapper mapper, Guid value) 67 delegate(AppearanceRowMapper mapper, Guid value)
68 { 68 {
69 if (mapper.Object.Wearables == null) 69 if (mapper.Object.Wearables == null)
@@ -74,121 +74,121 @@ namespace OpenSim.Data.Base
74 mapper.Object.Wearables[i] = new AvatarWearable(); 74 mapper.Object.Wearables[i] = new AvatarWearable();
75 } 75 }
76 } 76 }
77 mapper.Object.Wearables[0].ItemID = new LLUUID(value.ToString()); 77 mapper.Object.Wearables[0].ItemID = new UUID(value.ToString());
78 }); 78 });
79 79
80 rowMapperSchema.AddMapping<Guid>("WearableAsset0", 80 rowMapperSchema.AddMapping<Guid>("WearableAsset0",
81 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.UUID; }, 81 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.Guid; },
82 delegate(AppearanceRowMapper mapper, Guid value) 82 delegate(AppearanceRowMapper mapper, Guid value)
83 { mapper.Object.Wearables[0].AssetID = new LLUUID(value.ToString()); }); 83 { mapper.Object.Wearables[0].AssetID = new UUID(value.ToString()); });
84 84
85 rowMapperSchema.AddMapping<Guid>("WearableItem1", 85 rowMapperSchema.AddMapping<Guid>("WearableItem1",
86 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.UUID; }, 86 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.Guid; },
87 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new LLUUID(value.ToString()); }); 87 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new UUID(value.ToString()); });
88 88
89 rowMapperSchema.AddMapping<Guid>("WearableAsset1", 89 rowMapperSchema.AddMapping<Guid>("WearableAsset1",
90 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.UUID; }, 90 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.Guid; },
91 delegate(AppearanceRowMapper mapper, Guid value) 91 delegate(AppearanceRowMapper mapper, Guid value)
92 { mapper.Object.Wearables[1].AssetID = new LLUUID(value.ToString()); }); 92 { mapper.Object.Wearables[1].AssetID = new UUID(value.ToString()); });
93 93
94 rowMapperSchema.AddMapping<Guid>("WearableItem2", 94 rowMapperSchema.AddMapping<Guid>("WearableItem2",
95 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.UUID; }, 95 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.Guid; },
96 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new LLUUID(value.ToString()); }); 96 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new UUID(value.ToString()); });
97 97
98 rowMapperSchema.AddMapping<Guid>("WearableAsset2", 98 rowMapperSchema.AddMapping<Guid>("WearableAsset2",
99 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.UUID; }, 99 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.Guid; },
100 delegate(AppearanceRowMapper mapper, Guid value) 100 delegate(AppearanceRowMapper mapper, Guid value)
101 { mapper.Object.Wearables[2].AssetID = new LLUUID(value.ToString()); }); 101 { mapper.Object.Wearables[2].AssetID = new UUID(value.ToString()); });
102 102
103 rowMapperSchema.AddMapping<Guid>("WearableItem3", 103 rowMapperSchema.AddMapping<Guid>("WearableItem3",
104 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.UUID; }, 104 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.Guid; },
105 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new LLUUID(value.ToString()); }); 105 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new UUID(value.ToString()); });
106 106
107 rowMapperSchema.AddMapping<Guid>("WearableAsset3", 107 rowMapperSchema.AddMapping<Guid>("WearableAsset3",
108 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.UUID; }, 108 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.Guid; },
109 delegate(AppearanceRowMapper mapper, Guid value) 109 delegate(AppearanceRowMapper mapper, Guid value)
110 { mapper.Object.Wearables[3].AssetID = new LLUUID(value.ToString()); }); 110 { mapper.Object.Wearables[3].AssetID = new UUID(value.ToString()); });
111 111
112 rowMapperSchema.AddMapping<Guid>("WearableItem4", 112 rowMapperSchema.AddMapping<Guid>("WearableItem4",
113 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.UUID; }, 113 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.Guid; },
114 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new LLUUID(value.ToString()); }); 114 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new UUID(value.ToString()); });
115 115
116 rowMapperSchema.AddMapping<Guid>("WearableAsset4", 116 rowMapperSchema.AddMapping<Guid>("WearableAsset4",
117 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.UUID; }, 117 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.Guid; },
118 delegate(AppearanceRowMapper mapper, Guid value) 118 delegate(AppearanceRowMapper mapper, Guid value)
119 { mapper.Object.Wearables[4].AssetID = new LLUUID(value.ToString()); }); 119 { mapper.Object.Wearables[4].AssetID = new UUID(value.ToString()); });
120 120
121 rowMapperSchema.AddMapping<Guid>("WearableItem5", 121 rowMapperSchema.AddMapping<Guid>("WearableItem5",
122 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.UUID; }, 122 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.Guid; },
123 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new LLUUID(value.ToString()); }); 123 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new UUID(value.ToString()); });
124 124
125 rowMapperSchema.AddMapping<Guid>("WearableAsset5", 125 rowMapperSchema.AddMapping<Guid>("WearableAsset5",
126 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.UUID; }, 126 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.Guid; },
127 delegate(AppearanceRowMapper mapper, Guid value) 127 delegate(AppearanceRowMapper mapper, Guid value)
128 { mapper.Object.Wearables[5].AssetID = new LLUUID(value.ToString()); }); 128 { mapper.Object.Wearables[5].AssetID = new UUID(value.ToString()); });
129 129
130 rowMapperSchema.AddMapping<Guid>("WearableItem6", 130 rowMapperSchema.AddMapping<Guid>("WearableItem6",
131 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.UUID; }, 131 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.Guid; },
132 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new LLUUID(value.ToString()); }); 132 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new UUID(value.ToString()); });
133 133
134 rowMapperSchema.AddMapping<Guid>("WearableAsset6", 134 rowMapperSchema.AddMapping<Guid>("WearableAsset6",
135 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.UUID; }, 135 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.Guid; },
136 delegate(AppearanceRowMapper mapper, Guid value) 136 delegate(AppearanceRowMapper mapper, Guid value)
137 { mapper.Object.Wearables[6].AssetID = new LLUUID(value.ToString()); }); 137 { mapper.Object.Wearables[6].AssetID = new UUID(value.ToString()); });
138 138
139 rowMapperSchema.AddMapping<Guid>("WearableItem7", 139 rowMapperSchema.AddMapping<Guid>("WearableItem7",
140 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.UUID; }, 140 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.Guid; },
141 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new LLUUID(value.ToString()); }); 141 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new UUID(value.ToString()); });
142 142
143 rowMapperSchema.AddMapping<Guid>("WearableAsset7", 143 rowMapperSchema.AddMapping<Guid>("WearableAsset7",
144 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.UUID; }, 144 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.Guid; },
145 delegate(AppearanceRowMapper mapper, Guid value) 145 delegate(AppearanceRowMapper mapper, Guid value)
146 { mapper.Object.Wearables[7].AssetID = new LLUUID(value.ToString()); }); 146 { mapper.Object.Wearables[7].AssetID = new UUID(value.ToString()); });
147 147
148 rowMapperSchema.AddMapping<Guid>("WearableItem8", 148 rowMapperSchema.AddMapping<Guid>("WearableItem8",
149 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.UUID; }, 149 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.Guid; },
150 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new LLUUID(value.ToString()); }); 150 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new UUID(value.ToString()); });
151 151
152 rowMapperSchema.AddMapping<Guid>("WearableAsset8", 152 rowMapperSchema.AddMapping<Guid>("WearableAsset8",
153 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.UUID; }, 153 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.Guid; },
154 delegate(AppearanceRowMapper mapper, Guid value) 154 delegate(AppearanceRowMapper mapper, Guid value)
155 { mapper.Object.Wearables[8].AssetID = new LLUUID(value.ToString()); }); 155 { mapper.Object.Wearables[8].AssetID = new UUID(value.ToString()); });
156 156
157 rowMapperSchema.AddMapping<Guid>("WearableItem9", 157 rowMapperSchema.AddMapping<Guid>("WearableItem9",
158 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.UUID; }, 158 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.Guid; },
159 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new LLUUID(value.ToString()); }); 159 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new UUID(value.ToString()); });
160 160
161 rowMapperSchema.AddMapping<Guid>("WearableAsset9", 161 rowMapperSchema.AddMapping<Guid>("WearableAsset9",
162 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.UUID; }, 162 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.Guid; },
163 delegate(AppearanceRowMapper mapper, Guid value) 163 delegate(AppearanceRowMapper mapper, Guid value)
164 { mapper.Object.Wearables[9].AssetID = new LLUUID(value.ToString()); }); 164 { mapper.Object.Wearables[9].AssetID = new UUID(value.ToString()); });
165 165
166 rowMapperSchema.AddMapping<Guid>("WearableItem10", 166 rowMapperSchema.AddMapping<Guid>("WearableItem10",
167 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.UUID; }, 167 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.Guid; },
168 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new LLUUID(value.ToString()); }); 168 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new UUID(value.ToString()); });
169 169
170 rowMapperSchema.AddMapping<Guid>("WearableAsset10", 170 rowMapperSchema.AddMapping<Guid>("WearableAsset10",
171 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.UUID; }, 171 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.Guid; },
172 delegate(AppearanceRowMapper mapper, Guid value) 172 delegate(AppearanceRowMapper mapper, Guid value)
173 { mapper.Object.Wearables[10].AssetID = new LLUUID(value.ToString()); }); 173 { mapper.Object.Wearables[10].AssetID = new UUID(value.ToString()); });
174 174
175 rowMapperSchema.AddMapping<Guid>("WearableItem11", 175 rowMapperSchema.AddMapping<Guid>("WearableItem11",
176 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.UUID; }, 176 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.Guid; },
177 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new LLUUID(value.ToString()); }); 177 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new UUID(value.ToString()); });
178 178
179 rowMapperSchema.AddMapping<Guid>("WearableAsset11", 179 rowMapperSchema.AddMapping<Guid>("WearableAsset11",
180 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.UUID; }, 180 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.Guid; },
181 delegate(AppearanceRowMapper mapper, Guid value) 181 delegate(AppearanceRowMapper mapper, Guid value)
182 { mapper.Object.Wearables[11].AssetID = new LLUUID(value.ToString()); }); 182 { mapper.Object.Wearables[11].AssetID = new UUID(value.ToString()); });
183 183
184 rowMapperSchema.AddMapping<Guid>("WearableItem12", 184 rowMapperSchema.AddMapping<Guid>("WearableItem12",
185 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.UUID; }, 185 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.Guid; },
186 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new LLUUID(value.ToString()); }); 186 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new UUID(value.ToString()); });
187 187
188 rowMapperSchema.AddMapping<Guid>("WearableAsset12", 188 rowMapperSchema.AddMapping<Guid>("WearableAsset12",
189 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.UUID; }, 189 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.Guid; },
190 delegate(AppearanceRowMapper mapper, Guid value) 190 delegate(AppearanceRowMapper mapper, Guid value)
191 { mapper.Object.Wearables[12].AssetID = new LLUUID(value.ToString()); }); 191 { mapper.Object.Wearables[12].AssetID = new UUID(value.ToString()); });
192 192
193 } 193 }
194 194
@@ -213,7 +213,7 @@ namespace OpenSim.Data.Base
213 public bool Update(Guid userID, AvatarAppearance appearance) 213 public bool Update(Guid userID, AvatarAppearance appearance)
214 { 214 {
215 AppearanceRowMapper mapper = CreateRowMapper(appearance); 215 AppearanceRowMapper mapper = CreateRowMapper(appearance);
216 return Update(appearance.Owner.UUID, mapper); 216 return Update(appearance.Owner.Guid, mapper);
217 } 217 }
218 218
219 /// <summary> 219 /// <summary>
@@ -244,7 +244,7 @@ namespace OpenSim.Data.Base
244 protected AppearanceRowMapper FromReader(BaseDataReader reader, AvatarAppearance appearance) 244 protected AppearanceRowMapper FromReader(BaseDataReader reader, AvatarAppearance appearance)
245 { 245 {
246 AppearanceRowMapper mapper = CreateRowMapper(appearance); 246 AppearanceRowMapper mapper = CreateRowMapper(appearance);
247 mapper.FillObject(reader); 247 mapper.FiPrimitive(reader);
248 return mapper; 248 return mapper;
249 } 249 }
250 250
@@ -256,7 +256,7 @@ namespace OpenSim.Data.Base
256 public override AppearanceRowMapper FromReader(BaseDataReader reader) 256 public override AppearanceRowMapper FromReader(BaseDataReader reader)
257 { 257 {
258 AppearanceRowMapper mapper = CreateRowMapper(); 258 AppearanceRowMapper mapper = CreateRowMapper();
259 mapper.FillObject(reader); 259 mapper.FiPrimitive(reader);
260 return mapper; 260 return mapper;
261 } 261 }
262 262