1
22
23 package com.liferay.portal.service;
24
25
26
46 public class PhoneServiceUtil {
47 public static com.liferay.portal.model.Phone addPhone(
48 java.lang.String className, long classPK, java.lang.String number,
49 java.lang.String extension, int typeId, boolean primary)
50 throws com.liferay.portal.PortalException,
51 com.liferay.portal.SystemException, java.rmi.RemoteException {
52 return getService()
53 .addPhone(className, classPK, number, extension, typeId,
54 primary);
55 }
56
57 public static void deletePhone(long phoneId)
58 throws com.liferay.portal.PortalException,
59 com.liferay.portal.SystemException, java.rmi.RemoteException {
60 getService().deletePhone(phoneId);
61 }
62
63 public static com.liferay.portal.model.Phone getPhone(long phoneId)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException, java.rmi.RemoteException {
66 return getService().getPhone(phoneId);
67 }
68
69 public static java.util.List<com.liferay.portal.model.Phone> getPhones(
70 java.lang.String className, long classPK)
71 throws com.liferay.portal.PortalException,
72 com.liferay.portal.SystemException, java.rmi.RemoteException {
73 return getService().getPhones(className, classPK);
74 }
75
76 public static com.liferay.portal.model.Phone updatePhone(long phoneId,
77 java.lang.String number, java.lang.String extension, int typeId,
78 boolean primary)
79 throws com.liferay.portal.PortalException,
80 com.liferay.portal.SystemException, java.rmi.RemoteException {
81 return getService()
82 .updatePhone(phoneId, number, extension, typeId, primary);
83 }
84
85 public static PhoneService getService() {
86 if (_service == null) {
87 throw new RuntimeException("PhoneService is not set");
88 }
89
90 return _service;
91 }
92
93 public void setService(PhoneService service) {
94 _service = service;
95 }
96
97 private static PhoneService _service;
98 }