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