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