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