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