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