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