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