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