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