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.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.Date;
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link Subscription}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see Subscription
032     * @generated
033     */
034    @ProviderType
035    public class SubscriptionWrapper implements Subscription,
036            ModelWrapper<Subscription> {
037            public SubscriptionWrapper(Subscription subscription) {
038                    _subscription = subscription;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return Subscription.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return Subscription.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("mvccVersion", getMvccVersion());
056                    attributes.put("subscriptionId", getSubscriptionId());
057                    attributes.put("companyId", getCompanyId());
058                    attributes.put("userId", getUserId());
059                    attributes.put("userName", getUserName());
060                    attributes.put("createDate", getCreateDate());
061                    attributes.put("modifiedDate", getModifiedDate());
062                    attributes.put("classNameId", getClassNameId());
063                    attributes.put("classPK", getClassPK());
064                    attributes.put("frequency", getFrequency());
065    
066                    return attributes;
067            }
068    
069            @Override
070            public void setModelAttributes(Map<String, Object> attributes) {
071                    Long mvccVersion = (Long)attributes.get("mvccVersion");
072    
073                    if (mvccVersion != null) {
074                            setMvccVersion(mvccVersion);
075                    }
076    
077                    Long subscriptionId = (Long)attributes.get("subscriptionId");
078    
079                    if (subscriptionId != null) {
080                            setSubscriptionId(subscriptionId);
081                    }
082    
083                    Long companyId = (Long)attributes.get("companyId");
084    
085                    if (companyId != null) {
086                            setCompanyId(companyId);
087                    }
088    
089                    Long userId = (Long)attributes.get("userId");
090    
091                    if (userId != null) {
092                            setUserId(userId);
093                    }
094    
095                    String userName = (String)attributes.get("userName");
096    
097                    if (userName != null) {
098                            setUserName(userName);
099                    }
100    
101                    Date createDate = (Date)attributes.get("createDate");
102    
103                    if (createDate != null) {
104                            setCreateDate(createDate);
105                    }
106    
107                    Date modifiedDate = (Date)attributes.get("modifiedDate");
108    
109                    if (modifiedDate != null) {
110                            setModifiedDate(modifiedDate);
111                    }
112    
113                    Long classNameId = (Long)attributes.get("classNameId");
114    
115                    if (classNameId != null) {
116                            setClassNameId(classNameId);
117                    }
118    
119                    Long classPK = (Long)attributes.get("classPK");
120    
121                    if (classPK != null) {
122                            setClassPK(classPK);
123                    }
124    
125                    String frequency = (String)attributes.get("frequency");
126    
127                    if (frequency != null) {
128                            setFrequency(frequency);
129                    }
130            }
131    
132            @Override
133            public java.lang.Object clone() {
134                    return new SubscriptionWrapper((Subscription)_subscription.clone());
135            }
136    
137            @Override
138            public int compareTo(com.liferay.portal.model.Subscription subscription) {
139                    return _subscription.compareTo(subscription);
140            }
141    
142            /**
143            * Returns the fully qualified class name of this subscription.
144            *
145            * @return the fully qualified class name of this subscription
146            */
147            @Override
148            public java.lang.String getClassName() {
149                    return _subscription.getClassName();
150            }
151    
152            /**
153            * Returns the class name ID of this subscription.
154            *
155            * @return the class name ID of this subscription
156            */
157            @Override
158            public long getClassNameId() {
159                    return _subscription.getClassNameId();
160            }
161    
162            /**
163            * Returns the class p k of this subscription.
164            *
165            * @return the class p k of this subscription
166            */
167            @Override
168            public long getClassPK() {
169                    return _subscription.getClassPK();
170            }
171    
172            /**
173            * Returns the company ID of this subscription.
174            *
175            * @return the company ID of this subscription
176            */
177            @Override
178            public long getCompanyId() {
179                    return _subscription.getCompanyId();
180            }
181    
182            /**
183            * Returns the create date of this subscription.
184            *
185            * @return the create date of this subscription
186            */
187            @Override
188            public java.util.Date getCreateDate() {
189                    return _subscription.getCreateDate();
190            }
191    
192            @Override
193            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
194                    return _subscription.getExpandoBridge();
195            }
196    
197            /**
198            * Returns the frequency of this subscription.
199            *
200            * @return the frequency of this subscription
201            */
202            @Override
203            public java.lang.String getFrequency() {
204                    return _subscription.getFrequency();
205            }
206    
207            /**
208            * Returns the modified date of this subscription.
209            *
210            * @return the modified date of this subscription
211            */
212            @Override
213            public java.util.Date getModifiedDate() {
214                    return _subscription.getModifiedDate();
215            }
216    
217            /**
218            * Returns the mvcc version of this subscription.
219            *
220            * @return the mvcc version of this subscription
221            */
222            @Override
223            public long getMvccVersion() {
224                    return _subscription.getMvccVersion();
225            }
226    
227            /**
228            * Returns the primary key of this subscription.
229            *
230            * @return the primary key of this subscription
231            */
232            @Override
233            public long getPrimaryKey() {
234                    return _subscription.getPrimaryKey();
235            }
236    
237            @Override
238            public java.io.Serializable getPrimaryKeyObj() {
239                    return _subscription.getPrimaryKeyObj();
240            }
241    
242            /**
243            * Returns the subscription ID of this subscription.
244            *
245            * @return the subscription ID of this subscription
246            */
247            @Override
248            public long getSubscriptionId() {
249                    return _subscription.getSubscriptionId();
250            }
251    
252            /**
253            * Returns the user ID of this subscription.
254            *
255            * @return the user ID of this subscription
256            */
257            @Override
258            public long getUserId() {
259                    return _subscription.getUserId();
260            }
261    
262            /**
263            * Returns the user name of this subscription.
264            *
265            * @return the user name of this subscription
266            */
267            @Override
268            public java.lang.String getUserName() {
269                    return _subscription.getUserName();
270            }
271    
272            /**
273            * Returns the user uuid of this subscription.
274            *
275            * @return the user uuid of this subscription
276            */
277            @Override
278            public java.lang.String getUserUuid() {
279                    return _subscription.getUserUuid();
280            }
281    
282            @Override
283            public int hashCode() {
284                    return _subscription.hashCode();
285            }
286    
287            @Override
288            public boolean isCachedModel() {
289                    return _subscription.isCachedModel();
290            }
291    
292            @Override
293            public boolean isEscapedModel() {
294                    return _subscription.isEscapedModel();
295            }
296    
297            @Override
298            public boolean isNew() {
299                    return _subscription.isNew();
300            }
301    
302            @Override
303            public void persist() {
304                    _subscription.persist();
305            }
306    
307            @Override
308            public void setCachedModel(boolean cachedModel) {
309                    _subscription.setCachedModel(cachedModel);
310            }
311    
312            @Override
313            public void setClassName(java.lang.String className) {
314                    _subscription.setClassName(className);
315            }
316    
317            /**
318            * Sets the class name ID of this subscription.
319            *
320            * @param classNameId the class name ID of this subscription
321            */
322            @Override
323            public void setClassNameId(long classNameId) {
324                    _subscription.setClassNameId(classNameId);
325            }
326    
327            /**
328            * Sets the class p k of this subscription.
329            *
330            * @param classPK the class p k of this subscription
331            */
332            @Override
333            public void setClassPK(long classPK) {
334                    _subscription.setClassPK(classPK);
335            }
336    
337            /**
338            * Sets the company ID of this subscription.
339            *
340            * @param companyId the company ID of this subscription
341            */
342            @Override
343            public void setCompanyId(long companyId) {
344                    _subscription.setCompanyId(companyId);
345            }
346    
347            /**
348            * Sets the create date of this subscription.
349            *
350            * @param createDate the create date of this subscription
351            */
352            @Override
353            public void setCreateDate(java.util.Date createDate) {
354                    _subscription.setCreateDate(createDate);
355            }
356    
357            @Override
358            public void setExpandoBridgeAttributes(
359                    com.liferay.portal.model.BaseModel<?> baseModel) {
360                    _subscription.setExpandoBridgeAttributes(baseModel);
361            }
362    
363            @Override
364            public void setExpandoBridgeAttributes(
365                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
366                    _subscription.setExpandoBridgeAttributes(expandoBridge);
367            }
368    
369            @Override
370            public void setExpandoBridgeAttributes(
371                    com.liferay.portal.service.ServiceContext serviceContext) {
372                    _subscription.setExpandoBridgeAttributes(serviceContext);
373            }
374    
375            /**
376            * Sets the frequency of this subscription.
377            *
378            * @param frequency the frequency of this subscription
379            */
380            @Override
381            public void setFrequency(java.lang.String frequency) {
382                    _subscription.setFrequency(frequency);
383            }
384    
385            /**
386            * Sets the modified date of this subscription.
387            *
388            * @param modifiedDate the modified date of this subscription
389            */
390            @Override
391            public void setModifiedDate(java.util.Date modifiedDate) {
392                    _subscription.setModifiedDate(modifiedDate);
393            }
394    
395            /**
396            * Sets the mvcc version of this subscription.
397            *
398            * @param mvccVersion the mvcc version of this subscription
399            */
400            @Override
401            public void setMvccVersion(long mvccVersion) {
402                    _subscription.setMvccVersion(mvccVersion);
403            }
404    
405            @Override
406            public void setNew(boolean n) {
407                    _subscription.setNew(n);
408            }
409    
410            /**
411            * Sets the primary key of this subscription.
412            *
413            * @param primaryKey the primary key of this subscription
414            */
415            @Override
416            public void setPrimaryKey(long primaryKey) {
417                    _subscription.setPrimaryKey(primaryKey);
418            }
419    
420            @Override
421            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
422                    _subscription.setPrimaryKeyObj(primaryKeyObj);
423            }
424    
425            /**
426            * Sets the subscription ID of this subscription.
427            *
428            * @param subscriptionId the subscription ID of this subscription
429            */
430            @Override
431            public void setSubscriptionId(long subscriptionId) {
432                    _subscription.setSubscriptionId(subscriptionId);
433            }
434    
435            /**
436            * Sets the user ID of this subscription.
437            *
438            * @param userId the user ID of this subscription
439            */
440            @Override
441            public void setUserId(long userId) {
442                    _subscription.setUserId(userId);
443            }
444    
445            /**
446            * Sets the user name of this subscription.
447            *
448            * @param userName the user name of this subscription
449            */
450            @Override
451            public void setUserName(java.lang.String userName) {
452                    _subscription.setUserName(userName);
453            }
454    
455            /**
456            * Sets the user uuid of this subscription.
457            *
458            * @param userUuid the user uuid of this subscription
459            */
460            @Override
461            public void setUserUuid(java.lang.String userUuid) {
462                    _subscription.setUserUuid(userUuid);
463            }
464    
465            @Override
466            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Subscription> toCacheModel() {
467                    return _subscription.toCacheModel();
468            }
469    
470            @Override
471            public com.liferay.portal.model.Subscription toEscapedModel() {
472                    return new SubscriptionWrapper(_subscription.toEscapedModel());
473            }
474    
475            @Override
476            public java.lang.String toString() {
477                    return _subscription.toString();
478            }
479    
480            @Override
481            public com.liferay.portal.model.Subscription toUnescapedModel() {
482                    return new SubscriptionWrapper(_subscription.toUnescapedModel());
483            }
484    
485            @Override
486            public java.lang.String toXmlString() {
487                    return _subscription.toXmlString();
488            }
489    
490            @Override
491            public boolean equals(Object obj) {
492                    if (this == obj) {
493                            return true;
494                    }
495    
496                    if (!(obj instanceof SubscriptionWrapper)) {
497                            return false;
498                    }
499    
500                    SubscriptionWrapper subscriptionWrapper = (SubscriptionWrapper)obj;
501    
502                    if (Validator.equals(_subscription, subscriptionWrapper._subscription)) {
503                            return true;
504                    }
505    
506                    return false;
507            }
508    
509            /**
510             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
511             */
512            @Deprecated
513            public Subscription getWrappedSubscription() {
514                    return _subscription;
515            }
516    
517            @Override
518            public Subscription getWrappedModel() {
519                    return _subscription;
520            }
521    
522            @Override
523            public boolean isEntityCacheEnabled() {
524                    return _subscription.isEntityCacheEnabled();
525            }
526    
527            @Override
528            public boolean isFinderCacheEnabled() {
529                    return _subscription.isFinderCacheEnabled();
530            }
531    
532            @Override
533            public void resetOriginalValues() {
534                    _subscription.resetOriginalValues();
535            }
536    
537            private final Subscription _subscription;
538    }