/modules/apps/archived/mail-reader-api/src/main/java/com/liferay/mail/reader/model/AccountWrapper.java

https://github.com/danielreuther/liferay-portal · Java · 869 lines · 415 code · 127 blank · 327 comment · 52 complexity · c0b75efde229327bb0b7663bc48d269c MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. package com.liferay.mail.reader.model;
  15. import com.liferay.portal.kernel.model.ModelWrapper;
  16. import com.liferay.portal.kernel.model.wrapper.BaseModelWrapper;
  17. import java.util.Date;
  18. import java.util.HashMap;
  19. import java.util.Map;
  20. /**
  21. * <p>
  22. * This class is a wrapper for {@link Account}.
  23. * </p>
  24. *
  25. * @author Brian Wing Shun Chan
  26. * @see Account
  27. * @generated
  28. */
  29. public class AccountWrapper
  30. extends BaseModelWrapper<Account>
  31. implements Account, ModelWrapper<Account> {
  32. public AccountWrapper(Account account) {
  33. super(account);
  34. }
  35. @Override
  36. public Map<String, Object> getModelAttributes() {
  37. Map<String, Object> attributes = new HashMap<String, Object>();
  38. attributes.put("accountId", getAccountId());
  39. attributes.put("companyId", getCompanyId());
  40. attributes.put("userId", getUserId());
  41. attributes.put("userName", getUserName());
  42. attributes.put("createDate", getCreateDate());
  43. attributes.put("modifiedDate", getModifiedDate());
  44. attributes.put("address", getAddress());
  45. attributes.put("personalName", getPersonalName());
  46. attributes.put("protocol", getProtocol());
  47. attributes.put("incomingHostName", getIncomingHostName());
  48. attributes.put("incomingPort", getIncomingPort());
  49. attributes.put("incomingSecure", isIncomingSecure());
  50. attributes.put("outgoingHostName", getOutgoingHostName());
  51. attributes.put("outgoingPort", getOutgoingPort());
  52. attributes.put("outgoingSecure", isOutgoingSecure());
  53. attributes.put("login", getLogin());
  54. attributes.put("password", getPassword());
  55. attributes.put("savePassword", isSavePassword());
  56. attributes.put("signature", getSignature());
  57. attributes.put("useSignature", isUseSignature());
  58. attributes.put("folderPrefix", getFolderPrefix());
  59. attributes.put("inboxFolderId", getInboxFolderId());
  60. attributes.put("draftFolderId", getDraftFolderId());
  61. attributes.put("sentFolderId", getSentFolderId());
  62. attributes.put("trashFolderId", getTrashFolderId());
  63. attributes.put("defaultSender", isDefaultSender());
  64. return attributes;
  65. }
  66. @Override
  67. public void setModelAttributes(Map<String, Object> attributes) {
  68. Long accountId = (Long)attributes.get("accountId");
  69. if (accountId != null) {
  70. setAccountId(accountId);
  71. }
  72. Long companyId = (Long)attributes.get("companyId");
  73. if (companyId != null) {
  74. setCompanyId(companyId);
  75. }
  76. Long userId = (Long)attributes.get("userId");
  77. if (userId != null) {
  78. setUserId(userId);
  79. }
  80. String userName = (String)attributes.get("userName");
  81. if (userName != null) {
  82. setUserName(userName);
  83. }
  84. Date createDate = (Date)attributes.get("createDate");
  85. if (createDate != null) {
  86. setCreateDate(createDate);
  87. }
  88. Date modifiedDate = (Date)attributes.get("modifiedDate");
  89. if (modifiedDate != null) {
  90. setModifiedDate(modifiedDate);
  91. }
  92. String address = (String)attributes.get("address");
  93. if (address != null) {
  94. setAddress(address);
  95. }
  96. String personalName = (String)attributes.get("personalName");
  97. if (personalName != null) {
  98. setPersonalName(personalName);
  99. }
  100. String protocol = (String)attributes.get("protocol");
  101. if (protocol != null) {
  102. setProtocol(protocol);
  103. }
  104. String incomingHostName = (String)attributes.get("incomingHostName");
  105. if (incomingHostName != null) {
  106. setIncomingHostName(incomingHostName);
  107. }
  108. Integer incomingPort = (Integer)attributes.get("incomingPort");
  109. if (incomingPort != null) {
  110. setIncomingPort(incomingPort);
  111. }
  112. Boolean incomingSecure = (Boolean)attributes.get("incomingSecure");
  113. if (incomingSecure != null) {
  114. setIncomingSecure(incomingSecure);
  115. }
  116. String outgoingHostName = (String)attributes.get("outgoingHostName");
  117. if (outgoingHostName != null) {
  118. setOutgoingHostName(outgoingHostName);
  119. }
  120. Integer outgoingPort = (Integer)attributes.get("outgoingPort");
  121. if (outgoingPort != null) {
  122. setOutgoingPort(outgoingPort);
  123. }
  124. Boolean outgoingSecure = (Boolean)attributes.get("outgoingSecure");
  125. if (outgoingSecure != null) {
  126. setOutgoingSecure(outgoingSecure);
  127. }
  128. String login = (String)attributes.get("login");
  129. if (login != null) {
  130. setLogin(login);
  131. }
  132. String password = (String)attributes.get("password");
  133. if (password != null) {
  134. setPassword(password);
  135. }
  136. Boolean savePassword = (Boolean)attributes.get("savePassword");
  137. if (savePassword != null) {
  138. setSavePassword(savePassword);
  139. }
  140. String signature = (String)attributes.get("signature");
  141. if (signature != null) {
  142. setSignature(signature);
  143. }
  144. Boolean useSignature = (Boolean)attributes.get("useSignature");
  145. if (useSignature != null) {
  146. setUseSignature(useSignature);
  147. }
  148. String folderPrefix = (String)attributes.get("folderPrefix");
  149. if (folderPrefix != null) {
  150. setFolderPrefix(folderPrefix);
  151. }
  152. Long inboxFolderId = (Long)attributes.get("inboxFolderId");
  153. if (inboxFolderId != null) {
  154. setInboxFolderId(inboxFolderId);
  155. }
  156. Long draftFolderId = (Long)attributes.get("draftFolderId");
  157. if (draftFolderId != null) {
  158. setDraftFolderId(draftFolderId);
  159. }
  160. Long sentFolderId = (Long)attributes.get("sentFolderId");
  161. if (sentFolderId != null) {
  162. setSentFolderId(sentFolderId);
  163. }
  164. Long trashFolderId = (Long)attributes.get("trashFolderId");
  165. if (trashFolderId != null) {
  166. setTrashFolderId(trashFolderId);
  167. }
  168. Boolean defaultSender = (Boolean)attributes.get("defaultSender");
  169. if (defaultSender != null) {
  170. setDefaultSender(defaultSender);
  171. }
  172. }
  173. @Override
  174. public Account cloneWithOriginalValues() {
  175. return wrap(model.cloneWithOriginalValues());
  176. }
  177. /**
  178. * Returns the account ID of this account.
  179. *
  180. * @return the account ID of this account
  181. */
  182. @Override
  183. public long getAccountId() {
  184. return model.getAccountId();
  185. }
  186. /**
  187. * Returns the address of this account.
  188. *
  189. * @return the address of this account
  190. */
  191. @Override
  192. public String getAddress() {
  193. return model.getAddress();
  194. }
  195. /**
  196. * Returns the company ID of this account.
  197. *
  198. * @return the company ID of this account
  199. */
  200. @Override
  201. public long getCompanyId() {
  202. return model.getCompanyId();
  203. }
  204. /**
  205. * Returns the create date of this account.
  206. *
  207. * @return the create date of this account
  208. */
  209. @Override
  210. public Date getCreateDate() {
  211. return model.getCreateDate();
  212. }
  213. /**
  214. * Returns the default sender of this account.
  215. *
  216. * @return the default sender of this account
  217. */
  218. @Override
  219. public boolean getDefaultSender() {
  220. return model.getDefaultSender();
  221. }
  222. /**
  223. * Returns the draft folder ID of this account.
  224. *
  225. * @return the draft folder ID of this account
  226. */
  227. @Override
  228. public long getDraftFolderId() {
  229. return model.getDraftFolderId();
  230. }
  231. /**
  232. * Returns the folder prefix of this account.
  233. *
  234. * @return the folder prefix of this account
  235. */
  236. @Override
  237. public String getFolderPrefix() {
  238. return model.getFolderPrefix();
  239. }
  240. /**
  241. * Returns the inbox folder ID of this account.
  242. *
  243. * @return the inbox folder ID of this account
  244. */
  245. @Override
  246. public long getInboxFolderId() {
  247. return model.getInboxFolderId();
  248. }
  249. /**
  250. * Returns the incoming host name of this account.
  251. *
  252. * @return the incoming host name of this account
  253. */
  254. @Override
  255. public String getIncomingHostName() {
  256. return model.getIncomingHostName();
  257. }
  258. /**
  259. * Returns the incoming port of this account.
  260. *
  261. * @return the incoming port of this account
  262. */
  263. @Override
  264. public int getIncomingPort() {
  265. return model.getIncomingPort();
  266. }
  267. /**
  268. * Returns the incoming secure of this account.
  269. *
  270. * @return the incoming secure of this account
  271. */
  272. @Override
  273. public boolean getIncomingSecure() {
  274. return model.getIncomingSecure();
  275. }
  276. /**
  277. * Returns the login of this account.
  278. *
  279. * @return the login of this account
  280. */
  281. @Override
  282. public String getLogin() {
  283. return model.getLogin();
  284. }
  285. /**
  286. * Returns the modified date of this account.
  287. *
  288. * @return the modified date of this account
  289. */
  290. @Override
  291. public Date getModifiedDate() {
  292. return model.getModifiedDate();
  293. }
  294. /**
  295. * Returns the outgoing host name of this account.
  296. *
  297. * @return the outgoing host name of this account
  298. */
  299. @Override
  300. public String getOutgoingHostName() {
  301. return model.getOutgoingHostName();
  302. }
  303. /**
  304. * Returns the outgoing port of this account.
  305. *
  306. * @return the outgoing port of this account
  307. */
  308. @Override
  309. public int getOutgoingPort() {
  310. return model.getOutgoingPort();
  311. }
  312. /**
  313. * Returns the outgoing secure of this account.
  314. *
  315. * @return the outgoing secure of this account
  316. */
  317. @Override
  318. public boolean getOutgoingSecure() {
  319. return model.getOutgoingSecure();
  320. }
  321. /**
  322. * Returns the password of this account.
  323. *
  324. * @return the password of this account
  325. */
  326. @Override
  327. public String getPassword() {
  328. return model.getPassword();
  329. }
  330. @Override
  331. public String getPasswordDecrypted() {
  332. return model.getPasswordDecrypted();
  333. }
  334. /**
  335. * Returns the personal name of this account.
  336. *
  337. * @return the personal name of this account
  338. */
  339. @Override
  340. public String getPersonalName() {
  341. return model.getPersonalName();
  342. }
  343. /**
  344. * Returns the primary key of this account.
  345. *
  346. * @return the primary key of this account
  347. */
  348. @Override
  349. public long getPrimaryKey() {
  350. return model.getPrimaryKey();
  351. }
  352. /**
  353. * Returns the protocol of this account.
  354. *
  355. * @return the protocol of this account
  356. */
  357. @Override
  358. public String getProtocol() {
  359. return model.getProtocol();
  360. }
  361. /**
  362. * Returns the save password of this account.
  363. *
  364. * @return the save password of this account
  365. */
  366. @Override
  367. public boolean getSavePassword() {
  368. return model.getSavePassword();
  369. }
  370. /**
  371. * Returns the sent folder ID of this account.
  372. *
  373. * @return the sent folder ID of this account
  374. */
  375. @Override
  376. public long getSentFolderId() {
  377. return model.getSentFolderId();
  378. }
  379. /**
  380. * Returns the signature of this account.
  381. *
  382. * @return the signature of this account
  383. */
  384. @Override
  385. public String getSignature() {
  386. return model.getSignature();
  387. }
  388. /**
  389. * Returns the trash folder ID of this account.
  390. *
  391. * @return the trash folder ID of this account
  392. */
  393. @Override
  394. public long getTrashFolderId() {
  395. return model.getTrashFolderId();
  396. }
  397. /**
  398. * Returns the user ID of this account.
  399. *
  400. * @return the user ID of this account
  401. */
  402. @Override
  403. public long getUserId() {
  404. return model.getUserId();
  405. }
  406. /**
  407. * Returns the user name of this account.
  408. *
  409. * @return the user name of this account
  410. */
  411. @Override
  412. public String getUserName() {
  413. return model.getUserName();
  414. }
  415. /**
  416. * Returns the user uuid of this account.
  417. *
  418. * @return the user uuid of this account
  419. */
  420. @Override
  421. public String getUserUuid() {
  422. return model.getUserUuid();
  423. }
  424. /**
  425. * Returns the use signature of this account.
  426. *
  427. * @return the use signature of this account
  428. */
  429. @Override
  430. public boolean getUseSignature() {
  431. return model.getUseSignature();
  432. }
  433. /**
  434. * Returns <code>true</code> if this account is default sender.
  435. *
  436. * @return <code>true</code> if this account is default sender; <code>false</code> otherwise
  437. */
  438. @Override
  439. public boolean isDefaultSender() {
  440. return model.isDefaultSender();
  441. }
  442. /**
  443. * Returns <code>true</code> if this account is incoming secure.
  444. *
  445. * @return <code>true</code> if this account is incoming secure; <code>false</code> otherwise
  446. */
  447. @Override
  448. public boolean isIncomingSecure() {
  449. return model.isIncomingSecure();
  450. }
  451. /**
  452. * Returns <code>true</code> if this account is outgoing secure.
  453. *
  454. * @return <code>true</code> if this account is outgoing secure; <code>false</code> otherwise
  455. */
  456. @Override
  457. public boolean isOutgoingSecure() {
  458. return model.isOutgoingSecure();
  459. }
  460. /**
  461. * Returns <code>true</code> if this account is save password.
  462. *
  463. * @return <code>true</code> if this account is save password; <code>false</code> otherwise
  464. */
  465. @Override
  466. public boolean isSavePassword() {
  467. return model.isSavePassword();
  468. }
  469. /**
  470. * Returns <code>true</code> if this account is use signature.
  471. *
  472. * @return <code>true</code> if this account is use signature; <code>false</code> otherwise
  473. */
  474. @Override
  475. public boolean isUseSignature() {
  476. return model.isUseSignature();
  477. }
  478. @Override
  479. public void persist() {
  480. model.persist();
  481. }
  482. /**
  483. * Sets the account ID of this account.
  484. *
  485. * @param accountId the account ID of this account
  486. */
  487. @Override
  488. public void setAccountId(long accountId) {
  489. model.setAccountId(accountId);
  490. }
  491. /**
  492. * Sets the address of this account.
  493. *
  494. * @param address the address of this account
  495. */
  496. @Override
  497. public void setAddress(String address) {
  498. model.setAddress(address);
  499. }
  500. /**
  501. * Sets the company ID of this account.
  502. *
  503. * @param companyId the company ID of this account
  504. */
  505. @Override
  506. public void setCompanyId(long companyId) {
  507. model.setCompanyId(companyId);
  508. }
  509. /**
  510. * Sets the create date of this account.
  511. *
  512. * @param createDate the create date of this account
  513. */
  514. @Override
  515. public void setCreateDate(Date createDate) {
  516. model.setCreateDate(createDate);
  517. }
  518. /**
  519. * Sets whether this account is default sender.
  520. *
  521. * @param defaultSender the default sender of this account
  522. */
  523. @Override
  524. public void setDefaultSender(boolean defaultSender) {
  525. model.setDefaultSender(defaultSender);
  526. }
  527. /**
  528. * Sets the draft folder ID of this account.
  529. *
  530. * @param draftFolderId the draft folder ID of this account
  531. */
  532. @Override
  533. public void setDraftFolderId(long draftFolderId) {
  534. model.setDraftFolderId(draftFolderId);
  535. }
  536. /**
  537. * Sets the folder prefix of this account.
  538. *
  539. * @param folderPrefix the folder prefix of this account
  540. */
  541. @Override
  542. public void setFolderPrefix(String folderPrefix) {
  543. model.setFolderPrefix(folderPrefix);
  544. }
  545. /**
  546. * Sets the inbox folder ID of this account.
  547. *
  548. * @param inboxFolderId the inbox folder ID of this account
  549. */
  550. @Override
  551. public void setInboxFolderId(long inboxFolderId) {
  552. model.setInboxFolderId(inboxFolderId);
  553. }
  554. /**
  555. * Sets the incoming host name of this account.
  556. *
  557. * @param incomingHostName the incoming host name of this account
  558. */
  559. @Override
  560. public void setIncomingHostName(String incomingHostName) {
  561. model.setIncomingHostName(incomingHostName);
  562. }
  563. /**
  564. * Sets the incoming port of this account.
  565. *
  566. * @param incomingPort the incoming port of this account
  567. */
  568. @Override
  569. public void setIncomingPort(int incomingPort) {
  570. model.setIncomingPort(incomingPort);
  571. }
  572. /**
  573. * Sets whether this account is incoming secure.
  574. *
  575. * @param incomingSecure the incoming secure of this account
  576. */
  577. @Override
  578. public void setIncomingSecure(boolean incomingSecure) {
  579. model.setIncomingSecure(incomingSecure);
  580. }
  581. /**
  582. * Sets the login of this account.
  583. *
  584. * @param login the login of this account
  585. */
  586. @Override
  587. public void setLogin(String login) {
  588. model.setLogin(login);
  589. }
  590. /**
  591. * Sets the modified date of this account.
  592. *
  593. * @param modifiedDate the modified date of this account
  594. */
  595. @Override
  596. public void setModifiedDate(Date modifiedDate) {
  597. model.setModifiedDate(modifiedDate);
  598. }
  599. /**
  600. * Sets the outgoing host name of this account.
  601. *
  602. * @param outgoingHostName the outgoing host name of this account
  603. */
  604. @Override
  605. public void setOutgoingHostName(String outgoingHostName) {
  606. model.setOutgoingHostName(outgoingHostName);
  607. }
  608. /**
  609. * Sets the outgoing port of this account.
  610. *
  611. * @param outgoingPort the outgoing port of this account
  612. */
  613. @Override
  614. public void setOutgoingPort(int outgoingPort) {
  615. model.setOutgoingPort(outgoingPort);
  616. }
  617. /**
  618. * Sets whether this account is outgoing secure.
  619. *
  620. * @param outgoingSecure the outgoing secure of this account
  621. */
  622. @Override
  623. public void setOutgoingSecure(boolean outgoingSecure) {
  624. model.setOutgoingSecure(outgoingSecure);
  625. }
  626. /**
  627. * Sets the password of this account.
  628. *
  629. * @param password the password of this account
  630. */
  631. @Override
  632. public void setPassword(String password) {
  633. model.setPassword(password);
  634. }
  635. @Override
  636. public void setPasswordDecrypted(String unencryptedPassword) {
  637. model.setPasswordDecrypted(unencryptedPassword);
  638. }
  639. /**
  640. * Sets the personal name of this account.
  641. *
  642. * @param personalName the personal name of this account
  643. */
  644. @Override
  645. public void setPersonalName(String personalName) {
  646. model.setPersonalName(personalName);
  647. }
  648. /**
  649. * Sets the primary key of this account.
  650. *
  651. * @param primaryKey the primary key of this account
  652. */
  653. @Override
  654. public void setPrimaryKey(long primaryKey) {
  655. model.setPrimaryKey(primaryKey);
  656. }
  657. /**
  658. * Sets the protocol of this account.
  659. *
  660. * @param protocol the protocol of this account
  661. */
  662. @Override
  663. public void setProtocol(String protocol) {
  664. model.setProtocol(protocol);
  665. }
  666. /**
  667. * Sets whether this account is save password.
  668. *
  669. * @param savePassword the save password of this account
  670. */
  671. @Override
  672. public void setSavePassword(boolean savePassword) {
  673. model.setSavePassword(savePassword);
  674. }
  675. /**
  676. * Sets the sent folder ID of this account.
  677. *
  678. * @param sentFolderId the sent folder ID of this account
  679. */
  680. @Override
  681. public void setSentFolderId(long sentFolderId) {
  682. model.setSentFolderId(sentFolderId);
  683. }
  684. /**
  685. * Sets the signature of this account.
  686. *
  687. * @param signature the signature of this account
  688. */
  689. @Override
  690. public void setSignature(String signature) {
  691. model.setSignature(signature);
  692. }
  693. /**
  694. * Sets the trash folder ID of this account.
  695. *
  696. * @param trashFolderId the trash folder ID of this account
  697. */
  698. @Override
  699. public void setTrashFolderId(long trashFolderId) {
  700. model.setTrashFolderId(trashFolderId);
  701. }
  702. /**
  703. * Sets the user ID of this account.
  704. *
  705. * @param userId the user ID of this account
  706. */
  707. @Override
  708. public void setUserId(long userId) {
  709. model.setUserId(userId);
  710. }
  711. /**
  712. * Sets the user name of this account.
  713. *
  714. * @param userName the user name of this account
  715. */
  716. @Override
  717. public void setUserName(String userName) {
  718. model.setUserName(userName);
  719. }
  720. /**
  721. * Sets the user uuid of this account.
  722. *
  723. * @param userUuid the user uuid of this account
  724. */
  725. @Override
  726. public void setUserUuid(String userUuid) {
  727. model.setUserUuid(userUuid);
  728. }
  729. /**
  730. * Sets whether this account is use signature.
  731. *
  732. * @param useSignature the use signature of this account
  733. */
  734. @Override
  735. public void setUseSignature(boolean useSignature) {
  736. model.setUseSignature(useSignature);
  737. }
  738. @Override
  739. protected AccountWrapper wrap(Account account) {
  740. return new AccountWrapper(account);
  741. }
  742. }