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