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