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