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.lar.StagedModelType;
020    import com.liferay.portal.kernel.util.Validator;
021    
022    import java.util.Date;
023    import java.util.HashMap;
024    import java.util.Map;
025    
026    /**
027     * <p>
028     * This class is a wrapper for {@link Website}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see Website
033     * @generated
034     */
035    @ProviderType
036    public class WebsiteWrapper implements Website, ModelWrapper<Website> {
037            public WebsiteWrapper(Website website) {
038                    _website = website;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return Website.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return Website.class.getName();
049            }
050    
051            @Override
052            public Map<String, Object> getModelAttributes() {
053                    Map<String, Object> attributes = new HashMap<String, Object>();
054    
055                    attributes.put("mvccVersion", getMvccVersion());
056                    attributes.put("uuid", getUuid());
057                    attributes.put("websiteId", getWebsiteId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("userId", getUserId());
060                    attributes.put("userName", getUserName());
061                    attributes.put("createDate", getCreateDate());
062                    attributes.put("modifiedDate", getModifiedDate());
063                    attributes.put("classNameId", getClassNameId());
064                    attributes.put("classPK", getClassPK());
065                    attributes.put("url", getUrl());
066                    attributes.put("typeId", getTypeId());
067                    attributes.put("primary", getPrimary());
068    
069                    return attributes;
070            }
071    
072            @Override
073            public void setModelAttributes(Map<String, Object> attributes) {
074                    Long mvccVersion = (Long)attributes.get("mvccVersion");
075    
076                    if (mvccVersion != null) {
077                            setMvccVersion(mvccVersion);
078                    }
079    
080                    String uuid = (String)attributes.get("uuid");
081    
082                    if (uuid != null) {
083                            setUuid(uuid);
084                    }
085    
086                    Long websiteId = (Long)attributes.get("websiteId");
087    
088                    if (websiteId != null) {
089                            setWebsiteId(websiteId);
090                    }
091    
092                    Long companyId = (Long)attributes.get("companyId");
093    
094                    if (companyId != null) {
095                            setCompanyId(companyId);
096                    }
097    
098                    Long userId = (Long)attributes.get("userId");
099    
100                    if (userId != null) {
101                            setUserId(userId);
102                    }
103    
104                    String userName = (String)attributes.get("userName");
105    
106                    if (userName != null) {
107                            setUserName(userName);
108                    }
109    
110                    Date createDate = (Date)attributes.get("createDate");
111    
112                    if (createDate != null) {
113                            setCreateDate(createDate);
114                    }
115    
116                    Date modifiedDate = (Date)attributes.get("modifiedDate");
117    
118                    if (modifiedDate != null) {
119                            setModifiedDate(modifiedDate);
120                    }
121    
122                    Long classNameId = (Long)attributes.get("classNameId");
123    
124                    if (classNameId != null) {
125                            setClassNameId(classNameId);
126                    }
127    
128                    Long classPK = (Long)attributes.get("classPK");
129    
130                    if (classPK != null) {
131                            setClassPK(classPK);
132                    }
133    
134                    String url = (String)attributes.get("url");
135    
136                    if (url != null) {
137                            setUrl(url);
138                    }
139    
140                    Integer typeId = (Integer)attributes.get("typeId");
141    
142                    if (typeId != null) {
143                            setTypeId(typeId);
144                    }
145    
146                    Boolean primary = (Boolean)attributes.get("primary");
147    
148                    if (primary != null) {
149                            setPrimary(primary);
150                    }
151            }
152    
153            @Override
154            public java.lang.Object clone() {
155                    return new WebsiteWrapper((Website)_website.clone());
156            }
157    
158            @Override
159            public int compareTo(com.liferay.portal.model.Website website) {
160                    return _website.compareTo(website);
161            }
162    
163            /**
164            * Returns the fully qualified class name of this website.
165            *
166            * @return the fully qualified class name of this website
167            */
168            @Override
169            public java.lang.String getClassName() {
170                    return _website.getClassName();
171            }
172    
173            /**
174            * Returns the class name ID of this website.
175            *
176            * @return the class name ID of this website
177            */
178            @Override
179            public long getClassNameId() {
180                    return _website.getClassNameId();
181            }
182    
183            /**
184            * Returns the class p k of this website.
185            *
186            * @return the class p k of this website
187            */
188            @Override
189            public long getClassPK() {
190                    return _website.getClassPK();
191            }
192    
193            /**
194            * Returns the company ID of this website.
195            *
196            * @return the company ID of this website
197            */
198            @Override
199            public long getCompanyId() {
200                    return _website.getCompanyId();
201            }
202    
203            /**
204            * Returns the create date of this website.
205            *
206            * @return the create date of this website
207            */
208            @Override
209            public java.util.Date getCreateDate() {
210                    return _website.getCreateDate();
211            }
212    
213            @Override
214            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
215                    return _website.getExpandoBridge();
216            }
217    
218            /**
219            * Returns the modified date of this website.
220            *
221            * @return the modified date of this website
222            */
223            @Override
224            public java.util.Date getModifiedDate() {
225                    return _website.getModifiedDate();
226            }
227    
228            /**
229            * Returns the mvcc version of this website.
230            *
231            * @return the mvcc version of this website
232            */
233            @Override
234            public long getMvccVersion() {
235                    return _website.getMvccVersion();
236            }
237    
238            /**
239            * Returns the primary of this website.
240            *
241            * @return the primary of this website
242            */
243            @Override
244            public boolean getPrimary() {
245                    return _website.getPrimary();
246            }
247    
248            /**
249            * Returns the primary key of this website.
250            *
251            * @return the primary key of this website
252            */
253            @Override
254            public long getPrimaryKey() {
255                    return _website.getPrimaryKey();
256            }
257    
258            @Override
259            public java.io.Serializable getPrimaryKeyObj() {
260                    return _website.getPrimaryKeyObj();
261            }
262    
263            @Override
264            public com.liferay.portal.model.ListType getType()
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    return _website.getType();
267            }
268    
269            /**
270            * Returns the type ID of this website.
271            *
272            * @return the type ID of this website
273            */
274            @Override
275            public int getTypeId() {
276                    return _website.getTypeId();
277            }
278    
279            /**
280            * Returns the url of this website.
281            *
282            * @return the url of this website
283            */
284            @Override
285            public java.lang.String getUrl() {
286                    return _website.getUrl();
287            }
288    
289            /**
290            * Returns the user ID of this website.
291            *
292            * @return the user ID of this website
293            */
294            @Override
295            public long getUserId() {
296                    return _website.getUserId();
297            }
298    
299            /**
300            * Returns the user name of this website.
301            *
302            * @return the user name of this website
303            */
304            @Override
305            public java.lang.String getUserName() {
306                    return _website.getUserName();
307            }
308    
309            /**
310            * Returns the user uuid of this website.
311            *
312            * @return the user uuid of this website
313            */
314            @Override
315            public java.lang.String getUserUuid() {
316                    return _website.getUserUuid();
317            }
318    
319            /**
320            * Returns the uuid of this website.
321            *
322            * @return the uuid of this website
323            */
324            @Override
325            public java.lang.String getUuid() {
326                    return _website.getUuid();
327            }
328    
329            /**
330            * Returns the website ID of this website.
331            *
332            * @return the website ID of this website
333            */
334            @Override
335            public long getWebsiteId() {
336                    return _website.getWebsiteId();
337            }
338    
339            @Override
340            public int hashCode() {
341                    return _website.hashCode();
342            }
343    
344            @Override
345            public boolean isCachedModel() {
346                    return _website.isCachedModel();
347            }
348    
349            @Override
350            public boolean isEscapedModel() {
351                    return _website.isEscapedModel();
352            }
353    
354            @Override
355            public boolean isNew() {
356                    return _website.isNew();
357            }
358    
359            /**
360            * Returns <code>true</code> if this website is primary.
361            *
362            * @return <code>true</code> if this website is primary; <code>false</code> otherwise
363            */
364            @Override
365            public boolean isPrimary() {
366                    return _website.isPrimary();
367            }
368    
369            @Override
370            public void persist() {
371                    _website.persist();
372            }
373    
374            @Override
375            public void setCachedModel(boolean cachedModel) {
376                    _website.setCachedModel(cachedModel);
377            }
378    
379            @Override
380            public void setClassName(java.lang.String className) {
381                    _website.setClassName(className);
382            }
383    
384            /**
385            * Sets the class name ID of this website.
386            *
387            * @param classNameId the class name ID of this website
388            */
389            @Override
390            public void setClassNameId(long classNameId) {
391                    _website.setClassNameId(classNameId);
392            }
393    
394            /**
395            * Sets the class p k of this website.
396            *
397            * @param classPK the class p k of this website
398            */
399            @Override
400            public void setClassPK(long classPK) {
401                    _website.setClassPK(classPK);
402            }
403    
404            /**
405            * Sets the company ID of this website.
406            *
407            * @param companyId the company ID of this website
408            */
409            @Override
410            public void setCompanyId(long companyId) {
411                    _website.setCompanyId(companyId);
412            }
413    
414            /**
415            * Sets the create date of this website.
416            *
417            * @param createDate the create date of this website
418            */
419            @Override
420            public void setCreateDate(java.util.Date createDate) {
421                    _website.setCreateDate(createDate);
422            }
423    
424            @Override
425            public void setExpandoBridgeAttributes(
426                    com.liferay.portal.model.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(java.util.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(int 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 com.liferay.portal.model.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    }