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