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