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