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