1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19 import com.liferay.portal.kernel.exception.SystemException;
20 import com.liferay.portal.model.Phone;
21
22 import java.util.List;
23
24
37 public class PhoneUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57 int start, int end) throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59 }
60
61
64 public static Phone remove(Phone phone) throws SystemException {
65 return getPersistence().remove(phone);
66 }
67
68
71 public static Phone update(Phone phone, boolean merge)
72 throws SystemException {
73 return getPersistence().update(phone, merge);
74 }
75
76 public static void cacheResult(com.liferay.portal.model.Phone phone) {
77 getPersistence().cacheResult(phone);
78 }
79
80 public static void cacheResult(
81 java.util.List<com.liferay.portal.model.Phone> phones) {
82 getPersistence().cacheResult(phones);
83 }
84
85 public static com.liferay.portal.model.Phone create(long phoneId) {
86 return getPersistence().create(phoneId);
87 }
88
89 public static com.liferay.portal.model.Phone remove(long phoneId)
90 throws com.liferay.portal.NoSuchPhoneException,
91 com.liferay.portal.kernel.exception.SystemException {
92 return getPersistence().remove(phoneId);
93 }
94
95 public static com.liferay.portal.model.Phone updateImpl(
96 com.liferay.portal.model.Phone phone, boolean merge)
97 throws com.liferay.portal.kernel.exception.SystemException {
98 return getPersistence().updateImpl(phone, merge);
99 }
100
101 public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
102 throws com.liferay.portal.NoSuchPhoneException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().findByPrimaryKey(phoneId);
105 }
106
107 public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
108 throws com.liferay.portal.kernel.exception.SystemException {
109 return getPersistence().fetchByPrimaryKey(phoneId);
110 }
111
112 public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
113 long companyId)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getPersistence().findByCompanyId(companyId);
116 }
117
118 public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
119 long companyId, int start, int end)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getPersistence().findByCompanyId(companyId, start, end);
122 }
123
124 public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
125 long companyId, int start, int end,
126 com.liferay.portal.kernel.util.OrderByComparator obc)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().findByCompanyId(companyId, start, end, obc);
129 }
130
131 public static com.liferay.portal.model.Phone findByCompanyId_First(
132 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
133 throws com.liferay.portal.NoSuchPhoneException,
134 com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findByCompanyId_First(companyId, obc);
136 }
137
138 public static com.liferay.portal.model.Phone findByCompanyId_Last(
139 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
140 throws com.liferay.portal.NoSuchPhoneException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().findByCompanyId_Last(companyId, obc);
143 }
144
145 public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
146 long phoneId, long companyId,
147 com.liferay.portal.kernel.util.OrderByComparator obc)
148 throws com.liferay.portal.NoSuchPhoneException,
149 com.liferay.portal.kernel.exception.SystemException {
150 return getPersistence()
151 .findByCompanyId_PrevAndNext(phoneId, companyId, obc);
152 }
153
154 public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
155 long userId) throws com.liferay.portal.kernel.exception.SystemException {
156 return getPersistence().findByUserId(userId);
157 }
158
159 public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
160 long userId, int start, int end)
161 throws com.liferay.portal.kernel.exception.SystemException {
162 return getPersistence().findByUserId(userId, start, end);
163 }
164
165 public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
166 long userId, int start, int end,
167 com.liferay.portal.kernel.util.OrderByComparator obc)
168 throws com.liferay.portal.kernel.exception.SystemException {
169 return getPersistence().findByUserId(userId, start, end, obc);
170 }
171
172 public static com.liferay.portal.model.Phone findByUserId_First(
173 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
174 throws com.liferay.portal.NoSuchPhoneException,
175 com.liferay.portal.kernel.exception.SystemException {
176 return getPersistence().findByUserId_First(userId, obc);
177 }
178
179 public static com.liferay.portal.model.Phone findByUserId_Last(
180 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
181 throws com.liferay.portal.NoSuchPhoneException,
182 com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence().findByUserId_Last(userId, obc);
184 }
185
186 public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
187 long phoneId, long userId,
188 com.liferay.portal.kernel.util.OrderByComparator obc)
189 throws com.liferay.portal.NoSuchPhoneException,
190 com.liferay.portal.kernel.exception.SystemException {
191 return getPersistence().findByUserId_PrevAndNext(phoneId, userId, obc);
192 }
193
194 public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
195 long companyId, long classNameId)
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getPersistence().findByC_C(companyId, classNameId);
198 }
199
200 public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
201 long companyId, long classNameId, int start, int end)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getPersistence().findByC_C(companyId, classNameId, start, end);
204 }
205
206 public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
207 long companyId, long classNameId, int start, int end,
208 com.liferay.portal.kernel.util.OrderByComparator obc)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence()
211 .findByC_C(companyId, classNameId, start, end, obc);
212 }
213
214 public static com.liferay.portal.model.Phone findByC_C_First(
215 long companyId, long classNameId,
216 com.liferay.portal.kernel.util.OrderByComparator obc)
217 throws com.liferay.portal.NoSuchPhoneException,
218 com.liferay.portal.kernel.exception.SystemException {
219 return getPersistence().findByC_C_First(companyId, classNameId, obc);
220 }
221
222 public static com.liferay.portal.model.Phone findByC_C_Last(
223 long companyId, long classNameId,
224 com.liferay.portal.kernel.util.OrderByComparator obc)
225 throws com.liferay.portal.NoSuchPhoneException,
226 com.liferay.portal.kernel.exception.SystemException {
227 return getPersistence().findByC_C_Last(companyId, classNameId, obc);
228 }
229
230 public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
231 long phoneId, long companyId, long classNameId,
232 com.liferay.portal.kernel.util.OrderByComparator obc)
233 throws com.liferay.portal.NoSuchPhoneException,
234 com.liferay.portal.kernel.exception.SystemException {
235 return getPersistence()
236 .findByC_C_PrevAndNext(phoneId, companyId, classNameId, obc);
237 }
238
239 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
240 long companyId, long classNameId, long classPK)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
243 }
244
245 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
246 long companyId, long classNameId, long classPK, int start, int end)
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return getPersistence()
249 .findByC_C_C(companyId, classNameId, classPK, start, end);
250 }
251
252 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
253 long companyId, long classNameId, long classPK, int start, int end,
254 com.liferay.portal.kernel.util.OrderByComparator obc)
255 throws com.liferay.portal.kernel.exception.SystemException {
256 return getPersistence()
257 .findByC_C_C(companyId, classNameId, classPK, start, end, obc);
258 }
259
260 public static com.liferay.portal.model.Phone findByC_C_C_First(
261 long companyId, long classNameId, long classPK,
262 com.liferay.portal.kernel.util.OrderByComparator obc)
263 throws com.liferay.portal.NoSuchPhoneException,
264 com.liferay.portal.kernel.exception.SystemException {
265 return getPersistence()
266 .findByC_C_C_First(companyId, classNameId, classPK, obc);
267 }
268
269 public static com.liferay.portal.model.Phone findByC_C_C_Last(
270 long companyId, long classNameId, long classPK,
271 com.liferay.portal.kernel.util.OrderByComparator obc)
272 throws com.liferay.portal.NoSuchPhoneException,
273 com.liferay.portal.kernel.exception.SystemException {
274 return getPersistence()
275 .findByC_C_C_Last(companyId, classNameId, classPK, obc);
276 }
277
278 public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
279 long phoneId, long companyId, long classNameId, long classPK,
280 com.liferay.portal.kernel.util.OrderByComparator obc)
281 throws com.liferay.portal.NoSuchPhoneException,
282 com.liferay.portal.kernel.exception.SystemException {
283 return getPersistence()
284 .findByC_C_C_PrevAndNext(phoneId, companyId, classNameId,
285 classPK, obc);
286 }
287
288 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
289 long companyId, long classNameId, long classPK, boolean primary)
290 throws com.liferay.portal.kernel.exception.SystemException {
291 return getPersistence()
292 .findByC_C_C_P(companyId, classNameId, classPK, primary);
293 }
294
295 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
296 long companyId, long classNameId, long classPK, boolean primary,
297 int start, int end)
298 throws com.liferay.portal.kernel.exception.SystemException {
299 return getPersistence()
300 .findByC_C_C_P(companyId, classNameId, classPK, primary,
301 start, end);
302 }
303
304 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
305 long companyId, long classNameId, long classPK, boolean primary,
306 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
307 throws com.liferay.portal.kernel.exception.SystemException {
308 return getPersistence()
309 .findByC_C_C_P(companyId, classNameId, classPK, primary,
310 start, end, obc);
311 }
312
313 public static com.liferay.portal.model.Phone findByC_C_C_P_First(
314 long companyId, long classNameId, long classPK, boolean primary,
315 com.liferay.portal.kernel.util.OrderByComparator obc)
316 throws com.liferay.portal.NoSuchPhoneException,
317 com.liferay.portal.kernel.exception.SystemException {
318 return getPersistence()
319 .findByC_C_C_P_First(companyId, classNameId, classPK,
320 primary, obc);
321 }
322
323 public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
324 long companyId, long classNameId, long classPK, boolean primary,
325 com.liferay.portal.kernel.util.OrderByComparator obc)
326 throws com.liferay.portal.NoSuchPhoneException,
327 com.liferay.portal.kernel.exception.SystemException {
328 return getPersistence()
329 .findByC_C_C_P_Last(companyId, classNameId, classPK,
330 primary, obc);
331 }
332
333 public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
334 long phoneId, long companyId, long classNameId, long classPK,
335 boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
336 throws com.liferay.portal.NoSuchPhoneException,
337 com.liferay.portal.kernel.exception.SystemException {
338 return getPersistence()
339 .findByC_C_C_P_PrevAndNext(phoneId, companyId, classNameId,
340 classPK, primary, obc);
341 }
342
343 public static java.util.List<com.liferay.portal.model.Phone> findAll()
344 throws com.liferay.portal.kernel.exception.SystemException {
345 return getPersistence().findAll();
346 }
347
348 public static java.util.List<com.liferay.portal.model.Phone> findAll(
349 int start, int end)
350 throws com.liferay.portal.kernel.exception.SystemException {
351 return getPersistence().findAll(start, end);
352 }
353
354 public static java.util.List<com.liferay.portal.model.Phone> findAll(
355 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
356 throws com.liferay.portal.kernel.exception.SystemException {
357 return getPersistence().findAll(start, end, obc);
358 }
359
360 public static void removeByCompanyId(long companyId)
361 throws com.liferay.portal.kernel.exception.SystemException {
362 getPersistence().removeByCompanyId(companyId);
363 }
364
365 public static void removeByUserId(long userId)
366 throws com.liferay.portal.kernel.exception.SystemException {
367 getPersistence().removeByUserId(userId);
368 }
369
370 public static void removeByC_C(long companyId, long classNameId)
371 throws com.liferay.portal.kernel.exception.SystemException {
372 getPersistence().removeByC_C(companyId, classNameId);
373 }
374
375 public static void removeByC_C_C(long companyId, long classNameId,
376 long classPK)
377 throws com.liferay.portal.kernel.exception.SystemException {
378 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
379 }
380
381 public static void removeByC_C_C_P(long companyId, long classNameId,
382 long classPK, boolean primary)
383 throws com.liferay.portal.kernel.exception.SystemException {
384 getPersistence()
385 .removeByC_C_C_P(companyId, classNameId, classPK, primary);
386 }
387
388 public static void removeAll()
389 throws com.liferay.portal.kernel.exception.SystemException {
390 getPersistence().removeAll();
391 }
392
393 public static int countByCompanyId(long companyId)
394 throws com.liferay.portal.kernel.exception.SystemException {
395 return getPersistence().countByCompanyId(companyId);
396 }
397
398 public static int countByUserId(long userId)
399 throws com.liferay.portal.kernel.exception.SystemException {
400 return getPersistence().countByUserId(userId);
401 }
402
403 public static int countByC_C(long companyId, long classNameId)
404 throws com.liferay.portal.kernel.exception.SystemException {
405 return getPersistence().countByC_C(companyId, classNameId);
406 }
407
408 public static int countByC_C_C(long companyId, long classNameId,
409 long classPK)
410 throws com.liferay.portal.kernel.exception.SystemException {
411 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
412 }
413
414 public static int countByC_C_C_P(long companyId, long classNameId,
415 long classPK, boolean primary)
416 throws com.liferay.portal.kernel.exception.SystemException {
417 return getPersistence()
418 .countByC_C_C_P(companyId, classNameId, classPK, primary);
419 }
420
421 public static int countAll()
422 throws com.liferay.portal.kernel.exception.SystemException {
423 return getPersistence().countAll();
424 }
425
426 public static PhonePersistence getPersistence() {
427 if (_persistence == null) {
428 _persistence = (PhonePersistence)PortalBeanLocatorUtil.locate(PhonePersistence.class.getName());
429 }
430
431 return _persistence;
432 }
433
434 public void setPersistence(PhonePersistence persistence) {
435 _persistence = persistence;
436 }
437
438 private static PhonePersistence _persistence;
439 }