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