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