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