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