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