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    import com.liferay.portal.kernel.util.Validator;
025    
026    import java.io.Serializable;
027    
028    import java.util.Date;
029    import java.util.HashMap;
030    import java.util.Map;
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 java.lang.Object clone() {
168                    return new WebsiteWrapper((Website)_website.clone());
169            }
170    
171            @Override
172            public int compareTo(com.liferay.portal.kernel.model.Website website) {
173                    return _website.compareTo(website);
174            }
175    
176            /**
177            * Returns the fully qualified class name of this website.
178            *
179            * @return the fully qualified class name of this website
180            */
181            @Override
182            public java.lang.String getClassName() {
183                    return _website.getClassName();
184            }
185    
186            /**
187            * Returns the class name ID of this website.
188            *
189            * @return the class name ID of this website
190            */
191            @Override
192            public long getClassNameId() {
193                    return _website.getClassNameId();
194            }
195    
196            /**
197            * Returns the class p k of this website.
198            *
199            * @return the class p k of this website
200            */
201            @Override
202            public long getClassPK() {
203                    return _website.getClassPK();
204            }
205    
206            /**
207            * Returns the company ID of this website.
208            *
209            * @return the company ID of this website
210            */
211            @Override
212            public long getCompanyId() {
213                    return _website.getCompanyId();
214            }
215    
216            /**
217            * Returns the create date of this website.
218            *
219            * @return the create date of this website
220            */
221            @Override
222            public Date getCreateDate() {
223                    return _website.getCreateDate();
224            }
225    
226            @Override
227            public ExpandoBridge getExpandoBridge() {
228                    return _website.getExpandoBridge();
229            }
230    
231            /**
232            * Returns the last publish date of this website.
233            *
234            * @return the last publish date of this website
235            */
236            @Override
237            public Date getLastPublishDate() {
238                    return _website.getLastPublishDate();
239            }
240    
241            /**
242            * Returns the modified date of this website.
243            *
244            * @return the modified date of this website
245            */
246            @Override
247            public Date getModifiedDate() {
248                    return _website.getModifiedDate();
249            }
250    
251            /**
252            * Returns the mvcc version of this website.
253            *
254            * @return the mvcc version of this website
255            */
256            @Override
257            public long getMvccVersion() {
258                    return _website.getMvccVersion();
259            }
260    
261            /**
262            * Returns the primary of this website.
263            *
264            * @return the primary of this website
265            */
266            @Override
267            public boolean getPrimary() {
268                    return _website.getPrimary();
269            }
270    
271            /**
272            * Returns the primary key of this website.
273            *
274            * @return the primary key of this website
275            */
276            @Override
277            public long getPrimaryKey() {
278                    return _website.getPrimaryKey();
279            }
280    
281            @Override
282            public Serializable getPrimaryKeyObj() {
283                    return _website.getPrimaryKeyObj();
284            }
285    
286            @Override
287            public com.liferay.portal.kernel.model.ListType getType()
288                    throws com.liferay.portal.kernel.exception.PortalException {
289                    return _website.getType();
290            }
291    
292            /**
293            * Returns the type ID of this website.
294            *
295            * @return the type ID of this website
296            */
297            @Override
298            public long getTypeId() {
299                    return _website.getTypeId();
300            }
301    
302            /**
303            * Returns the url of this website.
304            *
305            * @return the url of this website
306            */
307            @Override
308            public java.lang.String getUrl() {
309                    return _website.getUrl();
310            }
311    
312            /**
313            * Returns the user ID of this website.
314            *
315            * @return the user ID of this website
316            */
317            @Override
318            public long getUserId() {
319                    return _website.getUserId();
320            }
321    
322            /**
323            * Returns the user name of this website.
324            *
325            * @return the user name of this website
326            */
327            @Override
328            public java.lang.String getUserName() {
329                    return _website.getUserName();
330            }
331    
332            /**
333            * Returns the user uuid of this website.
334            *
335            * @return the user uuid of this website
336            */
337            @Override
338            public java.lang.String getUserUuid() {
339                    return _website.getUserUuid();
340            }
341    
342            /**
343            * Returns the uuid of this website.
344            *
345            * @return the uuid of this website
346            */
347            @Override
348            public java.lang.String getUuid() {
349                    return _website.getUuid();
350            }
351    
352            /**
353            * Returns the website ID of this website.
354            *
355            * @return the website ID of this website
356            */
357            @Override
358            public long getWebsiteId() {
359                    return _website.getWebsiteId();
360            }
361    
362            @Override
363            public int hashCode() {
364                    return _website.hashCode();
365            }
366    
367            @Override
368            public boolean isCachedModel() {
369                    return _website.isCachedModel();
370            }
371    
372            @Override
373            public boolean isEscapedModel() {
374                    return _website.isEscapedModel();
375            }
376    
377            @Override
378            public boolean isNew() {
379                    return _website.isNew();
380            }
381    
382            /**
383            * Returns <code>true</code> if this website is primary.
384            *
385            * @return <code>true</code> if this website is primary; <code>false</code> otherwise
386            */
387            @Override
388            public boolean isPrimary() {
389                    return _website.isPrimary();
390            }
391    
392            @Override
393            public void persist() {
394                    _website.persist();
395            }
396    
397            @Override
398            public void setCachedModel(boolean cachedModel) {
399                    _website.setCachedModel(cachedModel);
400            }
401    
402            @Override
403            public void setClassName(java.lang.String className) {
404                    _website.setClassName(className);
405            }
406    
407            /**
408            * Sets the class name ID of this website.
409            *
410            * @param classNameId the class name ID of this website
411            */
412            @Override
413            public void setClassNameId(long classNameId) {
414                    _website.setClassNameId(classNameId);
415            }
416    
417            /**
418            * Sets the class p k of this website.
419            *
420            * @param classPK the class p k of this website
421            */
422            @Override
423            public void setClassPK(long classPK) {
424                    _website.setClassPK(classPK);
425            }
426    
427            /**
428            * Sets the company ID of this website.
429            *
430            * @param companyId the company ID of this website
431            */
432            @Override
433            public void setCompanyId(long companyId) {
434                    _website.setCompanyId(companyId);
435            }
436    
437            /**
438            * Sets the create date of this website.
439            *
440            * @param createDate the create date of this website
441            */
442            @Override
443            public void setCreateDate(Date createDate) {
444                    _website.setCreateDate(createDate);
445            }
446    
447            @Override
448            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
449                    _website.setExpandoBridgeAttributes(baseModel);
450            }
451    
452            @Override
453            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
454                    _website.setExpandoBridgeAttributes(expandoBridge);
455            }
456    
457            @Override
458            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
459                    _website.setExpandoBridgeAttributes(serviceContext);
460            }
461    
462            /**
463            * Sets the last publish date of this website.
464            *
465            * @param lastPublishDate the last publish date of this website
466            */
467            @Override
468            public void setLastPublishDate(Date lastPublishDate) {
469                    _website.setLastPublishDate(lastPublishDate);
470            }
471    
472            /**
473            * Sets the modified date of this website.
474            *
475            * @param modifiedDate the modified date of this website
476            */
477            @Override
478            public void setModifiedDate(Date modifiedDate) {
479                    _website.setModifiedDate(modifiedDate);
480            }
481    
482            /**
483            * Sets the mvcc version of this website.
484            *
485            * @param mvccVersion the mvcc version of this website
486            */
487            @Override
488            public void setMvccVersion(long mvccVersion) {
489                    _website.setMvccVersion(mvccVersion);
490            }
491    
492            @Override
493            public void setNew(boolean n) {
494                    _website.setNew(n);
495            }
496    
497            /**
498            * Sets whether this website is primary.
499            *
500            * @param primary the primary of this website
501            */
502            @Override
503            public void setPrimary(boolean primary) {
504                    _website.setPrimary(primary);
505            }
506    
507            /**
508            * Sets the primary key of this website.
509            *
510            * @param primaryKey the primary key of this website
511            */
512            @Override
513            public void setPrimaryKey(long primaryKey) {
514                    _website.setPrimaryKey(primaryKey);
515            }
516    
517            @Override
518            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
519                    _website.setPrimaryKeyObj(primaryKeyObj);
520            }
521    
522            /**
523            * Sets the type ID of this website.
524            *
525            * @param typeId the type ID of this website
526            */
527            @Override
528            public void setTypeId(long typeId) {
529                    _website.setTypeId(typeId);
530            }
531    
532            /**
533            * Sets the url of this website.
534            *
535            * @param url the url of this website
536            */
537            @Override
538            public void setUrl(java.lang.String url) {
539                    _website.setUrl(url);
540            }
541    
542            /**
543            * Sets the user ID of this website.
544            *
545            * @param userId the user ID of this website
546            */
547            @Override
548            public void setUserId(long userId) {
549                    _website.setUserId(userId);
550            }
551    
552            /**
553            * Sets the user name of this website.
554            *
555            * @param userName the user name of this website
556            */
557            @Override
558            public void setUserName(java.lang.String userName) {
559                    _website.setUserName(userName);
560            }
561    
562            /**
563            * Sets the user uuid of this website.
564            *
565            * @param userUuid the user uuid of this website
566            */
567            @Override
568            public void setUserUuid(java.lang.String userUuid) {
569                    _website.setUserUuid(userUuid);
570            }
571    
572            /**
573            * Sets the uuid of this website.
574            *
575            * @param uuid the uuid of this website
576            */
577            @Override
578            public void setUuid(java.lang.String uuid) {
579                    _website.setUuid(uuid);
580            }
581    
582            /**
583            * Sets the website ID of this website.
584            *
585            * @param websiteId the website ID of this website
586            */
587            @Override
588            public void setWebsiteId(long websiteId) {
589                    _website.setWebsiteId(websiteId);
590            }
591    
592            @Override
593            public CacheModel<com.liferay.portal.kernel.model.Website> toCacheModel() {
594                    return _website.toCacheModel();
595            }
596    
597            @Override
598            public com.liferay.portal.kernel.model.Website toEscapedModel() {
599                    return new WebsiteWrapper(_website.toEscapedModel());
600            }
601    
602            @Override
603            public java.lang.String toString() {
604                    return _website.toString();
605            }
606    
607            @Override
608            public com.liferay.portal.kernel.model.Website toUnescapedModel() {
609                    return new WebsiteWrapper(_website.toUnescapedModel());
610            }
611    
612            @Override
613            public java.lang.String toXmlString() {
614                    return _website.toXmlString();
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 (Validator.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    }