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