001    /**
002     * Copyright (c) 2000-present 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.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link AssetTagStats}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see AssetTagStats
032     * @generated
033     */
034    @ProviderType
035    public class AssetTagStatsWrapper implements AssetTagStats,
036            ModelWrapper<AssetTagStats> {
037            public AssetTagStatsWrapper(AssetTagStats assetTagStats) {
038                    _assetTagStats = assetTagStats;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return AssetTagStats.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return AssetTagStats.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("tagStatsId", getTagStatsId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("tagId", getTagId());
058                    attributes.put("classNameId", getClassNameId());
059                    attributes.put("assetCount", getAssetCount());
060    
061                    return attributes;
062            }
063    
064            @Override
065            public void setModelAttributes(Map<String, Object> attributes) {
066                    Long tagStatsId = (Long)attributes.get("tagStatsId");
067    
068                    if (tagStatsId != null) {
069                            setTagStatsId(tagStatsId);
070                    }
071    
072                    Long companyId = (Long)attributes.get("companyId");
073    
074                    if (companyId != null) {
075                            setCompanyId(companyId);
076                    }
077    
078                    Long tagId = (Long)attributes.get("tagId");
079    
080                    if (tagId != null) {
081                            setTagId(tagId);
082                    }
083    
084                    Long classNameId = (Long)attributes.get("classNameId");
085    
086                    if (classNameId != null) {
087                            setClassNameId(classNameId);
088                    }
089    
090                    Integer assetCount = (Integer)attributes.get("assetCount");
091    
092                    if (assetCount != null) {
093                            setAssetCount(assetCount);
094                    }
095            }
096    
097            @Override
098            public java.lang.Object clone() {
099                    return new AssetTagStatsWrapper((AssetTagStats)_assetTagStats.clone());
100            }
101    
102            @Override
103            public int compareTo(
104                    com.liferay.portlet.asset.model.AssetTagStats assetTagStats) {
105                    return _assetTagStats.compareTo(assetTagStats);
106            }
107    
108            /**
109            * Returns the asset count of this asset tag stats.
110            *
111            * @return the asset count of this asset tag stats
112            */
113            @Override
114            public int getAssetCount() {
115                    return _assetTagStats.getAssetCount();
116            }
117    
118            /**
119            * Returns the fully qualified class name of this asset tag stats.
120            *
121            * @return the fully qualified class name of this asset tag stats
122            */
123            @Override
124            public java.lang.String getClassName() {
125                    return _assetTagStats.getClassName();
126            }
127    
128            /**
129            * Returns the class name ID of this asset tag stats.
130            *
131            * @return the class name ID of this asset tag stats
132            */
133            @Override
134            public long getClassNameId() {
135                    return _assetTagStats.getClassNameId();
136            }
137    
138            /**
139            * Returns the company ID of this asset tag stats.
140            *
141            * @return the company ID of this asset tag stats
142            */
143            @Override
144            public long getCompanyId() {
145                    return _assetTagStats.getCompanyId();
146            }
147    
148            @Override
149            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
150                    return _assetTagStats.getExpandoBridge();
151            }
152    
153            /**
154            * Returns the primary key of this asset tag stats.
155            *
156            * @return the primary key of this asset tag stats
157            */
158            @Override
159            public long getPrimaryKey() {
160                    return _assetTagStats.getPrimaryKey();
161            }
162    
163            @Override
164            public java.io.Serializable getPrimaryKeyObj() {
165                    return _assetTagStats.getPrimaryKeyObj();
166            }
167    
168            /**
169            * Returns the tag ID of this asset tag stats.
170            *
171            * @return the tag ID of this asset tag stats
172            */
173            @Override
174            public long getTagId() {
175                    return _assetTagStats.getTagId();
176            }
177    
178            /**
179            * Returns the tag stats ID of this asset tag stats.
180            *
181            * @return the tag stats ID of this asset tag stats
182            */
183            @Override
184            public long getTagStatsId() {
185                    return _assetTagStats.getTagStatsId();
186            }
187    
188            @Override
189            public int hashCode() {
190                    return _assetTagStats.hashCode();
191            }
192    
193            @Override
194            public boolean isCachedModel() {
195                    return _assetTagStats.isCachedModel();
196            }
197    
198            @Override
199            public boolean isEscapedModel() {
200                    return _assetTagStats.isEscapedModel();
201            }
202    
203            @Override
204            public boolean isNew() {
205                    return _assetTagStats.isNew();
206            }
207    
208            @Override
209            public void persist() {
210                    _assetTagStats.persist();
211            }
212    
213            /**
214            * Sets the asset count of this asset tag stats.
215            *
216            * @param assetCount the asset count of this asset tag stats
217            */
218            @Override
219            public void setAssetCount(int assetCount) {
220                    _assetTagStats.setAssetCount(assetCount);
221            }
222    
223            @Override
224            public void setCachedModel(boolean cachedModel) {
225                    _assetTagStats.setCachedModel(cachedModel);
226            }
227    
228            @Override
229            public void setClassName(java.lang.String className) {
230                    _assetTagStats.setClassName(className);
231            }
232    
233            /**
234            * Sets the class name ID of this asset tag stats.
235            *
236            * @param classNameId the class name ID of this asset tag stats
237            */
238            @Override
239            public void setClassNameId(long classNameId) {
240                    _assetTagStats.setClassNameId(classNameId);
241            }
242    
243            /**
244            * Sets the company ID of this asset tag stats.
245            *
246            * @param companyId the company ID of this asset tag stats
247            */
248            @Override
249            public void setCompanyId(long companyId) {
250                    _assetTagStats.setCompanyId(companyId);
251            }
252    
253            @Override
254            public void setExpandoBridgeAttributes(
255                    com.liferay.portal.model.BaseModel<?> baseModel) {
256                    _assetTagStats.setExpandoBridgeAttributes(baseModel);
257            }
258    
259            @Override
260            public void setExpandoBridgeAttributes(
261                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
262                    _assetTagStats.setExpandoBridgeAttributes(expandoBridge);
263            }
264    
265            @Override
266            public void setExpandoBridgeAttributes(
267                    com.liferay.portal.service.ServiceContext serviceContext) {
268                    _assetTagStats.setExpandoBridgeAttributes(serviceContext);
269            }
270    
271            @Override
272            public void setNew(boolean n) {
273                    _assetTagStats.setNew(n);
274            }
275    
276            /**
277            * Sets the primary key of this asset tag stats.
278            *
279            * @param primaryKey the primary key of this asset tag stats
280            */
281            @Override
282            public void setPrimaryKey(long primaryKey) {
283                    _assetTagStats.setPrimaryKey(primaryKey);
284            }
285    
286            @Override
287            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
288                    _assetTagStats.setPrimaryKeyObj(primaryKeyObj);
289            }
290    
291            /**
292            * Sets the tag ID of this asset tag stats.
293            *
294            * @param tagId the tag ID of this asset tag stats
295            */
296            @Override
297            public void setTagId(long tagId) {
298                    _assetTagStats.setTagId(tagId);
299            }
300    
301            /**
302            * Sets the tag stats ID of this asset tag stats.
303            *
304            * @param tagStatsId the tag stats ID of this asset tag stats
305            */
306            @Override
307            public void setTagStatsId(long tagStatsId) {
308                    _assetTagStats.setTagStatsId(tagStatsId);
309            }
310    
311            @Override
312            public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetTagStats> toCacheModel() {
313                    return _assetTagStats.toCacheModel();
314            }
315    
316            @Override
317            public com.liferay.portlet.asset.model.AssetTagStats toEscapedModel() {
318                    return new AssetTagStatsWrapper(_assetTagStats.toEscapedModel());
319            }
320    
321            @Override
322            public java.lang.String toString() {
323                    return _assetTagStats.toString();
324            }
325    
326            @Override
327            public com.liferay.portlet.asset.model.AssetTagStats toUnescapedModel() {
328                    return new AssetTagStatsWrapper(_assetTagStats.toUnescapedModel());
329            }
330    
331            @Override
332            public java.lang.String toXmlString() {
333                    return _assetTagStats.toXmlString();
334            }
335    
336            @Override
337            public boolean equals(Object obj) {
338                    if (this == obj) {
339                            return true;
340                    }
341    
342                    if (!(obj instanceof AssetTagStatsWrapper)) {
343                            return false;
344                    }
345    
346                    AssetTagStatsWrapper assetTagStatsWrapper = (AssetTagStatsWrapper)obj;
347    
348                    if (Validator.equals(_assetTagStats, assetTagStatsWrapper._assetTagStats)) {
349                            return true;
350                    }
351    
352                    return false;
353            }
354    
355            @Override
356            public AssetTagStats getWrappedModel() {
357                    return _assetTagStats;
358            }
359    
360            @Override
361            public boolean isEntityCacheEnabled() {
362                    return _assetTagStats.isEntityCacheEnabled();
363            }
364    
365            @Override
366            public boolean isFinderCacheEnabled() {
367                    return _assetTagStats.isFinderCacheEnabled();
368            }
369    
370            @Override
371            public void resetOriginalValues() {
372                    _assetTagStats.resetOriginalValues();
373            }
374    
375            private final AssetTagStats _assetTagStats;
376    }