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    import com.liferay.portal.service.ServiceContext;
021    
022    import com.liferay.portlet.expando.model.ExpandoBridge;
023    
024    import java.io.Serializable;
025    
026    import java.util.Date;
027    import java.util.HashMap;
028    import java.util.Map;
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 java.lang.Object clone() {
187                    return new AccountWrapper((Account)_account.clone());
188            }
189    
190            @Override
191            public int compareTo(com.liferay.portal.model.Account account) {
192                    return _account.compareTo(account);
193            }
194    
195            /**
196            * Returns the account ID of this account.
197            *
198            * @return the account ID of this account
199            */
200            @Override
201            public long getAccountId() {
202                    return _account.getAccountId();
203            }
204    
205            /**
206            * Returns the company ID of this account.
207            *
208            * @return the company ID of this account
209            */
210            @Override
211            public long getCompanyId() {
212                    return _account.getCompanyId();
213            }
214    
215            /**
216            * Returns the create date of this account.
217            *
218            * @return the create date of this account
219            */
220            @Override
221            public Date getCreateDate() {
222                    return _account.getCreateDate();
223            }
224    
225            @Override
226            public ExpandoBridge getExpandoBridge() {
227                    return _account.getExpandoBridge();
228            }
229    
230            /**
231            * Returns the industry of this account.
232            *
233            * @return the industry of this account
234            */
235            @Override
236            public java.lang.String getIndustry() {
237                    return _account.getIndustry();
238            }
239    
240            /**
241            * Returns the legal ID of this account.
242            *
243            * @return the legal ID of this account
244            */
245            @Override
246            public java.lang.String getLegalId() {
247                    return _account.getLegalId();
248            }
249    
250            /**
251            * Returns the legal name of this account.
252            *
253            * @return the legal name of this account
254            */
255            @Override
256            public java.lang.String getLegalName() {
257                    return _account.getLegalName();
258            }
259    
260            /**
261            * Returns the legal type of this account.
262            *
263            * @return the legal type of this account
264            */
265            @Override
266            public java.lang.String getLegalType() {
267                    return _account.getLegalType();
268            }
269    
270            /**
271            * Returns the modified date of this account.
272            *
273            * @return the modified date of this account
274            */
275            @Override
276            public Date getModifiedDate() {
277                    return _account.getModifiedDate();
278            }
279    
280            /**
281            * Returns the mvcc version of this account.
282            *
283            * @return the mvcc version of this account
284            */
285            @Override
286            public long getMvccVersion() {
287                    return _account.getMvccVersion();
288            }
289    
290            /**
291            * Returns the name of this account.
292            *
293            * @return the name of this account
294            */
295            @Override
296            public java.lang.String getName() {
297                    return _account.getName();
298            }
299    
300            /**
301            * Returns the parent account ID of this account.
302            *
303            * @return the parent account ID of this account
304            */
305            @Override
306            public long getParentAccountId() {
307                    return _account.getParentAccountId();
308            }
309    
310            /**
311            * Returns the primary key of this account.
312            *
313            * @return the primary key of this account
314            */
315            @Override
316            public long getPrimaryKey() {
317                    return _account.getPrimaryKey();
318            }
319    
320            @Override
321            public Serializable getPrimaryKeyObj() {
322                    return _account.getPrimaryKeyObj();
323            }
324    
325            /**
326            * Returns the sic code of this account.
327            *
328            * @return the sic code of this account
329            */
330            @Override
331            public java.lang.String getSicCode() {
332                    return _account.getSicCode();
333            }
334    
335            /**
336            * Returns the size of this account.
337            *
338            * @return the size of this account
339            */
340            @Override
341            public java.lang.String getSize() {
342                    return _account.getSize();
343            }
344    
345            /**
346            * Returns the ticker symbol of this account.
347            *
348            * @return the ticker symbol of this account
349            */
350            @Override
351            public java.lang.String getTickerSymbol() {
352                    return _account.getTickerSymbol();
353            }
354    
355            /**
356            * Returns the type of this account.
357            *
358            * @return the type of this account
359            */
360            @Override
361            public java.lang.String getType() {
362                    return _account.getType();
363            }
364    
365            /**
366            * Returns the user ID of this account.
367            *
368            * @return the user ID of this account
369            */
370            @Override
371            public long getUserId() {
372                    return _account.getUserId();
373            }
374    
375            /**
376            * Returns the user name of this account.
377            *
378            * @return the user name of this account
379            */
380            @Override
381            public java.lang.String getUserName() {
382                    return _account.getUserName();
383            }
384    
385            /**
386            * Returns the user uuid of this account.
387            *
388            * @return the user uuid of this account
389            */
390            @Override
391            public java.lang.String getUserUuid() {
392                    return _account.getUserUuid();
393            }
394    
395            @Override
396            public int hashCode() {
397                    return _account.hashCode();
398            }
399    
400            @Override
401            public boolean isCachedModel() {
402                    return _account.isCachedModel();
403            }
404    
405            @Override
406            public boolean isEscapedModel() {
407                    return _account.isEscapedModel();
408            }
409    
410            @Override
411            public boolean isNew() {
412                    return _account.isNew();
413            }
414    
415            @Override
416            public void persist() {
417                    _account.persist();
418            }
419    
420            /**
421            * Sets the account ID of this account.
422            *
423            * @param accountId the account ID of this account
424            */
425            @Override
426            public void setAccountId(long accountId) {
427                    _account.setAccountId(accountId);
428            }
429    
430            @Override
431            public void setCachedModel(boolean cachedModel) {
432                    _account.setCachedModel(cachedModel);
433            }
434    
435            /**
436            * Sets the company ID of this account.
437            *
438            * @param companyId the company ID of this account
439            */
440            @Override
441            public void setCompanyId(long companyId) {
442                    _account.setCompanyId(companyId);
443            }
444    
445            /**
446            * Sets the create date of this account.
447            *
448            * @param createDate the create date of this account
449            */
450            @Override
451            public void setCreateDate(Date createDate) {
452                    _account.setCreateDate(createDate);
453            }
454    
455            @Override
456            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
457                    _account.setExpandoBridgeAttributes(baseModel);
458            }
459    
460            @Override
461            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
462                    _account.setExpandoBridgeAttributes(expandoBridge);
463            }
464    
465            @Override
466            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
467                    _account.setExpandoBridgeAttributes(serviceContext);
468            }
469    
470            /**
471            * Sets the industry of this account.
472            *
473            * @param industry the industry of this account
474            */
475            @Override
476            public void setIndustry(java.lang.String industry) {
477                    _account.setIndustry(industry);
478            }
479    
480            /**
481            * Sets the legal ID of this account.
482            *
483            * @param legalId the legal ID of this account
484            */
485            @Override
486            public void setLegalId(java.lang.String legalId) {
487                    _account.setLegalId(legalId);
488            }
489    
490            /**
491            * Sets the legal name of this account.
492            *
493            * @param legalName the legal name of this account
494            */
495            @Override
496            public void setLegalName(java.lang.String legalName) {
497                    _account.setLegalName(legalName);
498            }
499    
500            /**
501            * Sets the legal type of this account.
502            *
503            * @param legalType the legal type of this account
504            */
505            @Override
506            public void setLegalType(java.lang.String legalType) {
507                    _account.setLegalType(legalType);
508            }
509    
510            /**
511            * Sets the modified date of this account.
512            *
513            * @param modifiedDate the modified date of this account
514            */
515            @Override
516            public void setModifiedDate(Date modifiedDate) {
517                    _account.setModifiedDate(modifiedDate);
518            }
519    
520            /**
521            * Sets the mvcc version of this account.
522            *
523            * @param mvccVersion the mvcc version of this account
524            */
525            @Override
526            public void setMvccVersion(long mvccVersion) {
527                    _account.setMvccVersion(mvccVersion);
528            }
529    
530            /**
531            * Sets the name of this account.
532            *
533            * @param name the name of this account
534            */
535            @Override
536            public void setName(java.lang.String name) {
537                    _account.setName(name);
538            }
539    
540            @Override
541            public void setNew(boolean n) {
542                    _account.setNew(n);
543            }
544    
545            /**
546            * Sets the parent account ID of this account.
547            *
548            * @param parentAccountId the parent account ID of this account
549            */
550            @Override
551            public void setParentAccountId(long parentAccountId) {
552                    _account.setParentAccountId(parentAccountId);
553            }
554    
555            /**
556            * Sets the primary key of this account.
557            *
558            * @param primaryKey the primary key of this account
559            */
560            @Override
561            public void setPrimaryKey(long primaryKey) {
562                    _account.setPrimaryKey(primaryKey);
563            }
564    
565            @Override
566            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
567                    _account.setPrimaryKeyObj(primaryKeyObj);
568            }
569    
570            /**
571            * Sets the sic code of this account.
572            *
573            * @param sicCode the sic code of this account
574            */
575            @Override
576            public void setSicCode(java.lang.String sicCode) {
577                    _account.setSicCode(sicCode);
578            }
579    
580            /**
581            * Sets the size of this account.
582            *
583            * @param size the size of this account
584            */
585            @Override
586            public void setSize(java.lang.String size) {
587                    _account.setSize(size);
588            }
589    
590            /**
591            * Sets the ticker symbol of this account.
592            *
593            * @param tickerSymbol the ticker symbol of this account
594            */
595            @Override
596            public void setTickerSymbol(java.lang.String tickerSymbol) {
597                    _account.setTickerSymbol(tickerSymbol);
598            }
599    
600            /**
601            * Sets the type of this account.
602            *
603            * @param type the type of this account
604            */
605            @Override
606            public void setType(java.lang.String type) {
607                    _account.setType(type);
608            }
609    
610            /**
611            * Sets the user ID of this account.
612            *
613            * @param userId the user ID of this account
614            */
615            @Override
616            public void setUserId(long userId) {
617                    _account.setUserId(userId);
618            }
619    
620            /**
621            * Sets the user name of this account.
622            *
623            * @param userName the user name of this account
624            */
625            @Override
626            public void setUserName(java.lang.String userName) {
627                    _account.setUserName(userName);
628            }
629    
630            /**
631            * Sets the user uuid of this account.
632            *
633            * @param userUuid the user uuid of this account
634            */
635            @Override
636            public void setUserUuid(java.lang.String userUuid) {
637                    _account.setUserUuid(userUuid);
638            }
639    
640            @Override
641            public CacheModel<com.liferay.portal.model.Account> toCacheModel() {
642                    return _account.toCacheModel();
643            }
644    
645            @Override
646            public com.liferay.portal.model.Account toEscapedModel() {
647                    return new AccountWrapper(_account.toEscapedModel());
648            }
649    
650            @Override
651            public java.lang.String toString() {
652                    return _account.toString();
653            }
654    
655            @Override
656            public com.liferay.portal.model.Account toUnescapedModel() {
657                    return new AccountWrapper(_account.toUnescapedModel());
658            }
659    
660            @Override
661            public java.lang.String toXmlString() {
662                    return _account.toXmlString();
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 (Validator.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    }