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