/modules/apps/headless/headless-admin-user/headless-admin-user-client/src/main/java/com/liferay/headless/admin/user/client/dto/v1_0/UserAccount.java

https://github.com/danielreuther/liferay-portal · Java · 660 lines · 488 code · 155 blank · 17 comment · 3 complexity · a4feb10fa7ab31dcb77950a913c42610 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.headless.admin.user.client.dto.v1_0;
  15. import com.liferay.headless.admin.user.client.function.UnsafeSupplier;
  16. import com.liferay.headless.admin.user.client.serdes.v1_0.UserAccountSerDes;
  17. import java.io.Serializable;
  18. import java.util.Date;
  19. import java.util.Map;
  20. import java.util.Objects;
  21. import javax.annotation.Generated;
  22. /**
  23. * @author Javier Gamarra
  24. * @generated
  25. */
  26. @Generated("")
  27. public class UserAccount implements Cloneable, Serializable {
  28. public static UserAccount toDTO(String json) {
  29. return UserAccountSerDes.toDTO(json);
  30. }
  31. public AccountBrief[] getAccountBriefs() {
  32. return accountBriefs;
  33. }
  34. public void setAccountBriefs(AccountBrief[] accountBriefs) {
  35. this.accountBriefs = accountBriefs;
  36. }
  37. public void setAccountBriefs(
  38. UnsafeSupplier<AccountBrief[], Exception> accountBriefsUnsafeSupplier) {
  39. try {
  40. accountBriefs = accountBriefsUnsafeSupplier.get();
  41. }
  42. catch (Exception e) {
  43. throw new RuntimeException(e);
  44. }
  45. }
  46. protected AccountBrief[] accountBriefs;
  47. public Map<String, Map<String, String>> getActions() {
  48. return actions;
  49. }
  50. public void setActions(Map<String, Map<String, String>> actions) {
  51. this.actions = actions;
  52. }
  53. public void setActions(
  54. UnsafeSupplier<Map<String, Map<String, String>>, Exception>
  55. actionsUnsafeSupplier) {
  56. try {
  57. actions = actionsUnsafeSupplier.get();
  58. }
  59. catch (Exception e) {
  60. throw new RuntimeException(e);
  61. }
  62. }
  63. protected Map<String, Map<String, String>> actions;
  64. public String getAdditionalName() {
  65. return additionalName;
  66. }
  67. public void setAdditionalName(String additionalName) {
  68. this.additionalName = additionalName;
  69. }
  70. public void setAdditionalName(
  71. UnsafeSupplier<String, Exception> additionalNameUnsafeSupplier) {
  72. try {
  73. additionalName = additionalNameUnsafeSupplier.get();
  74. }
  75. catch (Exception e) {
  76. throw new RuntimeException(e);
  77. }
  78. }
  79. protected String additionalName;
  80. public String getAlternateName() {
  81. return alternateName;
  82. }
  83. public void setAlternateName(String alternateName) {
  84. this.alternateName = alternateName;
  85. }
  86. public void setAlternateName(
  87. UnsafeSupplier<String, Exception> alternateNameUnsafeSupplier) {
  88. try {
  89. alternateName = alternateNameUnsafeSupplier.get();
  90. }
  91. catch (Exception e) {
  92. throw new RuntimeException(e);
  93. }
  94. }
  95. protected String alternateName;
  96. public Date getBirthDate() {
  97. return birthDate;
  98. }
  99. public void setBirthDate(Date birthDate) {
  100. this.birthDate = birthDate;
  101. }
  102. public void setBirthDate(
  103. UnsafeSupplier<Date, Exception> birthDateUnsafeSupplier) {
  104. try {
  105. birthDate = birthDateUnsafeSupplier.get();
  106. }
  107. catch (Exception e) {
  108. throw new RuntimeException(e);
  109. }
  110. }
  111. protected Date birthDate;
  112. public String getCurrentPassword() {
  113. return currentPassword;
  114. }
  115. public void setCurrentPassword(String currentPassword) {
  116. this.currentPassword = currentPassword;
  117. }
  118. public void setCurrentPassword(
  119. UnsafeSupplier<String, Exception> currentPasswordUnsafeSupplier) {
  120. try {
  121. currentPassword = currentPasswordUnsafeSupplier.get();
  122. }
  123. catch (Exception e) {
  124. throw new RuntimeException(e);
  125. }
  126. }
  127. protected String currentPassword;
  128. public CustomField[] getCustomFields() {
  129. return customFields;
  130. }
  131. public void setCustomFields(CustomField[] customFields) {
  132. this.customFields = customFields;
  133. }
  134. public void setCustomFields(
  135. UnsafeSupplier<CustomField[], Exception> customFieldsUnsafeSupplier) {
  136. try {
  137. customFields = customFieldsUnsafeSupplier.get();
  138. }
  139. catch (Exception e) {
  140. throw new RuntimeException(e);
  141. }
  142. }
  143. protected CustomField[] customFields;
  144. public String getDashboardURL() {
  145. return dashboardURL;
  146. }
  147. public void setDashboardURL(String dashboardURL) {
  148. this.dashboardURL = dashboardURL;
  149. }
  150. public void setDashboardURL(
  151. UnsafeSupplier<String, Exception> dashboardURLUnsafeSupplier) {
  152. try {
  153. dashboardURL = dashboardURLUnsafeSupplier.get();
  154. }
  155. catch (Exception e) {
  156. throw new RuntimeException(e);
  157. }
  158. }
  159. protected String dashboardURL;
  160. public Date getDateCreated() {
  161. return dateCreated;
  162. }
  163. public void setDateCreated(Date dateCreated) {
  164. this.dateCreated = dateCreated;
  165. }
  166. public void setDateCreated(
  167. UnsafeSupplier<Date, Exception> dateCreatedUnsafeSupplier) {
  168. try {
  169. dateCreated = dateCreatedUnsafeSupplier.get();
  170. }
  171. catch (Exception e) {
  172. throw new RuntimeException(e);
  173. }
  174. }
  175. protected Date dateCreated;
  176. public Date getDateModified() {
  177. return dateModified;
  178. }
  179. public void setDateModified(Date dateModified) {
  180. this.dateModified = dateModified;
  181. }
  182. public void setDateModified(
  183. UnsafeSupplier<Date, Exception> dateModifiedUnsafeSupplier) {
  184. try {
  185. dateModified = dateModifiedUnsafeSupplier.get();
  186. }
  187. catch (Exception e) {
  188. throw new RuntimeException(e);
  189. }
  190. }
  191. protected Date dateModified;
  192. public String getEmailAddress() {
  193. return emailAddress;
  194. }
  195. public void setEmailAddress(String emailAddress) {
  196. this.emailAddress = emailAddress;
  197. }
  198. public void setEmailAddress(
  199. UnsafeSupplier<String, Exception> emailAddressUnsafeSupplier) {
  200. try {
  201. emailAddress = emailAddressUnsafeSupplier.get();
  202. }
  203. catch (Exception e) {
  204. throw new RuntimeException(e);
  205. }
  206. }
  207. protected String emailAddress;
  208. public String getExternalReferenceCode() {
  209. return externalReferenceCode;
  210. }
  211. public void setExternalReferenceCode(String externalReferenceCode) {
  212. this.externalReferenceCode = externalReferenceCode;
  213. }
  214. public void setExternalReferenceCode(
  215. UnsafeSupplier<String, Exception> externalReferenceCodeUnsafeSupplier) {
  216. try {
  217. externalReferenceCode = externalReferenceCodeUnsafeSupplier.get();
  218. }
  219. catch (Exception e) {
  220. throw new RuntimeException(e);
  221. }
  222. }
  223. protected String externalReferenceCode;
  224. public String getFamilyName() {
  225. return familyName;
  226. }
  227. public void setFamilyName(String familyName) {
  228. this.familyName = familyName;
  229. }
  230. public void setFamilyName(
  231. UnsafeSupplier<String, Exception> familyNameUnsafeSupplier) {
  232. try {
  233. familyName = familyNameUnsafeSupplier.get();
  234. }
  235. catch (Exception e) {
  236. throw new RuntimeException(e);
  237. }
  238. }
  239. protected String familyName;
  240. public String getGivenName() {
  241. return givenName;
  242. }
  243. public void setGivenName(String givenName) {
  244. this.givenName = givenName;
  245. }
  246. public void setGivenName(
  247. UnsafeSupplier<String, Exception> givenNameUnsafeSupplier) {
  248. try {
  249. givenName = givenNameUnsafeSupplier.get();
  250. }
  251. catch (Exception e) {
  252. throw new RuntimeException(e);
  253. }
  254. }
  255. protected String givenName;
  256. public String getHonorificPrefix() {
  257. return honorificPrefix;
  258. }
  259. public void setHonorificPrefix(String honorificPrefix) {
  260. this.honorificPrefix = honorificPrefix;
  261. }
  262. public void setHonorificPrefix(
  263. UnsafeSupplier<String, Exception> honorificPrefixUnsafeSupplier) {
  264. try {
  265. honorificPrefix = honorificPrefixUnsafeSupplier.get();
  266. }
  267. catch (Exception e) {
  268. throw new RuntimeException(e);
  269. }
  270. }
  271. protected String honorificPrefix;
  272. public String getHonorificSuffix() {
  273. return honorificSuffix;
  274. }
  275. public void setHonorificSuffix(String honorificSuffix) {
  276. this.honorificSuffix = honorificSuffix;
  277. }
  278. public void setHonorificSuffix(
  279. UnsafeSupplier<String, Exception> honorificSuffixUnsafeSupplier) {
  280. try {
  281. honorificSuffix = honorificSuffixUnsafeSupplier.get();
  282. }
  283. catch (Exception e) {
  284. throw new RuntimeException(e);
  285. }
  286. }
  287. protected String honorificSuffix;
  288. public Long getId() {
  289. return id;
  290. }
  291. public void setId(Long id) {
  292. this.id = id;
  293. }
  294. public void setId(UnsafeSupplier<Long, Exception> idUnsafeSupplier) {
  295. try {
  296. id = idUnsafeSupplier.get();
  297. }
  298. catch (Exception e) {
  299. throw new RuntimeException(e);
  300. }
  301. }
  302. protected Long id;
  303. public String getImage() {
  304. return image;
  305. }
  306. public void setImage(String image) {
  307. this.image = image;
  308. }
  309. public void setImage(
  310. UnsafeSupplier<String, Exception> imageUnsafeSupplier) {
  311. try {
  312. image = imageUnsafeSupplier.get();
  313. }
  314. catch (Exception e) {
  315. throw new RuntimeException(e);
  316. }
  317. }
  318. protected String image;
  319. public String getJobTitle() {
  320. return jobTitle;
  321. }
  322. public void setJobTitle(String jobTitle) {
  323. this.jobTitle = jobTitle;
  324. }
  325. public void setJobTitle(
  326. UnsafeSupplier<String, Exception> jobTitleUnsafeSupplier) {
  327. try {
  328. jobTitle = jobTitleUnsafeSupplier.get();
  329. }
  330. catch (Exception e) {
  331. throw new RuntimeException(e);
  332. }
  333. }
  334. protected String jobTitle;
  335. public String[] getKeywords() {
  336. return keywords;
  337. }
  338. public void setKeywords(String[] keywords) {
  339. this.keywords = keywords;
  340. }
  341. public void setKeywords(
  342. UnsafeSupplier<String[], Exception> keywordsUnsafeSupplier) {
  343. try {
  344. keywords = keywordsUnsafeSupplier.get();
  345. }
  346. catch (Exception e) {
  347. throw new RuntimeException(e);
  348. }
  349. }
  350. protected String[] keywords;
  351. public Date getLastLoginDate() {
  352. return lastLoginDate;
  353. }
  354. public void setLastLoginDate(Date lastLoginDate) {
  355. this.lastLoginDate = lastLoginDate;
  356. }
  357. public void setLastLoginDate(
  358. UnsafeSupplier<Date, Exception> lastLoginDateUnsafeSupplier) {
  359. try {
  360. lastLoginDate = lastLoginDateUnsafeSupplier.get();
  361. }
  362. catch (Exception e) {
  363. throw new RuntimeException(e);
  364. }
  365. }
  366. protected Date lastLoginDate;
  367. public String getName() {
  368. return name;
  369. }
  370. public void setName(String name) {
  371. this.name = name;
  372. }
  373. public void setName(UnsafeSupplier<String, Exception> nameUnsafeSupplier) {
  374. try {
  375. name = nameUnsafeSupplier.get();
  376. }
  377. catch (Exception e) {
  378. throw new RuntimeException(e);
  379. }
  380. }
  381. protected String name;
  382. public OrganizationBrief[] getOrganizationBriefs() {
  383. return organizationBriefs;
  384. }
  385. public void setOrganizationBriefs(OrganizationBrief[] organizationBriefs) {
  386. this.organizationBriefs = organizationBriefs;
  387. }
  388. public void setOrganizationBriefs(
  389. UnsafeSupplier<OrganizationBrief[], Exception>
  390. organizationBriefsUnsafeSupplier) {
  391. try {
  392. organizationBriefs = organizationBriefsUnsafeSupplier.get();
  393. }
  394. catch (Exception e) {
  395. throw new RuntimeException(e);
  396. }
  397. }
  398. protected OrganizationBrief[] organizationBriefs;
  399. public String getPassword() {
  400. return password;
  401. }
  402. public void setPassword(String password) {
  403. this.password = password;
  404. }
  405. public void setPassword(
  406. UnsafeSupplier<String, Exception> passwordUnsafeSupplier) {
  407. try {
  408. password = passwordUnsafeSupplier.get();
  409. }
  410. catch (Exception e) {
  411. throw new RuntimeException(e);
  412. }
  413. }
  414. protected String password;
  415. public String getProfileURL() {
  416. return profileURL;
  417. }
  418. public void setProfileURL(String profileURL) {
  419. this.profileURL = profileURL;
  420. }
  421. public void setProfileURL(
  422. UnsafeSupplier<String, Exception> profileURLUnsafeSupplier) {
  423. try {
  424. profileURL = profileURLUnsafeSupplier.get();
  425. }
  426. catch (Exception e) {
  427. throw new RuntimeException(e);
  428. }
  429. }
  430. protected String profileURL;
  431. public RoleBrief[] getRoleBriefs() {
  432. return roleBriefs;
  433. }
  434. public void setRoleBriefs(RoleBrief[] roleBriefs) {
  435. this.roleBriefs = roleBriefs;
  436. }
  437. public void setRoleBriefs(
  438. UnsafeSupplier<RoleBrief[], Exception> roleBriefsUnsafeSupplier) {
  439. try {
  440. roleBriefs = roleBriefsUnsafeSupplier.get();
  441. }
  442. catch (Exception e) {
  443. throw new RuntimeException(e);
  444. }
  445. }
  446. protected RoleBrief[] roleBriefs;
  447. public SiteBrief[] getSiteBriefs() {
  448. return siteBriefs;
  449. }
  450. public void setSiteBriefs(SiteBrief[] siteBriefs) {
  451. this.siteBriefs = siteBriefs;
  452. }
  453. public void setSiteBriefs(
  454. UnsafeSupplier<SiteBrief[], Exception> siteBriefsUnsafeSupplier) {
  455. try {
  456. siteBriefs = siteBriefsUnsafeSupplier.get();
  457. }
  458. catch (Exception e) {
  459. throw new RuntimeException(e);
  460. }
  461. }
  462. protected SiteBrief[] siteBriefs;
  463. public UserAccountContactInformation getUserAccountContactInformation() {
  464. return userAccountContactInformation;
  465. }
  466. public void setUserAccountContactInformation(
  467. UserAccountContactInformation userAccountContactInformation) {
  468. this.userAccountContactInformation = userAccountContactInformation;
  469. }
  470. public void setUserAccountContactInformation(
  471. UnsafeSupplier<UserAccountContactInformation, Exception>
  472. userAccountContactInformationUnsafeSupplier) {
  473. try {
  474. userAccountContactInformation =
  475. userAccountContactInformationUnsafeSupplier.get();
  476. }
  477. catch (Exception e) {
  478. throw new RuntimeException(e);
  479. }
  480. }
  481. protected UserAccountContactInformation userAccountContactInformation;
  482. @Override
  483. public UserAccount clone() throws CloneNotSupportedException {
  484. return (UserAccount)super.clone();
  485. }
  486. @Override
  487. public boolean equals(Object object) {
  488. if (this == object) {
  489. return true;
  490. }
  491. if (!(object instanceof UserAccount)) {
  492. return false;
  493. }
  494. UserAccount userAccount = (UserAccount)object;
  495. return Objects.equals(toString(), userAccount.toString());
  496. }
  497. @Override
  498. public int hashCode() {
  499. String string = toString();
  500. return string.hashCode();
  501. }
  502. public String toString() {
  503. return UserAccountSerDes.toJSON(this);
  504. }
  505. }