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