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