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