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 java.util.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 java.util.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(java.util.Date createDate) {
447                    _account.setCreateDate(createDate);
448            }
449    
450            @Override
451            public void setExpandoBridgeAttributes(
452                    com.liferay.portal.model.BaseModel<?> baseModel) {
453                    _account.setExpandoBridgeAttributes(baseModel);
454            }
455    
456            @Override
457            public void setExpandoBridgeAttributes(
458                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
459                    _account.setExpandoBridgeAttributes(expandoBridge);
460            }
461    
462            @Override
463            public void setExpandoBridgeAttributes(
464                    com.liferay.portal.service.ServiceContext serviceContext) {
465                    _account.setExpandoBridgeAttributes(serviceContext);
466            }
467    
468            /**
469            * Sets the industry of this account.
470            *
471            * @param industry the industry of this account
472            */
473            @Override
474            public void setIndustry(java.lang.String industry) {
475                    _account.setIndustry(industry);
476            }
477    
478            /**
479            * Sets the legal ID of this account.
480            *
481            * @param legalId the legal ID of this account
482            */
483            @Override
484            public void setLegalId(java.lang.String legalId) {
485                    _account.setLegalId(legalId);
486            }
487    
488            /**
489            * Sets the legal name of this account.
490            *
491            * @param legalName the legal name of this account
492            */
493            @Override
494            public void setLegalName(java.lang.String legalName) {
495                    _account.setLegalName(legalName);
496            }
497    
498            /**
499            * Sets the legal type of this account.
500            *
501            * @param legalType the legal type of this account
502            */
503            @Override
504            public void setLegalType(java.lang.String legalType) {
505                    _account.setLegalType(legalType);
506            }
507    
508            /**
509            * Sets the modified date of this account.
510            *
511            * @param modifiedDate the modified date of this account
512            */
513            @Override
514            public void setModifiedDate(java.util.Date modifiedDate) {
515                    _account.setModifiedDate(modifiedDate);
516            }
517    
518            /**
519            * Sets the mvcc version of this account.
520            *
521            * @param mvccVersion the mvcc version of this account
522            */
523            @Override
524            public void setMvccVersion(long mvccVersion) {
525                    _account.setMvccVersion(mvccVersion);
526            }
527    
528            /**
529            * Sets the name of this account.
530            *
531            * @param name the name of this account
532            */
533            @Override
534            public void setName(java.lang.String name) {
535                    _account.setName(name);
536            }
537    
538            @Override
539            public void setNew(boolean n) {
540                    _account.setNew(n);
541            }
542    
543            /**
544            * Sets the parent account ID of this account.
545            *
546            * @param parentAccountId the parent account ID of this account
547            */
548            @Override
549            public void setParentAccountId(long parentAccountId) {
550                    _account.setParentAccountId(parentAccountId);
551            }
552    
553            /**
554            * Sets the primary key of this account.
555            *
556            * @param primaryKey the primary key of this account
557            */
558            @Override
559            public void setPrimaryKey(long primaryKey) {
560                    _account.setPrimaryKey(primaryKey);
561            }
562    
563            @Override
564            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
565                    _account.setPrimaryKeyObj(primaryKeyObj);
566            }
567    
568            /**
569            * Sets the sic code of this account.
570            *
571            * @param sicCode the sic code of this account
572            */
573            @Override
574            public void setSicCode(java.lang.String sicCode) {
575                    _account.setSicCode(sicCode);
576            }
577    
578            /**
579            * Sets the size of this account.
580            *
581            * @param size the size of this account
582            */
583            @Override
584            public void setSize(java.lang.String size) {
585                    _account.setSize(size);
586            }
587    
588            /**
589            * Sets the ticker symbol of this account.
590            *
591            * @param tickerSymbol the ticker symbol of this account
592            */
593            @Override
594            public void setTickerSymbol(java.lang.String tickerSymbol) {
595                    _account.setTickerSymbol(tickerSymbol);
596            }
597    
598            /**
599            * Sets the type of this account.
600            *
601            * @param type the type of this account
602            */
603            @Override
604            public void setType(java.lang.String type) {
605                    _account.setType(type);
606            }
607    
608            /**
609            * Sets the user ID of this account.
610            *
611            * @param userId the user ID of this account
612            */
613            @Override
614            public void setUserId(long userId) {
615                    _account.setUserId(userId);
616            }
617    
618            /**
619            * Sets the user name of this account.
620            *
621            * @param userName the user name of this account
622            */
623            @Override
624            public void setUserName(java.lang.String userName) {
625                    _account.setUserName(userName);
626            }
627    
628            /**
629            * Sets the user uuid of this account.
630            *
631            * @param userUuid the user uuid of this account
632            */
633            @Override
634            public void setUserUuid(java.lang.String userUuid) {
635                    _account.setUserUuid(userUuid);
636            }
637    
638            @Override
639            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Account> toCacheModel() {
640                    return _account.toCacheModel();
641            }
642    
643            @Override
644            public com.liferay.portal.model.Account toEscapedModel() {
645                    return new AccountWrapper(_account.toEscapedModel());
646            }
647    
648            @Override
649            public java.lang.String toString() {
650                    return _account.toString();
651            }
652    
653            @Override
654            public com.liferay.portal.model.Account toUnescapedModel() {
655                    return new AccountWrapper(_account.toUnescapedModel());
656            }
657    
658            @Override
659            public java.lang.String toXmlString() {
660                    return _account.toXmlString();
661            }
662    
663            @Override
664            public boolean equals(Object obj) {
665                    if (this == obj) {
666                            return true;
667                    }
668    
669                    if (!(obj instanceof AccountWrapper)) {
670                            return false;
671                    }
672    
673                    AccountWrapper accountWrapper = (AccountWrapper)obj;
674    
675                    if (Validator.equals(_account, accountWrapper._account)) {
676                            return true;
677                    }
678    
679                    return false;
680            }
681    
682            /**
683             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
684             */
685            @Deprecated
686            public Account getWrappedAccount() {
687                    return _account;
688            }
689    
690            @Override
691            public Account getWrappedModel() {
692                    return _account;
693            }
694    
695            @Override
696            public boolean isEntityCacheEnabled() {
697                    return _account.isEntityCacheEnabled();
698            }
699    
700            @Override
701            public boolean isFinderCacheEnabled() {
702                    return _account.isFinderCacheEnabled();
703            }
704    
705            @Override
706            public void resetOriginalValues() {
707                    _account.resetOriginalValues();
708            }
709    
710            private final Account _account;
711    }