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