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