1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class EmailAddressServiceUtil {
40 public static com.liferay.portal.model.EmailAddress addEmailAddress(
41 java.lang.String className, long classPK, java.lang.String address,
42 int typeId, boolean primary)
43 throws com.liferay.portal.kernel.exception.PortalException,
44 com.liferay.portal.kernel.exception.SystemException {
45 return getService()
46 .addEmailAddress(className, classPK, address, typeId, primary);
47 }
48
49 public static void deleteEmailAddress(long emailAddressId)
50 throws com.liferay.portal.kernel.exception.PortalException,
51 com.liferay.portal.kernel.exception.SystemException {
52 getService().deleteEmailAddress(emailAddressId);
53 }
54
55 public static com.liferay.portal.model.EmailAddress getEmailAddress(
56 long emailAddressId)
57 throws com.liferay.portal.kernel.exception.PortalException,
58 com.liferay.portal.kernel.exception.SystemException {
59 return getService().getEmailAddress(emailAddressId);
60 }
61
62 public static java.util.List<com.liferay.portal.model.EmailAddress> getEmailAddresses(
63 java.lang.String className, long classPK)
64 throws com.liferay.portal.kernel.exception.PortalException,
65 com.liferay.portal.kernel.exception.SystemException {
66 return getService().getEmailAddresses(className, classPK);
67 }
68
69 public static com.liferay.portal.model.EmailAddress updateEmailAddress(
70 long emailAddressId, java.lang.String address, int typeId,
71 boolean primary)
72 throws com.liferay.portal.kernel.exception.PortalException,
73 com.liferay.portal.kernel.exception.SystemException {
74 return getService()
75 .updateEmailAddress(emailAddressId, address, typeId, primary);
76 }
77
78 public static EmailAddressService getService() {
79 if (_service == null) {
80 _service = (EmailAddressService)PortalBeanLocatorUtil.locate(EmailAddressService.class.getName());
81 }
82
83 return _service;
84 }
85
86 public void setService(EmailAddressService service) {
87 _service = service;
88 }
89
90 private static EmailAddressService _service;
91 }