001
014
015 package com.liferay.portlet.dynamicdatamapping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class DDMStorageLinkWrapper implements DDMStorageLink,
036 ModelWrapper<DDMStorageLink> {
037 public DDMStorageLinkWrapper(DDMStorageLink ddmStorageLink) {
038 _ddmStorageLink = ddmStorageLink;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return DDMStorageLink.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return DDMStorageLink.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("uuid", getUuid());
056 attributes.put("storageLinkId", getStorageLinkId());
057 attributes.put("classNameId", getClassNameId());
058 attributes.put("classPK", getClassPK());
059 attributes.put("structureId", getStructureId());
060
061 return attributes;
062 }
063
064 @Override
065 public void setModelAttributes(Map<String, Object> attributes) {
066 String uuid = (String)attributes.get("uuid");
067
068 if (uuid != null) {
069 setUuid(uuid);
070 }
071
072 Long storageLinkId = (Long)attributes.get("storageLinkId");
073
074 if (storageLinkId != null) {
075 setStorageLinkId(storageLinkId);
076 }
077
078 Long classNameId = (Long)attributes.get("classNameId");
079
080 if (classNameId != null) {
081 setClassNameId(classNameId);
082 }
083
084 Long classPK = (Long)attributes.get("classPK");
085
086 if (classPK != null) {
087 setClassPK(classPK);
088 }
089
090 Long structureId = (Long)attributes.get("structureId");
091
092 if (structureId != null) {
093 setStructureId(structureId);
094 }
095 }
096
097
102 @Override
103 public long getPrimaryKey() {
104 return _ddmStorageLink.getPrimaryKey();
105 }
106
107
112 @Override
113 public void setPrimaryKey(long primaryKey) {
114 _ddmStorageLink.setPrimaryKey(primaryKey);
115 }
116
117
122 @Override
123 public java.lang.String getUuid() {
124 return _ddmStorageLink.getUuid();
125 }
126
127
132 @Override
133 public void setUuid(java.lang.String uuid) {
134 _ddmStorageLink.setUuid(uuid);
135 }
136
137
142 @Override
143 public long getStorageLinkId() {
144 return _ddmStorageLink.getStorageLinkId();
145 }
146
147
152 @Override
153 public void setStorageLinkId(long storageLinkId) {
154 _ddmStorageLink.setStorageLinkId(storageLinkId);
155 }
156
157
162 @Override
163 public java.lang.String getClassName() {
164 return _ddmStorageLink.getClassName();
165 }
166
167 @Override
168 public void setClassName(java.lang.String className) {
169 _ddmStorageLink.setClassName(className);
170 }
171
172
177 @Override
178 public long getClassNameId() {
179 return _ddmStorageLink.getClassNameId();
180 }
181
182
187 @Override
188 public void setClassNameId(long classNameId) {
189 _ddmStorageLink.setClassNameId(classNameId);
190 }
191
192
197 @Override
198 public long getClassPK() {
199 return _ddmStorageLink.getClassPK();
200 }
201
202
207 @Override
208 public void setClassPK(long classPK) {
209 _ddmStorageLink.setClassPK(classPK);
210 }
211
212
217 @Override
218 public long getStructureId() {
219 return _ddmStorageLink.getStructureId();
220 }
221
222
227 @Override
228 public void setStructureId(long structureId) {
229 _ddmStorageLink.setStructureId(structureId);
230 }
231
232 @Override
233 public boolean isNew() {
234 return _ddmStorageLink.isNew();
235 }
236
237 @Override
238 public void setNew(boolean n) {
239 _ddmStorageLink.setNew(n);
240 }
241
242 @Override
243 public boolean isCachedModel() {
244 return _ddmStorageLink.isCachedModel();
245 }
246
247 @Override
248 public void setCachedModel(boolean cachedModel) {
249 _ddmStorageLink.setCachedModel(cachedModel);
250 }
251
252 @Override
253 public boolean isEscapedModel() {
254 return _ddmStorageLink.isEscapedModel();
255 }
256
257 @Override
258 public java.io.Serializable getPrimaryKeyObj() {
259 return _ddmStorageLink.getPrimaryKeyObj();
260 }
261
262 @Override
263 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
264 _ddmStorageLink.setPrimaryKeyObj(primaryKeyObj);
265 }
266
267 @Override
268 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
269 return _ddmStorageLink.getExpandoBridge();
270 }
271
272 @Override
273 public void setExpandoBridgeAttributes(
274 com.liferay.portal.model.BaseModel<?> baseModel) {
275 _ddmStorageLink.setExpandoBridgeAttributes(baseModel);
276 }
277
278 @Override
279 public void setExpandoBridgeAttributes(
280 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
281 _ddmStorageLink.setExpandoBridgeAttributes(expandoBridge);
282 }
283
284 @Override
285 public void setExpandoBridgeAttributes(
286 com.liferay.portal.service.ServiceContext serviceContext) {
287 _ddmStorageLink.setExpandoBridgeAttributes(serviceContext);
288 }
289
290 @Override
291 public java.lang.Object clone() {
292 return new DDMStorageLinkWrapper((DDMStorageLink)_ddmStorageLink.clone());
293 }
294
295 @Override
296 public int compareTo(
297 com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
298 return _ddmStorageLink.compareTo(ddmStorageLink);
299 }
300
301 @Override
302 public int hashCode() {
303 return _ddmStorageLink.hashCode();
304 }
305
306 @Override
307 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> toCacheModel() {
308 return _ddmStorageLink.toCacheModel();
309 }
310
311 @Override
312 public com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink toEscapedModel() {
313 return new DDMStorageLinkWrapper(_ddmStorageLink.toEscapedModel());
314 }
315
316 @Override
317 public com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink toUnescapedModel() {
318 return new DDMStorageLinkWrapper(_ddmStorageLink.toUnescapedModel());
319 }
320
321 @Override
322 public java.lang.String toString() {
323 return _ddmStorageLink.toString();
324 }
325
326 @Override
327 public java.lang.String toXmlString() {
328 return _ddmStorageLink.toXmlString();
329 }
330
331 @Override
332 public void persist()
333 throws com.liferay.portal.kernel.exception.SystemException {
334 _ddmStorageLink.persist();
335 }
336
337 @Override
338 public java.lang.String getStorageType()
339 throws com.liferay.portal.kernel.exception.PortalException,
340 com.liferay.portal.kernel.exception.SystemException {
341 return _ddmStorageLink.getStorageType();
342 }
343
344 @Override
345 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure()
346 throws com.liferay.portal.kernel.exception.PortalException,
347 com.liferay.portal.kernel.exception.SystemException {
348 return _ddmStorageLink.getStructure();
349 }
350
351 @Override
352 public boolean equals(Object obj) {
353 if (this == obj) {
354 return true;
355 }
356
357 if (!(obj instanceof DDMStorageLinkWrapper)) {
358 return false;
359 }
360
361 DDMStorageLinkWrapper ddmStorageLinkWrapper = (DDMStorageLinkWrapper)obj;
362
363 if (Validator.equals(_ddmStorageLink,
364 ddmStorageLinkWrapper._ddmStorageLink)) {
365 return true;
366 }
367
368 return false;
369 }
370
371
374 public DDMStorageLink getWrappedDDMStorageLink() {
375 return _ddmStorageLink;
376 }
377
378 @Override
379 public DDMStorageLink getWrappedModel() {
380 return _ddmStorageLink;
381 }
382
383 @Override
384 public void resetOriginalValues() {
385 _ddmStorageLink.resetOriginalValues();
386 }
387
388 private DDMStorageLink _ddmStorageLink;
389 }