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