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