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