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