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 getShortName()
326                    throws com.liferay.portal.kernel.exception.PortalException {
327                    return _company.getShortName();
328            }
329    
330            /**
331            * Returns the system of this company.
332            *
333            * @return the system of this company
334            */
335            @Override
336            public boolean getSystem() {
337                    return _company.getSystem();
338            }
339    
340            @Override
341            public java.util.TimeZone getTimeZone()
342                    throws com.liferay.portal.kernel.exception.PortalException {
343                    return _company.getTimeZone();
344            }
345    
346            @Override
347            public java.lang.String getVirtualHostname() {
348                    return _company.getVirtualHostname();
349            }
350    
351            /**
352            * Returns the web ID of this company.
353            *
354            * @return the web ID of this company
355            */
356            @Override
357            public java.lang.String getWebId() {
358                    return _company.getWebId();
359            }
360    
361            @Override
362            public boolean hasCompanyMx(java.lang.String emailAddress) {
363                    return _company.hasCompanyMx(emailAddress);
364            }
365    
366            @Override
367            public int hashCode() {
368                    return _company.hashCode();
369            }
370    
371            /**
372            * Returns <code>true</code> if this company is active.
373            *
374            * @return <code>true</code> if this company is active; <code>false</code> otherwise
375            */
376            @Override
377            public boolean isActive() {
378                    return _company.isActive();
379            }
380    
381            @Override
382            public boolean isAutoLogin() {
383                    return _company.isAutoLogin();
384            }
385    
386            @Override
387            public boolean isCachedModel() {
388                    return _company.isCachedModel();
389            }
390    
391            @Override
392            public boolean isEscapedModel() {
393                    return _company.isEscapedModel();
394            }
395    
396            @Override
397            public boolean isNew() {
398                    return _company.isNew();
399            }
400    
401            @Override
402            public boolean isSendPassword() {
403                    return _company.isSendPassword();
404            }
405    
406            @Override
407            public boolean isSendPasswordResetLink() {
408                    return _company.isSendPasswordResetLink();
409            }
410    
411            @Override
412            public boolean isSiteLogo() {
413                    return _company.isSiteLogo();
414            }
415    
416            @Override
417            public boolean isStrangers() {
418                    return _company.isStrangers();
419            }
420    
421            @Override
422            public boolean isStrangersVerify() {
423                    return _company.isStrangersVerify();
424            }
425    
426            @Override
427            public boolean isStrangersWithMx() {
428                    return _company.isStrangersWithMx();
429            }
430    
431            /**
432            * Returns <code>true</code> if this company is system.
433            *
434            * @return <code>true</code> if this company is system; <code>false</code> otherwise
435            */
436            @Override
437            public boolean isSystem() {
438                    return _company.isSystem();
439            }
440    
441            @Override
442            public void persist() {
443                    _company.persist();
444            }
445    
446            /**
447            * Sets the account ID of this company.
448            *
449            * @param accountId the account ID of this company
450            */
451            @Override
452            public void setAccountId(long accountId) {
453                    _company.setAccountId(accountId);
454            }
455    
456            /**
457            * Sets whether this company is active.
458            *
459            * @param active the active of this company
460            */
461            @Override
462            public void setActive(boolean active) {
463                    _company.setActive(active);
464            }
465    
466            @Override
467            public void setCachedModel(boolean cachedModel) {
468                    _company.setCachedModel(cachedModel);
469            }
470    
471            /**
472            * Sets the company ID of this company.
473            *
474            * @param companyId the company ID of this company
475            */
476            @Override
477            public void setCompanyId(long companyId) {
478                    _company.setCompanyId(companyId);
479            }
480    
481            @Override
482            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
483                    _company.setExpandoBridgeAttributes(baseModel);
484            }
485    
486            @Override
487            public void setExpandoBridgeAttributes(
488                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
489                    _company.setExpandoBridgeAttributes(expandoBridge);
490            }
491    
492            @Override
493            public void setExpandoBridgeAttributes(
494                    com.liferay.portal.service.ServiceContext serviceContext) {
495                    _company.setExpandoBridgeAttributes(serviceContext);
496            }
497    
498            /**
499            * Sets the home u r l of this company.
500            *
501            * @param homeURL the home u r l of this company
502            */
503            @Override
504            public void setHomeURL(java.lang.String homeURL) {
505                    _company.setHomeURL(homeURL);
506            }
507    
508            /**
509            * Sets the key of this company.
510            *
511            * @param key the key of this company
512            */
513            @Override
514            public void setKey(java.lang.String key) {
515                    _company.setKey(key);
516            }
517    
518            @Override
519            public void setKeyObj(java.security.Key keyObj) {
520                    _company.setKeyObj(keyObj);
521            }
522    
523            /**
524            * Sets the logo ID of this company.
525            *
526            * @param logoId the logo ID of this company
527            */
528            @Override
529            public void setLogoId(long logoId) {
530                    _company.setLogoId(logoId);
531            }
532    
533            /**
534            * Sets the max users of this company.
535            *
536            * @param maxUsers the max users of this company
537            */
538            @Override
539            public void setMaxUsers(int maxUsers) {
540                    _company.setMaxUsers(maxUsers);
541            }
542    
543            /**
544            * Sets the mvcc version of this company.
545            *
546            * @param mvccVersion the mvcc version of this company
547            */
548            @Override
549            public void setMvccVersion(long mvccVersion) {
550                    _company.setMvccVersion(mvccVersion);
551            }
552    
553            /**
554            * Sets the mx of this company.
555            *
556            * @param mx the mx of this company
557            */
558            @Override
559            public void setMx(java.lang.String mx) {
560                    _company.setMx(mx);
561            }
562    
563            @Override
564            public void setNew(boolean n) {
565                    _company.setNew(n);
566            }
567    
568            /**
569            * Sets the primary key of this company.
570            *
571            * @param primaryKey the primary key of this company
572            */
573            @Override
574            public void setPrimaryKey(long primaryKey) {
575                    _company.setPrimaryKey(primaryKey);
576            }
577    
578            @Override
579            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
580                    _company.setPrimaryKeyObj(primaryKeyObj);
581            }
582    
583            /**
584            * Sets whether this company is system.
585            *
586            * @param system the system of this company
587            */
588            @Override
589            public void setSystem(boolean system) {
590                    _company.setSystem(system);
591            }
592    
593            @Override
594            public void setVirtualHostname(java.lang.String virtualHostname) {
595                    _company.setVirtualHostname(virtualHostname);
596            }
597    
598            /**
599            * Sets the web ID of this company.
600            *
601            * @param webId the web ID of this company
602            */
603            @Override
604            public void setWebId(java.lang.String webId) {
605                    _company.setWebId(webId);
606            }
607    
608            @Override
609            public CacheModel<com.liferay.portal.model.Company> toCacheModel() {
610                    return _company.toCacheModel();
611            }
612    
613            @Override
614            public com.liferay.portal.model.Company toEscapedModel() {
615                    return new CompanyWrapper(_company.toEscapedModel());
616            }
617    
618            @Override
619            public java.lang.String toString() {
620                    return _company.toString();
621            }
622    
623            @Override
624            public com.liferay.portal.model.Company toUnescapedModel() {
625                    return new CompanyWrapper(_company.toUnescapedModel());
626            }
627    
628            @Override
629            public java.lang.String toXmlString() {
630                    return _company.toXmlString();
631            }
632    
633            @Override
634            public boolean equals(Object obj) {
635                    if (this == obj) {
636                            return true;
637                    }
638    
639                    if (!(obj instanceof CompanyWrapper)) {
640                            return false;
641                    }
642    
643                    CompanyWrapper companyWrapper = (CompanyWrapper)obj;
644    
645                    if (Validator.equals(_company, companyWrapper._company)) {
646                            return true;
647                    }
648    
649                    return false;
650            }
651    
652            @Override
653            public Company getWrappedModel() {
654                    return _company;
655            }
656    
657            @Override
658            public boolean isEntityCacheEnabled() {
659                    return _company.isEntityCacheEnabled();
660            }
661    
662            @Override
663            public boolean isFinderCacheEnabled() {
664                    return _company.isFinderCacheEnabled();
665            }
666    
667            @Override
668            public void resetOriginalValues() {
669                    _company.resetOriginalValues();
670            }
671    
672            private final Company _company;
673    }