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