001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.Date;
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link Account}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see Account
032     * @generated
033     */
034    @ProviderType
035    public class AccountWrapper implements Account, ModelWrapper<Account> {
036            public AccountWrapper(Account account) {
037                    _account = account;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return Account.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return Account.class.getName();
048            }
049    
050            @Override
051            public Map<String, Object> getModelAttributes() {
052                    Map<String, Object> attributes = new HashMap<String, Object>();
053    
054                    attributes.put("mvccVersion", getMvccVersion());
055                    attributes.put("accountId", getAccountId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("userId", getUserId());
058                    attributes.put("userName", getUserName());
059                    attributes.put("createDate", getCreateDate());
060                    attributes.put("modifiedDate", getModifiedDate());
061                    attributes.put("parentAccountId", getParentAccountId());
062                    attributes.put("name", getName());
063                    attributes.put("legalName", getLegalName());
064                    attributes.put("legalId", getLegalId());
065                    attributes.put("legalType", getLegalType());
066                    attributes.put("sicCode", getSicCode());
067                    attributes.put("tickerSymbol", getTickerSymbol());
068                    attributes.put("industry", getIndustry());
069                    attributes.put("type", getType());
070                    attributes.put("size", getSize());
071    
072                    return attributes;
073            }
074    
075            @Override
076            public void setModelAttributes(Map<String, Object> attributes) {
077                    Long mvccVersion = (Long)attributes.get("mvccVersion");
078    
079                    if (mvccVersion != null) {
080                            setMvccVersion(mvccVersion);
081                    }
082    
083                    Long accountId = (Long)attributes.get("accountId");
084    
085                    if (accountId != null) {
086                            setAccountId(accountId);
087                    }
088    
089                    Long companyId = (Long)attributes.get("companyId");
090    
091                    if (companyId != null) {
092                            setCompanyId(companyId);
093                    }
094    
095                    Long userId = (Long)attributes.get("userId");
096    
097                    if (userId != null) {
098                            setUserId(userId);
099                    }
100    
101                    String userName = (String)attributes.get("userName");
102    
103                    if (userName != null) {
104                            setUserName(userName);
105                    }
106    
107                    Date createDate = (Date)attributes.get("createDate");
108    
109                    if (createDate != null) {
110                            setCreateDate(createDate);
111                    }
112    
113                    Date modifiedDate = (Date)attributes.get("modifiedDate");
114    
115                    if (modifiedDate != null) {
116                            setModifiedDate(modifiedDate);
117                    }
118    
119                    Long parentAccountId = (Long)attributes.get("parentAccountId");
120    
121                    if (parentAccountId != null) {
122                            setParentAccountId(parentAccountId);
123                    }
124    
125                    String name = (String)attributes.get("name");
126    
127                    if (name != null) {
128                            setName(name);
129                    }
130    
131                    String legalName = (String)attributes.get("legalName");
132    
133                    if (legalName != null) {
134                            setLegalName(legalName);
135                    }
136    
137                    String legalId = (String)attributes.get("legalId");
138    
139                    if (legalId != null) {
140                            setLegalId(legalId);
141                    }
142    
143                    String legalType = (String)attributes.get("legalType");
144    
145                    if (legalType != null) {
146                            setLegalType(legalType);
147                    }
148    
149                    String sicCode = (String)attributes.get("sicCode");
150    
151                    if (sicCode != null) {
152                            setSicCode(sicCode);
153                    }
154    
155                    String tickerSymbol = (String)attributes.get("tickerSymbol");
156    
157                    if (tickerSymbol != null) {
158                            setTickerSymbol(tickerSymbol);
159                    }
160    
161                    String industry = (String)attributes.get("industry");
162    
163                    if (industry != null) {
164                            setIndustry(industry);
165                    }
166    
167                    String type = (String)attributes.get("type");
168    
169                    if (type != null) {
170                            setType(type);
171                    }
172    
173                    String size = (String)attributes.get("size");
174    
175                    if (size != null) {
176                            setSize(size);
177                    }
178            }
179    
180            @Override
181            public java.lang.Object clone() {
182                    return new AccountWrapper((Account)_account.clone());
183            }
184    
185            @Override
186            public int compareTo(com.liferay.portal.model.Account account) {
187                    return _account.compareTo(account);
188            }
189    
190            /**
191            * Returns the account ID of this account.
192            *
193            * @return the account ID of this account
194            */
195            @Override
196            public long getAccountId() {
197                    return _account.getAccountId();
198            }
199    
200            /**
201            * Returns the company ID of this account.
202            *
203            * @return the company ID of this account
204            */
205            @Override
206            public long getCompanyId() {
207                    return _account.getCompanyId();
208            }
209    
210            /**
211            * Returns the create date of this account.
212            *
213            * @return the create date of this account
214            */
215            @Override
216            public Date getCreateDate() {
217                    return _account.getCreateDate();
218            }
219    
220            @Override
221            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
222                    return _account.getExpandoBridge();
223            }
224    
225            /**
226            * Returns the industry of this account.
227            *
228            * @return the industry of this account
229            */
230            @Override
231            public java.lang.String getIndustry() {
232                    return _account.getIndustry();
233            }
234    
235            /**
236            * Returns the legal ID of this account.
237            *
238            * @return the legal ID of this account
239            */
240            @Override
241            public java.lang.String getLegalId() {
242                    return _account.getLegalId();
243            }
244    
245            /**
246            * Returns the legal name of this account.
247            *
248            * @return the legal name of this account
249            */
250            @Override
251            public java.lang.String getLegalName() {
252                    return _account.getLegalName();
253            }
254    
255            /**
256            * Returns the legal type of this account.
257            *
258            * @return the legal type of this account
259            */
260            @Override
261            public java.lang.String getLegalType() {
262                    return _account.getLegalType();
263            }
264    
265            /**
266            * Returns the modified date of this account.
267            *
268            * @return the modified date of this account
269            */
270            @Override
271            public Date getModifiedDate() {
272                    return _account.getModifiedDate();
273            }
274    
275            /**
276            * Returns the mvcc version of this account.
277            *
278            * @return the mvcc version of this account
279            */
280            @Override
281            public long getMvccVersion() {
282                    return _account.getMvccVersion();
283            }
284    
285            /**
286            * Returns the name of this account.
287            *
288            * @return the name of this account
289            */
290            @Override
291            public java.lang.String getName() {
292                    return _account.getName();
293            }
294    
295            /**
296            * Returns the parent account ID of this account.
297            *
298            * @return the parent account ID of this account
299            */
300            @Override
301            public long getParentAccountId() {
302                    return _account.getParentAccountId();
303            }
304    
305            /**
306            * Returns the primary key of this account.
307            *
308            * @return the primary key of this account
309            */
310            @Override
311            public long getPrimaryKey() {
312                    return _account.getPrimaryKey();
313            }
314    
315            @Override
316            public java.io.Serializable getPrimaryKeyObj() {
317                    return _account.getPrimaryKeyObj();
318            }
319    
320            /**
321            * Returns the sic code of this account.
322            *
323            * @return the sic code of this account
324            */
325            @Override
326            public java.lang.String getSicCode() {
327                    return _account.getSicCode();
328            }
329    
330            /**
331            * Returns the size of this account.
332            *
333            * @return the size of this account
334            */
335            @Override
336            public java.lang.String getSize() {
337                    return _account.getSize();
338            }
339    
340            /**
341            * Returns the ticker symbol of this account.
342            *
343            * @return the ticker symbol of this account
344            */
345            @Override
346            public java.lang.String getTickerSymbol() {
347                    return _account.getTickerSymbol();
348            }
349    
350            /**
351            * Returns the type of this account.
352            *
353            * @return the type of this account
354            */
355            @Override
356            public java.lang.String getType() {
357                    return _account.getType();
358            }
359    
360            /**
361            * Returns the user ID of this account.
362            *
363            * @return the user ID of this account
364            */
365            @Override
366            public long getUserId() {
367                    return _account.getUserId();
368            }
369    
370            /**
371            * Returns the user name of this account.
372            *
373            * @return the user name of this account
374            */
375            @Override
376            public java.lang.String getUserName() {
377                    return _account.getUserName();
378            }
379    
380            /**
381            * Returns the user uuid of this account.
382            *
383            * @return the user uuid of this account
384            */
385            @Override
386            public java.lang.String getUserUuid() {
387                    return _account.getUserUuid();
388            }
389    
390            @Override
391            public int hashCode() {
392                    return _account.hashCode();
393            }
394    
395            @Override
396            public boolean isCachedModel() {
397                    return _account.isCachedModel();
398            }
399    
400            @Override
401            public boolean isEscapedModel() {
402                    return _account.isEscapedModel();
403            }
404    
405            @Override
406            public boolean isNew() {
407                    return _account.isNew();
408            }
409    
410            @Override
411            public void persist() {
412                    _account.persist();
413            }
414    
415            /**
416            * Sets the account ID of this account.
417            *
418            * @param accountId the account ID of this account
419            */
420            @Override
421            public void setAccountId(long accountId) {
422                    _account.setAccountId(accountId);
423            }
424    
425            @Override
426            public void setCachedModel(boolean cachedModel) {
427                    _account.setCachedModel(cachedModel);
428            }
429    
430            /**
431            * Sets the company ID of this account.
432            *
433            * @param companyId the company ID of this account
434            */
435            @Override
436            public void setCompanyId(long companyId) {
437                    _account.setCompanyId(companyId);
438            }
439    
440            /**
441            * Sets the create date of this account.
442            *
443            * @param createDate the create date of this account
444            */
445            @Override
446            public void setCreateDate(Date createDate) {
447                    _account.setCreateDate(createDate);
448            }
449    
450            @Override
451            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
452                    _account.setExpandoBridgeAttributes(baseModel);
453            }
454    
455            @Override
456            public void setExpandoBridgeAttributes(
457                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
458                    _account.setExpandoBridgeAttributes(expandoBridge);
459            }
460    
461            @Override
462            public void setExpandoBridgeAttributes(
463                    com.liferay.portal.service.ServiceContext serviceContext) {
464                    _account.setExpandoBridgeAttributes(serviceContext);
465            }
466    
467            /**
468            * Sets the industry of this account.
469            *
470            * @param industry the industry of this account
471            */
472            @Override
473            public void setIndustry(java.lang.String industry) {
474                    _account.setIndustry(industry);
475            }
476    
477            /**
478            * Sets the legal ID of this account.
479            *
480            * @param legalId the legal ID of this account
481            */
482            @Override
483            public void setLegalId(java.lang.String legalId) {
484                    _account.setLegalId(legalId);
485            }
486    
487            /**
488            * Sets the legal name of this account.
489            *
490            * @param legalName the legal name of this account
491            */
492            @Override
493            public void setLegalName(java.lang.String legalName) {
494                    _account.setLegalName(legalName);
495            }
496    
497            /**
498            * Sets the legal type of this account.
499            *
500            * @param legalType the legal type of this account
501            */
502            @Override
503            public void setLegalType(java.lang.String legalType) {
504                    _account.setLegalType(legalType);
505            }
506    
507            /**
508            * Sets the modified date of this account.
509            *
510            * @param modifiedDate the modified date of this account
511            */
512            @Override
513            public void setModifiedDate(Date modifiedDate) {
514                    _account.setModifiedDate(modifiedDate);
515            }
516    
517            /**
518            * Sets the mvcc version of this account.
519            *
520            * @param mvccVersion the mvcc version of this account
521            */
522            @Override
523            public void setMvccVersion(long mvccVersion) {
524                    _account.setMvccVersion(mvccVersion);
525            }
526    
527            /**
528            * Sets the name of this account.
529            *
530            * @param name the name of this account
531            */
532            @Override
533            public void setName(java.lang.String name) {
534                    _account.setName(name);
535            }
536    
537            @Override
538            public void setNew(boolean n) {
539                    _account.setNew(n);
540            }
541    
542            /**
543            * Sets the parent account ID of this account.
544            *
545            * @param parentAccountId the parent account ID of this account
546            */
547            @Override
548            public void setParentAccountId(long parentAccountId) {
549                    _account.setParentAccountId(parentAccountId);
550            }
551    
552            /**
553            * Sets the primary key of this account.
554            *
555            * @param primaryKey the primary key of this account
556            */
557            @Override
558            public void setPrimaryKey(long primaryKey) {
559                    _account.setPrimaryKey(primaryKey);
560            }
561    
562            @Override
563            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
564                    _account.setPrimaryKeyObj(primaryKeyObj);
565            }
566    
567            /**
568            * Sets the sic code of this account.
569            *
570            * @param sicCode the sic code of this account
571            */
572            @Override
573            public void setSicCode(java.lang.String sicCode) {
574                    _account.setSicCode(sicCode);
575            }
576    
577            /**
578            * Sets the size of this account.
579            *
580            * @param size the size of this account
581            */
582            @Override
583            public void setSize(java.lang.String size) {
584                    _account.setSize(size);
585            }
586    
587            /**
588            * Sets the ticker symbol of this account.
589            *
590            * @param tickerSymbol the ticker symbol of this account
591            */
592            @Override
593            public void setTickerSymbol(java.lang.String tickerSymbol) {
594                    _account.setTickerSymbol(tickerSymbol);
595            }
596    
597            /**
598            * Sets the type of this account.
599            *
600            * @param type the type of this account
601            */
602            @Override
603            public void setType(java.lang.String type) {
604                    _account.setType(type);
605            }
606    
607            /**
608            * Sets the user ID of this account.
609            *
610            * @param userId the user ID of this account
611            */
612            @Override
613            public void setUserId(long userId) {
614                    _account.setUserId(userId);
615            }
616    
617            /**
618            * Sets the user name of this account.
619            *
620            * @param userName the user name of this account
621            */
622            @Override
623            public void setUserName(java.lang.String userName) {
624                    _account.setUserName(userName);
625            }
626    
627            /**
628            * Sets the user uuid of this account.
629            *
630            * @param userUuid the user uuid of this account
631            */
632            @Override
633            public void setUserUuid(java.lang.String userUuid) {
634                    _account.setUserUuid(userUuid);
635            }
636    
637            @Override
638            public CacheModel<com.liferay.portal.model.Account> toCacheModel() {
639                    return _account.toCacheModel();
640            }
641    
642            @Override
643            public com.liferay.portal.model.Account toEscapedModel() {
644                    return new AccountWrapper(_account.toEscapedModel());
645            }
646    
647            @Override
648            public java.lang.String toString() {
649                    return _account.toString();
650            }
651    
652            @Override
653            public com.liferay.portal.model.Account toUnescapedModel() {
654                    return new AccountWrapper(_account.toUnescapedModel());
655            }
656    
657            @Override
658            public java.lang.String toXmlString() {
659                    return _account.toXmlString();
660            }
661    
662            @Override
663            public boolean equals(Object obj) {
664                    if (this == obj) {
665                            return true;
666                    }
667    
668                    if (!(obj instanceof AccountWrapper)) {
669                            return false;
670                    }
671    
672                    AccountWrapper accountWrapper = (AccountWrapper)obj;
673    
674                    if (Validator.equals(_account, accountWrapper._account)) {
675                            return true;
676                    }
677    
678                    return false;
679            }
680    
681            @Override
682            public Account getWrappedModel() {
683                    return _account;
684            }
685    
686            @Override
687            public boolean isEntityCacheEnabled() {
688                    return _account.isEntityCacheEnabled();
689            }
690    
691            @Override
692            public boolean isFinderCacheEnabled() {
693                    return _account.isFinderCacheEnabled();
694            }
695    
696            @Override
697            public void resetOriginalValues() {
698                    _account.resetOriginalValues();
699            }
700    
701            private final Account _account;
702    }