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    
026    import java.io.Serializable;
027    
028    import java.util.Date;
029    import java.util.HashMap;
030    import java.util.Map;
031    import java.util.Objects;
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 AssetTag toEscapedModel() {
148                    return new AssetTagWrapper(_assetTag.toEscapedModel());
149            }
150    
151            @Override
152            public AssetTag toUnescapedModel() {
153                    return new AssetTagWrapper(_assetTag.toUnescapedModel());
154            }
155    
156            @Override
157            public boolean isCachedModel() {
158                    return _assetTag.isCachedModel();
159            }
160    
161            @Override
162            public boolean isEscapedModel() {
163                    return _assetTag.isEscapedModel();
164            }
165    
166            @Override
167            public boolean isNew() {
168                    return _assetTag.isNew();
169            }
170    
171            @Override
172            public ExpandoBridge getExpandoBridge() {
173                    return _assetTag.getExpandoBridge();
174            }
175    
176            @Override
177            public com.liferay.portal.kernel.model.CacheModel<AssetTag> toCacheModel() {
178                    return _assetTag.toCacheModel();
179            }
180    
181            @Override
182            public int compareTo(AssetTag assetTag) {
183                    return _assetTag.compareTo(assetTag);
184            }
185    
186            /**
187            * Returns the asset count of this asset tag.
188            *
189            * @return the asset count of this asset tag
190            */
191            @Override
192            public int getAssetCount() {
193                    return _assetTag.getAssetCount();
194            }
195    
196            @Override
197            public int hashCode() {
198                    return _assetTag.hashCode();
199            }
200    
201            @Override
202            public Serializable getPrimaryKeyObj() {
203                    return _assetTag.getPrimaryKeyObj();
204            }
205    
206            @Override
207            public java.lang.Object clone() {
208                    return new AssetTagWrapper((AssetTag)_assetTag.clone());
209            }
210    
211            /**
212            * Returns the name of this asset tag.
213            *
214            * @return the name of this asset tag
215            */
216            @Override
217            public java.lang.String getName() {
218                    return _assetTag.getName();
219            }
220    
221            /**
222            * Returns the user name of this asset tag.
223            *
224            * @return the user name of this asset tag
225            */
226            @Override
227            public java.lang.String getUserName() {
228                    return _assetTag.getUserName();
229            }
230    
231            /**
232            * Returns the user uuid of this asset tag.
233            *
234            * @return the user uuid of this asset tag
235            */
236            @Override
237            public java.lang.String getUserUuid() {
238                    return _assetTag.getUserUuid();
239            }
240    
241            /**
242            * Returns the uuid of this asset tag.
243            *
244            * @return the uuid of this asset tag
245            */
246            @Override
247            public java.lang.String getUuid() {
248                    return _assetTag.getUuid();
249            }
250    
251            @Override
252            public java.lang.String toString() {
253                    return _assetTag.toString();
254            }
255    
256            @Override
257            public java.lang.String toXmlString() {
258                    return _assetTag.toXmlString();
259            }
260    
261            /**
262            * Returns the create date of this asset tag.
263            *
264            * @return the create date of this asset tag
265            */
266            @Override
267            public Date getCreateDate() {
268                    return _assetTag.getCreateDate();
269            }
270    
271            /**
272            * Returns the last publish date of this asset tag.
273            *
274            * @return the last publish date of this asset tag
275            */
276            @Override
277            public Date getLastPublishDate() {
278                    return _assetTag.getLastPublishDate();
279            }
280    
281            /**
282            * Returns the modified date of this asset tag.
283            *
284            * @return the modified date of this asset tag
285            */
286            @Override
287            public Date getModifiedDate() {
288                    return _assetTag.getModifiedDate();
289            }
290    
291            /**
292            * Returns the company ID of this asset tag.
293            *
294            * @return the company ID of this asset tag
295            */
296            @Override
297            public long getCompanyId() {
298                    return _assetTag.getCompanyId();
299            }
300    
301            /**
302            * Returns the group ID of this asset tag.
303            *
304            * @return the group ID of this asset tag
305            */
306            @Override
307            public long getGroupId() {
308                    return _assetTag.getGroupId();
309            }
310    
311            /**
312            * Returns the primary key of this asset tag.
313            *
314            * @return the primary key of this asset tag
315            */
316            @Override
317            public long getPrimaryKey() {
318                    return _assetTag.getPrimaryKey();
319            }
320    
321            /**
322            * Returns the tag ID of this asset tag.
323            *
324            * @return the tag ID of this asset tag
325            */
326            @Override
327            public long getTagId() {
328                    return _assetTag.getTagId();
329            }
330    
331            /**
332            * Returns the user ID of this asset tag.
333            *
334            * @return the user ID of this asset tag
335            */
336            @Override
337            public long getUserId() {
338                    return _assetTag.getUserId();
339            }
340    
341            @Override
342            public void persist() {
343                    _assetTag.persist();
344            }
345    
346            /**
347            * Sets the asset count of this asset tag.
348            *
349            * @param assetCount the asset count of this asset tag
350            */
351            @Override
352            public void setAssetCount(int assetCount) {
353                    _assetTag.setAssetCount(assetCount);
354            }
355    
356            @Override
357            public void setCachedModel(boolean cachedModel) {
358                    _assetTag.setCachedModel(cachedModel);
359            }
360    
361            /**
362            * Sets the company ID of this asset tag.
363            *
364            * @param companyId the company ID of this asset tag
365            */
366            @Override
367            public void setCompanyId(long companyId) {
368                    _assetTag.setCompanyId(companyId);
369            }
370    
371            /**
372            * Sets the create date of this asset tag.
373            *
374            * @param createDate the create date of this asset tag
375            */
376            @Override
377            public void setCreateDate(Date createDate) {
378                    _assetTag.setCreateDate(createDate);
379            }
380    
381            @Override
382            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
383                    _assetTag.setExpandoBridgeAttributes(expandoBridge);
384            }
385    
386            @Override
387            public void setExpandoBridgeAttributes(
388                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
389                    _assetTag.setExpandoBridgeAttributes(baseModel);
390            }
391    
392            @Override
393            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
394                    _assetTag.setExpandoBridgeAttributes(serviceContext);
395            }
396    
397            /**
398            * Sets the group ID of this asset tag.
399            *
400            * @param groupId the group ID of this asset tag
401            */
402            @Override
403            public void setGroupId(long groupId) {
404                    _assetTag.setGroupId(groupId);
405            }
406    
407            /**
408            * Sets the last publish date of this asset tag.
409            *
410            * @param lastPublishDate the last publish date of this asset tag
411            */
412            @Override
413            public void setLastPublishDate(Date lastPublishDate) {
414                    _assetTag.setLastPublishDate(lastPublishDate);
415            }
416    
417            /**
418            * Sets the modified date of this asset tag.
419            *
420            * @param modifiedDate the modified date of this asset tag
421            */
422            @Override
423            public void setModifiedDate(Date modifiedDate) {
424                    _assetTag.setModifiedDate(modifiedDate);
425            }
426    
427            /**
428            * Sets the name of this asset tag.
429            *
430            * @param name the name of this asset tag
431            */
432            @Override
433            public void setName(java.lang.String name) {
434                    _assetTag.setName(name);
435            }
436    
437            @Override
438            public void setNew(boolean n) {
439                    _assetTag.setNew(n);
440            }
441    
442            /**
443            * Sets the primary key of this asset tag.
444            *
445            * @param primaryKey the primary key of this asset tag
446            */
447            @Override
448            public void setPrimaryKey(long primaryKey) {
449                    _assetTag.setPrimaryKey(primaryKey);
450            }
451    
452            @Override
453            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
454                    _assetTag.setPrimaryKeyObj(primaryKeyObj);
455            }
456    
457            /**
458            * Sets the tag ID of this asset tag.
459            *
460            * @param tagId the tag ID of this asset tag
461            */
462            @Override
463            public void setTagId(long tagId) {
464                    _assetTag.setTagId(tagId);
465            }
466    
467            /**
468            * Sets the user ID of this asset tag.
469            *
470            * @param userId the user ID of this asset tag
471            */
472            @Override
473            public void setUserId(long userId) {
474                    _assetTag.setUserId(userId);
475            }
476    
477            /**
478            * Sets the user name of this asset tag.
479            *
480            * @param userName the user name of this asset tag
481            */
482            @Override
483            public void setUserName(java.lang.String userName) {
484                    _assetTag.setUserName(userName);
485            }
486    
487            /**
488            * Sets the user uuid of this asset tag.
489            *
490            * @param userUuid the user uuid of this asset tag
491            */
492            @Override
493            public void setUserUuid(java.lang.String userUuid) {
494                    _assetTag.setUserUuid(userUuid);
495            }
496    
497            /**
498            * Sets the uuid of this asset tag.
499            *
500            * @param uuid the uuid of this asset tag
501            */
502            @Override
503            public void setUuid(java.lang.String uuid) {
504                    _assetTag.setUuid(uuid);
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 (Objects.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    }