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