1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class PhoneLocalServiceUtil {
42 public static com.liferay.portal.model.Phone addPhone(
43 com.liferay.portal.model.Phone phone)
44 throws com.liferay.portal.SystemException {
45 return getService().addPhone(phone);
46 }
47
48 public static com.liferay.portal.model.Phone createPhone(long phoneId) {
49 return getService().createPhone(phoneId);
50 }
51
52 public static void deletePhone(long phoneId)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 getService().deletePhone(phoneId);
56 }
57
58 public static void deletePhone(com.liferay.portal.model.Phone phone)
59 throws com.liferay.portal.SystemException {
60 getService().deletePhone(phone);
61 }
62
63 @SuppressWarnings("rawtypes")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("rawtypes")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("rawtypes")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static int dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portal.model.Phone getPhone(long phoneId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getPhone(phoneId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Phone> getPhones(
100 int start, int end) throws com.liferay.portal.SystemException {
101 return getService().getPhones(start, end);
102 }
103
104 public static int getPhonesCount()
105 throws com.liferay.portal.SystemException {
106 return getService().getPhonesCount();
107 }
108
109 public static com.liferay.portal.model.Phone updatePhone(
110 com.liferay.portal.model.Phone phone)
111 throws com.liferay.portal.SystemException {
112 return getService().updatePhone(phone);
113 }
114
115 public static com.liferay.portal.model.Phone updatePhone(
116 com.liferay.portal.model.Phone phone, boolean merge)
117 throws com.liferay.portal.SystemException {
118 return getService().updatePhone(phone, merge);
119 }
120
121 public static com.liferay.portal.model.Phone addPhone(long userId,
122 java.lang.String className, long classPK, java.lang.String number,
123 java.lang.String extension, int typeId, boolean primary)
124 throws com.liferay.portal.PortalException,
125 com.liferay.portal.SystemException {
126 return getService()
127 .addPhone(userId, className, classPK, number, extension,
128 typeId, primary);
129 }
130
131 public static void deletePhones(long companyId, java.lang.String className,
132 long classPK) throws com.liferay.portal.SystemException {
133 getService().deletePhones(companyId, className, classPK);
134 }
135
136 public static java.util.List<com.liferay.portal.model.Phone> getPhones()
137 throws com.liferay.portal.SystemException {
138 return getService().getPhones();
139 }
140
141 public static java.util.List<com.liferay.portal.model.Phone> getPhones(
142 long companyId, java.lang.String className, long classPK)
143 throws com.liferay.portal.SystemException {
144 return getService().getPhones(companyId, className, classPK);
145 }
146
147 public static com.liferay.portal.model.Phone updatePhone(long phoneId,
148 java.lang.String number, java.lang.String extension, int typeId,
149 boolean primary)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 return getService()
153 .updatePhone(phoneId, number, extension, typeId, primary);
154 }
155
156 public static PhoneLocalService getService() {
157 if (_service == null) {
158 _service = (PhoneLocalService)PortalBeanLocatorUtil.locate(PhoneLocalService.class.getName());
159
160 ReferenceRegistry.registerReference(PhoneLocalServiceUtil.class,
161 "_service");
162 MethodCache.remove(PhoneLocalService.class);
163 }
164
165 return _service;
166 }
167
168 public void setService(PhoneLocalService service) {
169 MethodCache.remove(PhoneLocalService.class);
170
171 _service = service;
172
173 ReferenceRegistry.registerReference(PhoneLocalServiceUtil.class,
174 "_service");
175 MethodCache.remove(PhoneLocalService.class);
176 }
177
178 private static PhoneLocalService _service;
179 }