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    import com.liferay.portal.kernel.util.Validator;
023    
024    import java.io.Serializable;
025    
026    import java.util.HashMap;
027    import java.util.Map;
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 java.lang.Object clone() {
144                    return new CompanyWrapper((Company)_company.clone());
145            }
146    
147            @Override
148            public int compareTo(com.liferay.portal.kernel.model.Company company) {
149                    return _company.compareTo(company);
150            }
151    
152            @Override
153            public com.liferay.portal.kernel.model.Account getAccount()
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    return _company.getAccount();
156            }
157    
158            /**
159            * Returns the account ID of this company.
160            *
161            * @return the account ID of this company
162            */
163            @Override
164            public long getAccountId() {
165                    return _company.getAccountId();
166            }
167    
168            /**
169            * Returns the active of this company.
170            *
171            * @return the active of this company
172            */
173            @Override
174            public boolean getActive() {
175                    return _company.getActive();
176            }
177    
178            @Override
179            public java.lang.String getAdminName() {
180                    return _company.getAdminName();
181            }
182    
183            @Override
184            public java.lang.String getAuthType() {
185                    return _company.getAuthType();
186            }
187    
188            /**
189            * Returns the company ID of this company.
190            *
191            * @return the company ID of this company
192            */
193            @Override
194            public long getCompanyId() {
195                    return _company.getCompanyId();
196            }
197    
198            @Override
199            public com.liferay.portal.kernel.model.User getDefaultUser()
200                    throws com.liferay.portal.kernel.exception.PortalException {
201                    return _company.getDefaultUser();
202            }
203    
204            @Override
205            public java.lang.String getDefaultWebId() {
206                    return _company.getDefaultWebId();
207            }
208    
209            @Override
210            public java.lang.String getEmailAddress() {
211                    return _company.getEmailAddress();
212            }
213    
214            @Override
215            public ExpandoBridge getExpandoBridge() {
216                    return _company.getExpandoBridge();
217            }
218    
219            @Override
220            public com.liferay.portal.kernel.model.Group getGroup()
221                    throws com.liferay.portal.kernel.exception.PortalException {
222                    return _company.getGroup();
223            }
224    
225            @Override
226            public long getGroupId()
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return _company.getGroupId();
229            }
230    
231            /**
232            * Returns the home u r l of this company.
233            *
234            * @return the home u r l of this company
235            */
236            @Override
237            public java.lang.String getHomeURL() {
238                    return _company.getHomeURL();
239            }
240    
241            /**
242            * Returns the key of this company.
243            *
244            * @return the key of this company
245            */
246            @Override
247            public java.lang.String getKey() {
248                    return _company.getKey();
249            }
250    
251            @Override
252            public java.security.Key getKeyObj() {
253                    return _company.getKeyObj();
254            }
255    
256            @Override
257            public java.util.Locale getLocale()
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    return _company.getLocale();
260            }
261    
262            /**
263            * Returns the logo ID of this company.
264            *
265            * @return the logo ID of this company
266            */
267            @Override
268            public long getLogoId() {
269                    return _company.getLogoId();
270            }
271    
272            /**
273            * Returns the max users of this company.
274            *
275            * @return the max users of this company
276            */
277            @Override
278            public int getMaxUsers() {
279                    return _company.getMaxUsers();
280            }
281    
282            /**
283            * Returns the mvcc version of this company.
284            *
285            * @return the mvcc version of this company
286            */
287            @Override
288            public long getMvccVersion() {
289                    return _company.getMvccVersion();
290            }
291    
292            /**
293            * Returns the mx of this company.
294            *
295            * @return the mx of this company
296            */
297            @Override
298            public java.lang.String getMx() {
299                    return _company.getMx();
300            }
301    
302            @Override
303            public java.lang.String getName()
304                    throws com.liferay.portal.kernel.exception.PortalException {
305                    return _company.getName();
306            }
307    
308            @Override
309            public java.lang.String getPortalURL(long groupId)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    return _company.getPortalURL(groupId);
312            }
313    
314            /**
315            * Returns the primary key of this company.
316            *
317            * @return the primary key of this company
318            */
319            @Override
320            public long getPrimaryKey() {
321                    return _company.getPrimaryKey();
322            }
323    
324            @Override
325            public Serializable getPrimaryKeyObj() {
326                    return _company.getPrimaryKeyObj();
327            }
328    
329            @Override
330            public java.lang.String getShortName()
331                    throws com.liferay.portal.kernel.exception.PortalException {
332                    return _company.getShortName();
333            }
334    
335            /**
336            * Returns the system of this company.
337            *
338            * @return the system of this company
339            */
340            @Override
341            public boolean getSystem() {
342                    return _company.getSystem();
343            }
344    
345            @Override
346            public java.util.TimeZone getTimeZone()
347                    throws com.liferay.portal.kernel.exception.PortalException {
348                    return _company.getTimeZone();
349            }
350    
351            @Override
352            public java.lang.String getVirtualHostname() {
353                    return _company.getVirtualHostname();
354            }
355    
356            /**
357            * Returns the web ID of this company.
358            *
359            * @return the web ID of this company
360            */
361            @Override
362            public java.lang.String getWebId() {
363                    return _company.getWebId();
364            }
365    
366            @Override
367            public boolean hasCompanyMx(java.lang.String emailAddress) {
368                    return _company.hasCompanyMx(emailAddress);
369            }
370    
371            @Override
372            public int hashCode() {
373                    return _company.hashCode();
374            }
375    
376            /**
377            * Returns <code>true</code> if this company is active.
378            *
379            * @return <code>true</code> if this company is active; <code>false</code> otherwise
380            */
381            @Override
382            public boolean isActive() {
383                    return _company.isActive();
384            }
385    
386            @Override
387            public boolean isAutoLogin() {
388                    return _company.isAutoLogin();
389            }
390    
391            @Override
392            public boolean isCachedModel() {
393                    return _company.isCachedModel();
394            }
395    
396            @Override
397            public boolean isEscapedModel() {
398                    return _company.isEscapedModel();
399            }
400    
401            @Override
402            public boolean isNew() {
403                    return _company.isNew();
404            }
405    
406            @Override
407            public boolean isSendPassword() {
408                    return _company.isSendPassword();
409            }
410    
411            @Override
412            public boolean isSendPasswordResetLink() {
413                    return _company.isSendPasswordResetLink();
414            }
415    
416            @Override
417            public boolean isSiteLogo() {
418                    return _company.isSiteLogo();
419            }
420    
421            @Override
422            public boolean isStrangers() {
423                    return _company.isStrangers();
424            }
425    
426            @Override
427            public boolean isStrangersVerify() {
428                    return _company.isStrangersVerify();
429            }
430    
431            @Override
432            public boolean isStrangersWithMx() {
433                    return _company.isStrangersWithMx();
434            }
435    
436            /**
437            * Returns <code>true</code> if this company is system.
438            *
439            * @return <code>true</code> if this company is system; <code>false</code> otherwise
440            */
441            @Override
442            public boolean isSystem() {
443                    return _company.isSystem();
444            }
445    
446            @Override
447            public void persist() {
448                    _company.persist();
449            }
450    
451            /**
452            * Sets the account ID of this company.
453            *
454            * @param accountId the account ID of this company
455            */
456            @Override
457            public void setAccountId(long accountId) {
458                    _company.setAccountId(accountId);
459            }
460    
461            /**
462            * Sets whether this company is active.
463            *
464            * @param active the active of this company
465            */
466            @Override
467            public void setActive(boolean active) {
468                    _company.setActive(active);
469            }
470    
471            @Override
472            public void setCachedModel(boolean cachedModel) {
473                    _company.setCachedModel(cachedModel);
474            }
475    
476            /**
477            * Sets the company ID of this company.
478            *
479            * @param companyId the company ID of this company
480            */
481            @Override
482            public void setCompanyId(long companyId) {
483                    _company.setCompanyId(companyId);
484            }
485    
486            @Override
487            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
488                    _company.setExpandoBridgeAttributes(baseModel);
489            }
490    
491            @Override
492            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
493                    _company.setExpandoBridgeAttributes(expandoBridge);
494            }
495    
496            @Override
497            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
498                    _company.setExpandoBridgeAttributes(serviceContext);
499            }
500    
501            /**
502            * Sets the home u r l of this company.
503            *
504            * @param homeURL the home u r l of this company
505            */
506            @Override
507            public void setHomeURL(java.lang.String homeURL) {
508                    _company.setHomeURL(homeURL);
509            }
510    
511            /**
512            * Sets the key of this company.
513            *
514            * @param key the key of this company
515            */
516            @Override
517            public void setKey(java.lang.String key) {
518                    _company.setKey(key);
519            }
520    
521            @Override
522            public void setKeyObj(java.security.Key keyObj) {
523                    _company.setKeyObj(keyObj);
524            }
525    
526            /**
527            * Sets the logo ID of this company.
528            *
529            * @param logoId the logo ID of this company
530            */
531            @Override
532            public void setLogoId(long logoId) {
533                    _company.setLogoId(logoId);
534            }
535    
536            /**
537            * Sets the max users of this company.
538            *
539            * @param maxUsers the max users of this company
540            */
541            @Override
542            public void setMaxUsers(int maxUsers) {
543                    _company.setMaxUsers(maxUsers);
544            }
545    
546            /**
547            * Sets the mvcc version of this company.
548            *
549            * @param mvccVersion the mvcc version of this company
550            */
551            @Override
552            public void setMvccVersion(long mvccVersion) {
553                    _company.setMvccVersion(mvccVersion);
554            }
555    
556            /**
557            * Sets the mx of this company.
558            *
559            * @param mx the mx of this company
560            */
561            @Override
562            public void setMx(java.lang.String mx) {
563                    _company.setMx(mx);
564            }
565    
566            @Override
567            public void setNew(boolean n) {
568                    _company.setNew(n);
569            }
570    
571            /**
572            * Sets the primary key of this company.
573            *
574            * @param primaryKey the primary key of this company
575            */
576            @Override
577            public void setPrimaryKey(long primaryKey) {
578                    _company.setPrimaryKey(primaryKey);
579            }
580    
581            @Override
582            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
583                    _company.setPrimaryKeyObj(primaryKeyObj);
584            }
585    
586            /**
587            * Sets whether this company is system.
588            *
589            * @param system the system of this company
590            */
591            @Override
592            public void setSystem(boolean system) {
593                    _company.setSystem(system);
594            }
595    
596            @Override
597            public void setVirtualHostname(java.lang.String virtualHostname) {
598                    _company.setVirtualHostname(virtualHostname);
599            }
600    
601            /**
602            * Sets the web ID of this company.
603            *
604            * @param webId the web ID of this company
605            */
606            @Override
607            public void setWebId(java.lang.String webId) {
608                    _company.setWebId(webId);
609            }
610    
611            @Override
612            public CacheModel<com.liferay.portal.kernel.model.Company> toCacheModel() {
613                    return _company.toCacheModel();
614            }
615    
616            @Override
617            public com.liferay.portal.kernel.model.Company toEscapedModel() {
618                    return new CompanyWrapper(_company.toEscapedModel());
619            }
620    
621            @Override
622            public java.lang.String toString() {
623                    return _company.toString();
624            }
625    
626            @Override
627            public com.liferay.portal.kernel.model.Company toUnescapedModel() {
628                    return new CompanyWrapper(_company.toUnescapedModel());
629            }
630    
631            @Override
632            public java.lang.String toXmlString() {
633                    return _company.toXmlString();
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 (Validator.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    }