001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class PhoneServiceUtil {
033 public static com.liferay.portal.model.Phone addPhone(
034 java.lang.String className, long classPK, java.lang.String number,
035 java.lang.String extension, int typeId, boolean primary)
036 throws com.liferay.portal.kernel.exception.PortalException,
037 com.liferay.portal.kernel.exception.SystemException {
038 return getService()
039 .addPhone(className, classPK, number, extension, typeId,
040 primary);
041 }
042
043 public static void deletePhone(long phoneId)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 getService().deletePhone(phoneId);
047 }
048
049 public static com.liferay.portal.model.Phone getPhone(long phoneId)
050 throws com.liferay.portal.kernel.exception.PortalException,
051 com.liferay.portal.kernel.exception.SystemException {
052 return getService().getPhone(phoneId);
053 }
054
055 public static java.util.List<com.liferay.portal.model.Phone> getPhones(
056 java.lang.String className, long classPK)
057 throws com.liferay.portal.kernel.exception.PortalException,
058 com.liferay.portal.kernel.exception.SystemException {
059 return getService().getPhones(className, classPK);
060 }
061
062 public static com.liferay.portal.model.Phone updatePhone(long phoneId,
063 java.lang.String number, java.lang.String extension, int typeId,
064 boolean primary)
065 throws com.liferay.portal.kernel.exception.PortalException,
066 com.liferay.portal.kernel.exception.SystemException {
067 return getService()
068 .updatePhone(phoneId, number, extension, typeId, primary);
069 }
070
071 public static PhoneService getService() {
072 if (_service == null) {
073 _service = (PhoneService)PortalBeanLocatorUtil.locate(PhoneService.class.getName());
074 }
075
076 return _service;
077 }
078
079 public void setService(PhoneService service) {
080 _service = service;
081 }
082
083 private static PhoneService _service;
084 }