001
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
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
171 public long getPrimaryKey() {
172 return _account.getPrimaryKey();
173 }
174
175
180 public void setPrimaryKey(long primaryKey) {
181 _account.setPrimaryKey(primaryKey);
182 }
183
184
189 public long getAccountId() {
190 return _account.getAccountId();
191 }
192
193
198 public void setAccountId(long accountId) {
199 _account.setAccountId(accountId);
200 }
201
202
207 public long getCompanyId() {
208 return _account.getCompanyId();
209 }
210
211
216 public void setCompanyId(long companyId) {
217 _account.setCompanyId(companyId);
218 }
219
220
225 public long getUserId() {
226 return _account.getUserId();
227 }
228
229
234 public void setUserId(long userId) {
235 _account.setUserId(userId);
236 }
237
238
244 public java.lang.String getUserUuid()
245 throws com.liferay.portal.kernel.exception.SystemException {
246 return _account.getUserUuid();
247 }
248
249
254 public void setUserUuid(java.lang.String userUuid) {
255 _account.setUserUuid(userUuid);
256 }
257
258
263 public java.lang.String getUserName() {
264 return _account.getUserName();
265 }
266
267
272 public void setUserName(java.lang.String userName) {
273 _account.setUserName(userName);
274 }
275
276
281 public java.util.Date getCreateDate() {
282 return _account.getCreateDate();
283 }
284
285
290 public void setCreateDate(java.util.Date createDate) {
291 _account.setCreateDate(createDate);
292 }
293
294
299 public java.util.Date getModifiedDate() {
300 return _account.getModifiedDate();
301 }
302
303
308 public void setModifiedDate(java.util.Date modifiedDate) {
309 _account.setModifiedDate(modifiedDate);
310 }
311
312
317 public long getParentAccountId() {
318 return _account.getParentAccountId();
319 }
320
321
326 public void setParentAccountId(long parentAccountId) {
327 _account.setParentAccountId(parentAccountId);
328 }
329
330
335 public java.lang.String getName() {
336 return _account.getName();
337 }
338
339
344 public void setName(java.lang.String name) {
345 _account.setName(name);
346 }
347
348
353 public java.lang.String getLegalName() {
354 return _account.getLegalName();
355 }
356
357
362 public void setLegalName(java.lang.String legalName) {
363 _account.setLegalName(legalName);
364 }
365
366
371 public java.lang.String getLegalId() {
372 return _account.getLegalId();
373 }
374
375
380 public void setLegalId(java.lang.String legalId) {
381 _account.setLegalId(legalId);
382 }
383
384
389 public java.lang.String getLegalType() {
390 return _account.getLegalType();
391 }
392
393
398 public void setLegalType(java.lang.String legalType) {
399 _account.setLegalType(legalType);
400 }
401
402
407 public java.lang.String getSicCode() {
408 return _account.getSicCode();
409 }
410
411
416 public void setSicCode(java.lang.String sicCode) {
417 _account.setSicCode(sicCode);
418 }
419
420
425 public java.lang.String getTickerSymbol() {
426 return _account.getTickerSymbol();
427 }
428
429
434 public void setTickerSymbol(java.lang.String tickerSymbol) {
435 _account.setTickerSymbol(tickerSymbol);
436 }
437
438
443 public java.lang.String getIndustry() {
444 return _account.getIndustry();
445 }
446
447
452 public void setIndustry(java.lang.String industry) {
453 _account.setIndustry(industry);
454 }
455
456
461 public java.lang.String getType() {
462 return _account.getType();
463 }
464
465
470 public void setType(java.lang.String type) {
471 _account.setType(type);
472 }
473
474
479 public java.lang.String getSize() {
480 return _account.getSize();
481 }
482
483
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
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 }