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(
489                    com.liferay.portal.model.BaseModel<?> baseModel) {
490                    _company.setExpandoBridgeAttributes(baseModel);
491            }
492    
493            @Override
494            public void setExpandoBridgeAttributes(
495                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
496                    _company.setExpandoBridgeAttributes(expandoBridge);
497            }
498    
499            @Override
500            public void setExpandoBridgeAttributes(
501                    com.liferay.portal.service.ServiceContext serviceContext) {
502                    _company.setExpandoBridgeAttributes(serviceContext);
503            }
504    
505            /**
506            * Sets the home u r l of this company.
507            *
508            * @param homeURL the home u r l of this company
509            */
510            @Override
511            public void setHomeURL(java.lang.String homeURL) {
512                    _company.setHomeURL(homeURL);
513            }
514    
515            /**
516            * Sets the key of this company.
517            *
518            * @param key the key of this company
519            */
520            @Override
521            public void setKey(java.lang.String key) {
522                    _company.setKey(key);
523            }
524    
525            @Override
526            public void setKeyObj(java.security.Key keyObj) {
527                    _company.setKeyObj(keyObj);
528            }
529    
530            /**
531            * Sets the logo ID of this company.
532            *
533            * @param logoId the logo ID of this company
534            */
535            @Override
536            public void setLogoId(long logoId) {
537                    _company.setLogoId(logoId);
538            }
539    
540            /**
541            * Sets the max users of this company.
542            *
543            * @param maxUsers the max users of this company
544            */
545            @Override
546            public void setMaxUsers(int maxUsers) {
547                    _company.setMaxUsers(maxUsers);
548            }
549    
550            /**
551            * Sets the mvcc version of this company.
552            *
553            * @param mvccVersion the mvcc version of this company
554            */
555            @Override
556            public void setMvccVersion(long mvccVersion) {
557                    _company.setMvccVersion(mvccVersion);
558            }
559    
560            /**
561            * Sets the mx of this company.
562            *
563            * @param mx the mx of this company
564            */
565            @Override
566            public void setMx(java.lang.String mx) {
567                    _company.setMx(mx);
568            }
569    
570            @Override
571            public void setNew(boolean n) {
572                    _company.setNew(n);
573            }
574    
575            /**
576            * Sets the primary key of this company.
577            *
578            * @param primaryKey the primary key of this company
579            */
580            @Override
581            public void setPrimaryKey(long primaryKey) {
582                    _company.setPrimaryKey(primaryKey);
583            }
584    
585            @Override
586            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
587                    _company.setPrimaryKeyObj(primaryKeyObj);
588            }
589    
590            /**
591            * Sets whether this company is system.
592            *
593            * @param system the system of this company
594            */
595            @Override
596            public void setSystem(boolean system) {
597                    _company.setSystem(system);
598            }
599    
600            @Override
601            public void setVirtualHostname(java.lang.String virtualHostname) {
602                    _company.setVirtualHostname(virtualHostname);
603            }
604    
605            /**
606            * Sets the web ID of this company.
607            *
608            * @param webId the web ID of this company
609            */
610            @Override
611            public void setWebId(java.lang.String webId) {
612                    _company.setWebId(webId);
613            }
614    
615            @Override
616            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Company> toCacheModel() {
617                    return _company.toCacheModel();
618            }
619    
620            @Override
621            public com.liferay.portal.model.Company toEscapedModel() {
622                    return new CompanyWrapper(_company.toEscapedModel());
623            }
624    
625            @Override
626            public java.lang.String toString() {
627                    return _company.toString();
628            }
629    
630            @Override
631            public com.liferay.portal.model.Company toUnescapedModel() {
632                    return new CompanyWrapper(_company.toUnescapedModel());
633            }
634    
635            @Override
636            public java.lang.String toXmlString() {
637                    return _company.toXmlString();
638            }
639    
640            @Override
641            public boolean equals(Object obj) {
642                    if (this == obj) {
643                            return true;
644                    }
645    
646                    if (!(obj instanceof CompanyWrapper)) {
647                            return false;
648                    }
649    
650                    CompanyWrapper companyWrapper = (CompanyWrapper)obj;
651    
652                    if (Validator.equals(_company, companyWrapper._company)) {
653                            return true;
654                    }
655    
656                    return false;
657            }
658    
659            /**
660             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
661             */
662            @Deprecated
663            public Company getWrappedCompany() {
664                    return _company;
665            }
666    
667            @Override
668            public Company getWrappedModel() {
669                    return _company;
670            }
671    
672            @Override
673            public boolean isEntityCacheEnabled() {
674                    return _company.isEntityCacheEnabled();
675            }
676    
677            @Override
678            public boolean isFinderCacheEnabled() {
679                    return _company.isFinderCacheEnabled();
680            }
681    
682            @Override
683            public void resetOriginalValues() {
684                    _company.resetOriginalValues();
685            }
686    
687            private final Company _company;
688    }