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