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