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 com.liferay.portlet.exportimport.lar.StagedModelType;
023    
024    import java.util.Date;
025    import java.util.HashMap;
026    import java.util.Map;
027    
028    /**
029     * <p>
030     * This class is a wrapper for {@link AssetTag}.
031     * </p>
032     *
033     * @author Brian Wing Shun Chan
034     * @see AssetTag
035     * @generated
036     */
037    @ProviderType
038    public class AssetTagWrapper implements AssetTag, ModelWrapper<AssetTag> {
039            public AssetTagWrapper(AssetTag assetTag) {
040                    _assetTag = assetTag;
041            }
042    
043            @Override
044            public Class<?> getModelClass() {
045                    return AssetTag.class;
046            }
047    
048            @Override
049            public String getModelClassName() {
050                    return AssetTag.class.getName();
051            }
052    
053            @Override
054            public Map<String, Object> getModelAttributes() {
055                    Map<String, Object> attributes = new HashMap<String, Object>();
056    
057                    attributes.put("uuid", getUuid());
058                    attributes.put("tagId", getTagId());
059                    attributes.put("groupId", getGroupId());
060                    attributes.put("companyId", getCompanyId());
061                    attributes.put("userId", getUserId());
062                    attributes.put("userName", getUserName());
063                    attributes.put("createDate", getCreateDate());
064                    attributes.put("modifiedDate", getModifiedDate());
065                    attributes.put("name", getName());
066                    attributes.put("assetCount", getAssetCount());
067                    attributes.put("lastPublishDate", getLastPublishDate());
068    
069                    return attributes;
070            }
071    
072            @Override
073            public void setModelAttributes(Map<String, Object> attributes) {
074                    String uuid = (String)attributes.get("uuid");
075    
076                    if (uuid != null) {
077                            setUuid(uuid);
078                    }
079    
080                    Long tagId = (Long)attributes.get("tagId");
081    
082                    if (tagId != null) {
083                            setTagId(tagId);
084                    }
085    
086                    Long groupId = (Long)attributes.get("groupId");
087    
088                    if (groupId != null) {
089                            setGroupId(groupId);
090                    }
091    
092                    Long companyId = (Long)attributes.get("companyId");
093    
094                    if (companyId != null) {
095                            setCompanyId(companyId);
096                    }
097    
098                    Long userId = (Long)attributes.get("userId");
099    
100                    if (userId != null) {
101                            setUserId(userId);
102                    }
103    
104                    String userName = (String)attributes.get("userName");
105    
106                    if (userName != null) {
107                            setUserName(userName);
108                    }
109    
110                    Date createDate = (Date)attributes.get("createDate");
111    
112                    if (createDate != null) {
113                            setCreateDate(createDate);
114                    }
115    
116                    Date modifiedDate = (Date)attributes.get("modifiedDate");
117    
118                    if (modifiedDate != null) {
119                            setModifiedDate(modifiedDate);
120                    }
121    
122                    String name = (String)attributes.get("name");
123    
124                    if (name != null) {
125                            setName(name);
126                    }
127    
128                    Integer assetCount = (Integer)attributes.get("assetCount");
129    
130                    if (assetCount != null) {
131                            setAssetCount(assetCount);
132                    }
133    
134                    Date lastPublishDate = (Date)attributes.get("lastPublishDate");
135    
136                    if (lastPublishDate != null) {
137                            setLastPublishDate(lastPublishDate);
138                    }
139            }
140    
141            @Override
142            public java.lang.Object clone() {
143                    return new AssetTagWrapper((AssetTag)_assetTag.clone());
144            }
145    
146            @Override
147            public int compareTo(com.liferay.portlet.asset.model.AssetTag assetTag) {
148                    return _assetTag.compareTo(assetTag);
149            }
150    
151            /**
152            * Returns the asset count of this asset tag.
153            *
154            * @return the asset count of this asset tag
155            */
156            @Override
157            public int getAssetCount() {
158                    return _assetTag.getAssetCount();
159            }
160    
161            /**
162            * Returns the company ID of this asset tag.
163            *
164            * @return the company ID of this asset tag
165            */
166            @Override
167            public long getCompanyId() {
168                    return _assetTag.getCompanyId();
169            }
170    
171            /**
172            * Returns the create date of this asset tag.
173            *
174            * @return the create date of this asset tag
175            */
176            @Override
177            public Date getCreateDate() {
178                    return _assetTag.getCreateDate();
179            }
180    
181            @Override
182            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
183                    return _assetTag.getExpandoBridge();
184            }
185    
186            /**
187            * Returns the group ID of this asset tag.
188            *
189            * @return the group ID of this asset tag
190            */
191            @Override
192            public long getGroupId() {
193                    return _assetTag.getGroupId();
194            }
195    
196            /**
197            * Returns the last publish date of this asset tag.
198            *
199            * @return the last publish date of this asset tag
200            */
201            @Override
202            public Date getLastPublishDate() {
203                    return _assetTag.getLastPublishDate();
204            }
205    
206            /**
207            * Returns the modified date of this asset tag.
208            *
209            * @return the modified date of this asset tag
210            */
211            @Override
212            public Date getModifiedDate() {
213                    return _assetTag.getModifiedDate();
214            }
215    
216            /**
217            * Returns the name of this asset tag.
218            *
219            * @return the name of this asset tag
220            */
221            @Override
222            public java.lang.String getName() {
223                    return _assetTag.getName();
224            }
225    
226            /**
227            * Returns the primary key of this asset tag.
228            *
229            * @return the primary key of this asset tag
230            */
231            @Override
232            public long getPrimaryKey() {
233                    return _assetTag.getPrimaryKey();
234            }
235    
236            @Override
237            public java.io.Serializable getPrimaryKeyObj() {
238                    return _assetTag.getPrimaryKeyObj();
239            }
240    
241            /**
242            * Returns the tag ID of this asset tag.
243            *
244            * @return the tag ID of this asset tag
245            */
246            @Override
247            public long getTagId() {
248                    return _assetTag.getTagId();
249            }
250    
251            /**
252            * Returns the user ID of this asset tag.
253            *
254            * @return the user ID of this asset tag
255            */
256            @Override
257            public long getUserId() {
258                    return _assetTag.getUserId();
259            }
260    
261            /**
262            * Returns the user name of this asset tag.
263            *
264            * @return the user name of this asset tag
265            */
266            @Override
267            public java.lang.String getUserName() {
268                    return _assetTag.getUserName();
269            }
270    
271            /**
272            * Returns the user uuid of this asset tag.
273            *
274            * @return the user uuid of this asset tag
275            */
276            @Override
277            public java.lang.String getUserUuid() {
278                    return _assetTag.getUserUuid();
279            }
280    
281            /**
282            * Returns the uuid of this asset tag.
283            *
284            * @return the uuid of this asset tag
285            */
286            @Override
287            public java.lang.String getUuid() {
288                    return _assetTag.getUuid();
289            }
290    
291            @Override
292            public int hashCode() {
293                    return _assetTag.hashCode();
294            }
295    
296            @Override
297            public boolean isCachedModel() {
298                    return _assetTag.isCachedModel();
299            }
300    
301            @Override
302            public boolean isEscapedModel() {
303                    return _assetTag.isEscapedModel();
304            }
305    
306            @Override
307            public boolean isNew() {
308                    return _assetTag.isNew();
309            }
310    
311            @Override
312            public void persist() {
313                    _assetTag.persist();
314            }
315    
316            /**
317            * Sets the asset count of this asset tag.
318            *
319            * @param assetCount the asset count of this asset tag
320            */
321            @Override
322            public void setAssetCount(int assetCount) {
323                    _assetTag.setAssetCount(assetCount);
324            }
325    
326            @Override
327            public void setCachedModel(boolean cachedModel) {
328                    _assetTag.setCachedModel(cachedModel);
329            }
330    
331            /**
332            * Sets the company ID of this asset tag.
333            *
334            * @param companyId the company ID of this asset tag
335            */
336            @Override
337            public void setCompanyId(long companyId) {
338                    _assetTag.setCompanyId(companyId);
339            }
340    
341            /**
342            * Sets the create date of this asset tag.
343            *
344            * @param createDate the create date of this asset tag
345            */
346            @Override
347            public void setCreateDate(Date createDate) {
348                    _assetTag.setCreateDate(createDate);
349            }
350    
351            @Override
352            public void setExpandoBridgeAttributes(
353                    com.liferay.portal.model.BaseModel<?> baseModel) {
354                    _assetTag.setExpandoBridgeAttributes(baseModel);
355            }
356    
357            @Override
358            public void setExpandoBridgeAttributes(
359                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
360                    _assetTag.setExpandoBridgeAttributes(expandoBridge);
361            }
362    
363            @Override
364            public void setExpandoBridgeAttributes(
365                    com.liferay.portal.service.ServiceContext serviceContext) {
366                    _assetTag.setExpandoBridgeAttributes(serviceContext);
367            }
368    
369            /**
370            * Sets the group ID of this asset tag.
371            *
372            * @param groupId the group ID of this asset tag
373            */
374            @Override
375            public void setGroupId(long groupId) {
376                    _assetTag.setGroupId(groupId);
377            }
378    
379            /**
380            * Sets the last publish date of this asset tag.
381            *
382            * @param lastPublishDate the last publish date of this asset tag
383            */
384            @Override
385            public void setLastPublishDate(Date lastPublishDate) {
386                    _assetTag.setLastPublishDate(lastPublishDate);
387            }
388    
389            /**
390            * Sets the modified date of this asset tag.
391            *
392            * @param modifiedDate the modified date of this asset tag
393            */
394            @Override
395            public void setModifiedDate(Date modifiedDate) {
396                    _assetTag.setModifiedDate(modifiedDate);
397            }
398    
399            /**
400            * Sets the name of this asset tag.
401            *
402            * @param name the name of this asset tag
403            */
404            @Override
405            public void setName(java.lang.String name) {
406                    _assetTag.setName(name);
407            }
408    
409            @Override
410            public void setNew(boolean n) {
411                    _assetTag.setNew(n);
412            }
413    
414            /**
415            * Sets the primary key of this asset tag.
416            *
417            * @param primaryKey the primary key of this asset tag
418            */
419            @Override
420            public void setPrimaryKey(long primaryKey) {
421                    _assetTag.setPrimaryKey(primaryKey);
422            }
423    
424            @Override
425            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
426                    _assetTag.setPrimaryKeyObj(primaryKeyObj);
427            }
428    
429            /**
430            * Sets the tag ID of this asset tag.
431            *
432            * @param tagId the tag ID of this asset tag
433            */
434            @Override
435            public void setTagId(long tagId) {
436                    _assetTag.setTagId(tagId);
437            }
438    
439            /**
440            * Sets the user ID of this asset tag.
441            *
442            * @param userId the user ID of this asset tag
443            */
444            @Override
445            public void setUserId(long userId) {
446                    _assetTag.setUserId(userId);
447            }
448    
449            /**
450            * Sets the user name of this asset tag.
451            *
452            * @param userName the user name of this asset tag
453            */
454            @Override
455            public void setUserName(java.lang.String userName) {
456                    _assetTag.setUserName(userName);
457            }
458    
459            /**
460            * Sets the user uuid of this asset tag.
461            *
462            * @param userUuid the user uuid of this asset tag
463            */
464            @Override
465            public void setUserUuid(java.lang.String userUuid) {
466                    _assetTag.setUserUuid(userUuid);
467            }
468    
469            /**
470            * Sets the uuid of this asset tag.
471            *
472            * @param uuid the uuid of this asset tag
473            */
474            @Override
475            public void setUuid(java.lang.String uuid) {
476                    _assetTag.setUuid(uuid);
477            }
478    
479            @Override
480            public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetTag> toCacheModel() {
481                    return _assetTag.toCacheModel();
482            }
483    
484            @Override
485            public com.liferay.portlet.asset.model.AssetTag toEscapedModel() {
486                    return new AssetTagWrapper(_assetTag.toEscapedModel());
487            }
488    
489            @Override
490            public java.lang.String toString() {
491                    return _assetTag.toString();
492            }
493    
494            @Override
495            public com.liferay.portlet.asset.model.AssetTag toUnescapedModel() {
496                    return new AssetTagWrapper(_assetTag.toUnescapedModel());
497            }
498    
499            @Override
500            public java.lang.String toXmlString() {
501                    return _assetTag.toXmlString();
502            }
503    
504            @Override
505            public boolean equals(Object obj) {
506                    if (this == obj) {
507                            return true;
508                    }
509    
510                    if (!(obj instanceof AssetTagWrapper)) {
511                            return false;
512                    }
513    
514                    AssetTagWrapper assetTagWrapper = (AssetTagWrapper)obj;
515    
516                    if (Validator.equals(_assetTag, assetTagWrapper._assetTag)) {
517                            return true;
518                    }
519    
520                    return false;
521            }
522    
523            @Override
524            public StagedModelType getStagedModelType() {
525                    return _assetTag.getStagedModelType();
526            }
527    
528            @Override
529            public AssetTag getWrappedModel() {
530                    return _assetTag;
531            }
532    
533            @Override
534            public boolean isEntityCacheEnabled() {
535                    return _assetTag.isEntityCacheEnabled();
536            }
537    
538            @Override
539            public boolean isFinderCacheEnabled() {
540                    return _assetTag.isFinderCacheEnabled();
541            }
542    
543            @Override
544            public void resetOriginalValues() {
545                    _assetTag.resetOriginalValues();
546            }
547    
548            private final AssetTag _assetTag;
549    }