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