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