001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.asset.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.Date;
023    import java.util.HashMap;
024    import java.util.Map;
025    
026    /**
027     * <p>
028     * This class is a wrapper for {@link AssetTagProperty}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see AssetTagProperty
033     * @generated
034     */
035    @ProviderType
036    public class AssetTagPropertyWrapper implements AssetTagProperty,
037            ModelWrapper<AssetTagProperty> {
038            public AssetTagPropertyWrapper(AssetTagProperty assetTagProperty) {
039                    _assetTagProperty = assetTagProperty;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return AssetTagProperty.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return AssetTagProperty.class.getName();
050            }
051    
052            @Override
053            public Map<String, Object> getModelAttributes() {
054                    Map<String, Object> attributes = new HashMap<String, Object>();
055    
056                    attributes.put("tagPropertyId", getTagPropertyId());
057                    attributes.put("companyId", getCompanyId());
058                    attributes.put("userId", getUserId());
059                    attributes.put("userName", getUserName());
060                    attributes.put("createDate", getCreateDate());
061                    attributes.put("modifiedDate", getModifiedDate());
062                    attributes.put("tagId", getTagId());
063                    attributes.put("key", getKey());
064                    attributes.put("value", getValue());
065    
066                    return attributes;
067            }
068    
069            @Override
070            public void setModelAttributes(Map<String, Object> attributes) {
071                    Long tagPropertyId = (Long)attributes.get("tagPropertyId");
072    
073                    if (tagPropertyId != null) {
074                            setTagPropertyId(tagPropertyId);
075                    }
076    
077                    Long companyId = (Long)attributes.get("companyId");
078    
079                    if (companyId != null) {
080                            setCompanyId(companyId);
081                    }
082    
083                    Long userId = (Long)attributes.get("userId");
084    
085                    if (userId != null) {
086                            setUserId(userId);
087                    }
088    
089                    String userName = (String)attributes.get("userName");
090    
091                    if (userName != null) {
092                            setUserName(userName);
093                    }
094    
095                    Date createDate = (Date)attributes.get("createDate");
096    
097                    if (createDate != null) {
098                            setCreateDate(createDate);
099                    }
100    
101                    Date modifiedDate = (Date)attributes.get("modifiedDate");
102    
103                    if (modifiedDate != null) {
104                            setModifiedDate(modifiedDate);
105                    }
106    
107                    Long tagId = (Long)attributes.get("tagId");
108    
109                    if (tagId != null) {
110                            setTagId(tagId);
111                    }
112    
113                    String key = (String)attributes.get("key");
114    
115                    if (key != null) {
116                            setKey(key);
117                    }
118    
119                    String value = (String)attributes.get("value");
120    
121                    if (value != null) {
122                            setValue(value);
123                    }
124            }
125    
126            @Override
127            public java.lang.Object clone() {
128                    return new AssetTagPropertyWrapper((AssetTagProperty)_assetTagProperty.clone());
129            }
130    
131            @Override
132            public int compareTo(
133                    com.liferay.portlet.asset.model.AssetTagProperty assetTagProperty) {
134                    return _assetTagProperty.compareTo(assetTagProperty);
135            }
136    
137            /**
138            * Returns the company ID of this asset tag property.
139            *
140            * @return the company ID of this asset tag property
141            */
142            @Override
143            public long getCompanyId() {
144                    return _assetTagProperty.getCompanyId();
145            }
146    
147            /**
148            * Returns the create date of this asset tag property.
149            *
150            * @return the create date of this asset tag property
151            */
152            @Override
153            public java.util.Date getCreateDate() {
154                    return _assetTagProperty.getCreateDate();
155            }
156    
157            @Override
158            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
159                    return _assetTagProperty.getExpandoBridge();
160            }
161    
162            /**
163            * Returns the key of this asset tag property.
164            *
165            * @return the key of this asset tag property
166            */
167            @Override
168            public java.lang.String getKey() {
169                    return _assetTagProperty.getKey();
170            }
171    
172            /**
173            * Returns the modified date of this asset tag property.
174            *
175            * @return the modified date of this asset tag property
176            */
177            @Override
178            public java.util.Date getModifiedDate() {
179                    return _assetTagProperty.getModifiedDate();
180            }
181    
182            /**
183            * Returns the primary key of this asset tag property.
184            *
185            * @return the primary key of this asset tag property
186            */
187            @Override
188            public long getPrimaryKey() {
189                    return _assetTagProperty.getPrimaryKey();
190            }
191    
192            @Override
193            public java.io.Serializable getPrimaryKeyObj() {
194                    return _assetTagProperty.getPrimaryKeyObj();
195            }
196    
197            /**
198            * Returns the tag ID of this asset tag property.
199            *
200            * @return the tag ID of this asset tag property
201            */
202            @Override
203            public long getTagId() {
204                    return _assetTagProperty.getTagId();
205            }
206    
207            /**
208            * Returns the tag property ID of this asset tag property.
209            *
210            * @return the tag property ID of this asset tag property
211            */
212            @Override
213            public long getTagPropertyId() {
214                    return _assetTagProperty.getTagPropertyId();
215            }
216    
217            /**
218            * Returns the user ID of this asset tag property.
219            *
220            * @return the user ID of this asset tag property
221            */
222            @Override
223            public long getUserId() {
224                    return _assetTagProperty.getUserId();
225            }
226    
227            /**
228            * Returns the user name of this asset tag property.
229            *
230            * @return the user name of this asset tag property
231            */
232            @Override
233            public java.lang.String getUserName() {
234                    return _assetTagProperty.getUserName();
235            }
236    
237            /**
238            * Returns the user uuid of this asset tag property.
239            *
240            * @return the user uuid of this asset tag property
241            */
242            @Override
243            public java.lang.String getUserUuid() {
244                    return _assetTagProperty.getUserUuid();
245            }
246    
247            /**
248            * Returns the value of this asset tag property.
249            *
250            * @return the value of this asset tag property
251            */
252            @Override
253            public java.lang.String getValue() {
254                    return _assetTagProperty.getValue();
255            }
256    
257            @Override
258            public int hashCode() {
259                    return _assetTagProperty.hashCode();
260            }
261    
262            @Override
263            public boolean isCachedModel() {
264                    return _assetTagProperty.isCachedModel();
265            }
266    
267            @Override
268            public boolean isEscapedModel() {
269                    return _assetTagProperty.isEscapedModel();
270            }
271    
272            @Override
273            public boolean isNew() {
274                    return _assetTagProperty.isNew();
275            }
276    
277            @Override
278            public void persist() {
279                    _assetTagProperty.persist();
280            }
281    
282            @Override
283            public void setCachedModel(boolean cachedModel) {
284                    _assetTagProperty.setCachedModel(cachedModel);
285            }
286    
287            /**
288            * Sets the company ID of this asset tag property.
289            *
290            * @param companyId the company ID of this asset tag property
291            */
292            @Override
293            public void setCompanyId(long companyId) {
294                    _assetTagProperty.setCompanyId(companyId);
295            }
296    
297            /**
298            * Sets the create date of this asset tag property.
299            *
300            * @param createDate the create date of this asset tag property
301            */
302            @Override
303            public void setCreateDate(java.util.Date createDate) {
304                    _assetTagProperty.setCreateDate(createDate);
305            }
306    
307            @Override
308            public void setExpandoBridgeAttributes(
309                    com.liferay.portal.model.BaseModel<?> baseModel) {
310                    _assetTagProperty.setExpandoBridgeAttributes(baseModel);
311            }
312    
313            @Override
314            public void setExpandoBridgeAttributes(
315                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
316                    _assetTagProperty.setExpandoBridgeAttributes(expandoBridge);
317            }
318    
319            @Override
320            public void setExpandoBridgeAttributes(
321                    com.liferay.portal.service.ServiceContext serviceContext) {
322                    _assetTagProperty.setExpandoBridgeAttributes(serviceContext);
323            }
324    
325            /**
326            * Sets the key of this asset tag property.
327            *
328            * @param key the key of this asset tag property
329            */
330            @Override
331            public void setKey(java.lang.String key) {
332                    _assetTagProperty.setKey(key);
333            }
334    
335            /**
336            * Sets the modified date of this asset tag property.
337            *
338            * @param modifiedDate the modified date of this asset tag property
339            */
340            @Override
341            public void setModifiedDate(java.util.Date modifiedDate) {
342                    _assetTagProperty.setModifiedDate(modifiedDate);
343            }
344    
345            @Override
346            public void setNew(boolean n) {
347                    _assetTagProperty.setNew(n);
348            }
349    
350            /**
351            * Sets the primary key of this asset tag property.
352            *
353            * @param primaryKey the primary key of this asset tag property
354            */
355            @Override
356            public void setPrimaryKey(long primaryKey) {
357                    _assetTagProperty.setPrimaryKey(primaryKey);
358            }
359    
360            @Override
361            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
362                    _assetTagProperty.setPrimaryKeyObj(primaryKeyObj);
363            }
364    
365            /**
366            * Sets the tag ID of this asset tag property.
367            *
368            * @param tagId the tag ID of this asset tag property
369            */
370            @Override
371            public void setTagId(long tagId) {
372                    _assetTagProperty.setTagId(tagId);
373            }
374    
375            /**
376            * Sets the tag property ID of this asset tag property.
377            *
378            * @param tagPropertyId the tag property ID of this asset tag property
379            */
380            @Override
381            public void setTagPropertyId(long tagPropertyId) {
382                    _assetTagProperty.setTagPropertyId(tagPropertyId);
383            }
384    
385            /**
386            * Sets the user ID of this asset tag property.
387            *
388            * @param userId the user ID of this asset tag property
389            */
390            @Override
391            public void setUserId(long userId) {
392                    _assetTagProperty.setUserId(userId);
393            }
394    
395            /**
396            * Sets the user name of this asset tag property.
397            *
398            * @param userName the user name of this asset tag property
399            */
400            @Override
401            public void setUserName(java.lang.String userName) {
402                    _assetTagProperty.setUserName(userName);
403            }
404    
405            /**
406            * Sets the user uuid of this asset tag property.
407            *
408            * @param userUuid the user uuid of this asset tag property
409            */
410            @Override
411            public void setUserUuid(java.lang.String userUuid) {
412                    _assetTagProperty.setUserUuid(userUuid);
413            }
414    
415            /**
416            * Sets the value of this asset tag property.
417            *
418            * @param value the value of this asset tag property
419            */
420            @Override
421            public void setValue(java.lang.String value) {
422                    _assetTagProperty.setValue(value);
423            }
424    
425            @Override
426            public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetTagProperty> toCacheModel() {
427                    return _assetTagProperty.toCacheModel();
428            }
429    
430            @Override
431            public com.liferay.portlet.asset.model.AssetTagProperty toEscapedModel() {
432                    return new AssetTagPropertyWrapper(_assetTagProperty.toEscapedModel());
433            }
434    
435            @Override
436            public java.lang.String toString() {
437                    return _assetTagProperty.toString();
438            }
439    
440            @Override
441            public com.liferay.portlet.asset.model.AssetTagProperty toUnescapedModel() {
442                    return new AssetTagPropertyWrapper(_assetTagProperty.toUnescapedModel());
443            }
444    
445            @Override
446            public java.lang.String toXmlString() {
447                    return _assetTagProperty.toXmlString();
448            }
449    
450            @Override
451            public boolean equals(Object obj) {
452                    if (this == obj) {
453                            return true;
454                    }
455    
456                    if (!(obj instanceof AssetTagPropertyWrapper)) {
457                            return false;
458                    }
459    
460                    AssetTagPropertyWrapper assetTagPropertyWrapper = (AssetTagPropertyWrapper)obj;
461    
462                    if (Validator.equals(_assetTagProperty,
463                                            assetTagPropertyWrapper._assetTagProperty)) {
464                            return true;
465                    }
466    
467                    return false;
468            }
469    
470            /**
471             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
472             */
473            @Deprecated
474            public AssetTagProperty getWrappedAssetTagProperty() {
475                    return _assetTagProperty;
476            }
477    
478            @Override
479            public AssetTagProperty getWrappedModel() {
480                    return _assetTagProperty;
481            }
482    
483            @Override
484            public boolean isEntityCacheEnabled() {
485                    return _assetTagProperty.isEntityCacheEnabled();
486            }
487    
488            @Override
489            public boolean isFinderCacheEnabled() {
490                    return _assetTagProperty.isFinderCacheEnabled();
491            }
492    
493            @Override
494            public void resetOriginalValues() {
495                    _assetTagProperty.resetOriginalValues();
496            }
497    
498            private final AssetTagProperty _assetTagProperty;
499    }