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.Organization;
21
22 import java.util.List;
23
24
37 public class OrganizationUtil {
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 Organization remove(Organization organization)
65 throws SystemException {
66 return getPersistence().remove(organization);
67 }
68
69
72 public static Organization update(Organization organization, boolean merge)
73 throws SystemException {
74 return getPersistence().update(organization, merge);
75 }
76
77 public static void cacheResult(
78 com.liferay.portal.model.Organization organization) {
79 getPersistence().cacheResult(organization);
80 }
81
82 public static void cacheResult(
83 java.util.List<com.liferay.portal.model.Organization> organizations) {
84 getPersistence().cacheResult(organizations);
85 }
86
87 public static com.liferay.portal.model.Organization create(
88 long organizationId) {
89 return getPersistence().create(organizationId);
90 }
91
92 public static com.liferay.portal.model.Organization remove(
93 long organizationId)
94 throws com.liferay.portal.NoSuchOrganizationException,
95 com.liferay.portal.kernel.exception.SystemException {
96 return getPersistence().remove(organizationId);
97 }
98
99 public static com.liferay.portal.model.Organization updateImpl(
100 com.liferay.portal.model.Organization organization, boolean merge)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getPersistence().updateImpl(organization, merge);
103 }
104
105 public static com.liferay.portal.model.Organization findByPrimaryKey(
106 long organizationId)
107 throws com.liferay.portal.NoSuchOrganizationException,
108 com.liferay.portal.kernel.exception.SystemException {
109 return getPersistence().findByPrimaryKey(organizationId);
110 }
111
112 public static com.liferay.portal.model.Organization fetchByPrimaryKey(
113 long organizationId)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getPersistence().fetchByPrimaryKey(organizationId);
116 }
117
118 public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
119 long companyId)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getPersistence().findByCompanyId(companyId);
122 }
123
124 public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
125 long companyId, int start, int end)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getPersistence().findByCompanyId(companyId, start, end);
128 }
129
130 public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
131 long companyId, int start, int end,
132 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getPersistence()
135 .findByCompanyId(companyId, start, end, orderByComparator);
136 }
137
138 public static com.liferay.portal.model.Organization findByCompanyId_First(
139 long companyId,
140 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141 throws com.liferay.portal.NoSuchOrganizationException,
142 com.liferay.portal.kernel.exception.SystemException {
143 return getPersistence()
144 .findByCompanyId_First(companyId, orderByComparator);
145 }
146
147 public static com.liferay.portal.model.Organization findByCompanyId_Last(
148 long companyId,
149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150 throws com.liferay.portal.NoSuchOrganizationException,
151 com.liferay.portal.kernel.exception.SystemException {
152 return getPersistence()
153 .findByCompanyId_Last(companyId, orderByComparator);
154 }
155
156 public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
157 long organizationId, long companyId,
158 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159 throws com.liferay.portal.NoSuchOrganizationException,
160 com.liferay.portal.kernel.exception.SystemException {
161 return getPersistence()
162 .findByCompanyId_PrevAndNext(organizationId, companyId,
163 orderByComparator);
164 }
165
166 public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
167 long companyId)
168 throws com.liferay.portal.kernel.exception.SystemException {
169 return getPersistence().findByLocations(companyId);
170 }
171
172 public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
173 long companyId, int start, int end)
174 throws com.liferay.portal.kernel.exception.SystemException {
175 return getPersistence().findByLocations(companyId, start, end);
176 }
177
178 public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
179 long companyId, int start, int end,
180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence()
183 .findByLocations(companyId, start, end, orderByComparator);
184 }
185
186 public static com.liferay.portal.model.Organization findByLocations_First(
187 long companyId,
188 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189 throws com.liferay.portal.NoSuchOrganizationException,
190 com.liferay.portal.kernel.exception.SystemException {
191 return getPersistence()
192 .findByLocations_First(companyId, orderByComparator);
193 }
194
195 public static com.liferay.portal.model.Organization findByLocations_Last(
196 long companyId,
197 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198 throws com.liferay.portal.NoSuchOrganizationException,
199 com.liferay.portal.kernel.exception.SystemException {
200 return getPersistence()
201 .findByLocations_Last(companyId, orderByComparator);
202 }
203
204 public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
205 long organizationId, long companyId,
206 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207 throws com.liferay.portal.NoSuchOrganizationException,
208 com.liferay.portal.kernel.exception.SystemException {
209 return getPersistence()
210 .findByLocations_PrevAndNext(organizationId, companyId,
211 orderByComparator);
212 }
213
214 public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
215 long companyId, long parentOrganizationId)
216 throws com.liferay.portal.kernel.exception.SystemException {
217 return getPersistence().findByC_P(companyId, parentOrganizationId);
218 }
219
220 public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
221 long companyId, long parentOrganizationId, int start, int end)
222 throws com.liferay.portal.kernel.exception.SystemException {
223 return getPersistence()
224 .findByC_P(companyId, parentOrganizationId, start, end);
225 }
226
227 public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
228 long companyId, long parentOrganizationId, int start, int end,
229 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return getPersistence()
232 .findByC_P(companyId, parentOrganizationId, start, end,
233 orderByComparator);
234 }
235
236 public static com.liferay.portal.model.Organization findByC_P_First(
237 long companyId, long parentOrganizationId,
238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
239 throws com.liferay.portal.NoSuchOrganizationException,
240 com.liferay.portal.kernel.exception.SystemException {
241 return getPersistence()
242 .findByC_P_First(companyId, parentOrganizationId,
243 orderByComparator);
244 }
245
246 public static com.liferay.portal.model.Organization findByC_P_Last(
247 long companyId, long parentOrganizationId,
248 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249 throws com.liferay.portal.NoSuchOrganizationException,
250 com.liferay.portal.kernel.exception.SystemException {
251 return getPersistence()
252 .findByC_P_Last(companyId, parentOrganizationId,
253 orderByComparator);
254 }
255
256 public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
257 long organizationId, long companyId, long parentOrganizationId,
258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259 throws com.liferay.portal.NoSuchOrganizationException,
260 com.liferay.portal.kernel.exception.SystemException {
261 return getPersistence()
262 .findByC_P_PrevAndNext(organizationId, companyId,
263 parentOrganizationId, orderByComparator);
264 }
265
266 public static com.liferay.portal.model.Organization findByC_N(
267 long companyId, java.lang.String name)
268 throws com.liferay.portal.NoSuchOrganizationException,
269 com.liferay.portal.kernel.exception.SystemException {
270 return getPersistence().findByC_N(companyId, name);
271 }
272
273 public static com.liferay.portal.model.Organization fetchByC_N(
274 long companyId, java.lang.String name)
275 throws com.liferay.portal.kernel.exception.SystemException {
276 return getPersistence().fetchByC_N(companyId, name);
277 }
278
279 public static com.liferay.portal.model.Organization fetchByC_N(
280 long companyId, java.lang.String name, boolean retrieveFromCache)
281 throws com.liferay.portal.kernel.exception.SystemException {
282 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
283 }
284
285 public static java.util.List<com.liferay.portal.model.Organization> findAll()
286 throws com.liferay.portal.kernel.exception.SystemException {
287 return getPersistence().findAll();
288 }
289
290 public static java.util.List<com.liferay.portal.model.Organization> findAll(
291 int start, int end)
292 throws com.liferay.portal.kernel.exception.SystemException {
293 return getPersistence().findAll(start, end);
294 }
295
296 public static java.util.List<com.liferay.portal.model.Organization> findAll(
297 int start, int end,
298 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
299 throws com.liferay.portal.kernel.exception.SystemException {
300 return getPersistence().findAll(start, end, orderByComparator);
301 }
302
303 public static void removeByCompanyId(long companyId)
304 throws com.liferay.portal.kernel.exception.SystemException {
305 getPersistence().removeByCompanyId(companyId);
306 }
307
308 public static void removeByLocations(long companyId)
309 throws com.liferay.portal.kernel.exception.SystemException {
310 getPersistence().removeByLocations(companyId);
311 }
312
313 public static void removeByC_P(long companyId, long parentOrganizationId)
314 throws com.liferay.portal.kernel.exception.SystemException {
315 getPersistence().removeByC_P(companyId, parentOrganizationId);
316 }
317
318 public static void removeByC_N(long companyId, java.lang.String name)
319 throws com.liferay.portal.NoSuchOrganizationException,
320 com.liferay.portal.kernel.exception.SystemException {
321 getPersistence().removeByC_N(companyId, name);
322 }
323
324 public static void removeAll()
325 throws com.liferay.portal.kernel.exception.SystemException {
326 getPersistence().removeAll();
327 }
328
329 public static int countByCompanyId(long companyId)
330 throws com.liferay.portal.kernel.exception.SystemException {
331 return getPersistence().countByCompanyId(companyId);
332 }
333
334 public static int countByLocations(long companyId)
335 throws com.liferay.portal.kernel.exception.SystemException {
336 return getPersistence().countByLocations(companyId);
337 }
338
339 public static int countByC_P(long companyId, long parentOrganizationId)
340 throws com.liferay.portal.kernel.exception.SystemException {
341 return getPersistence().countByC_P(companyId, parentOrganizationId);
342 }
343
344 public static int countByC_N(long companyId, java.lang.String name)
345 throws com.liferay.portal.kernel.exception.SystemException {
346 return getPersistence().countByC_N(companyId, name);
347 }
348
349 public static int countAll()
350 throws com.liferay.portal.kernel.exception.SystemException {
351 return getPersistence().countAll();
352 }
353
354 public static java.util.List<com.liferay.portal.model.Group> getGroups(
355 long pk) throws com.liferay.portal.kernel.exception.SystemException {
356 return getPersistence().getGroups(pk);
357 }
358
359 public static java.util.List<com.liferay.portal.model.Group> getGroups(
360 long pk, int start, int end)
361 throws com.liferay.portal.kernel.exception.SystemException {
362 return getPersistence().getGroups(pk, start, end);
363 }
364
365 public static java.util.List<com.liferay.portal.model.Group> getGroups(
366 long pk, int start, int end,
367 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
368 throws com.liferay.portal.kernel.exception.SystemException {
369 return getPersistence().getGroups(pk, start, end, orderByComparator);
370 }
371
372 public static int getGroupsSize(long pk)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getPersistence().getGroupsSize(pk);
375 }
376
377 public static boolean containsGroup(long pk, long groupPK)
378 throws com.liferay.portal.kernel.exception.SystemException {
379 return getPersistence().containsGroup(pk, groupPK);
380 }
381
382 public static boolean containsGroups(long pk)
383 throws com.liferay.portal.kernel.exception.SystemException {
384 return getPersistence().containsGroups(pk);
385 }
386
387 public static void addGroup(long pk, long groupPK)
388 throws com.liferay.portal.kernel.exception.SystemException {
389 getPersistence().addGroup(pk, groupPK);
390 }
391
392 public static void addGroup(long pk, com.liferay.portal.model.Group group)
393 throws com.liferay.portal.kernel.exception.SystemException {
394 getPersistence().addGroup(pk, group);
395 }
396
397 public static void addGroups(long pk, long[] groupPKs)
398 throws com.liferay.portal.kernel.exception.SystemException {
399 getPersistence().addGroups(pk, groupPKs);
400 }
401
402 public static void addGroups(long pk,
403 java.util.List<com.liferay.portal.model.Group> groups)
404 throws com.liferay.portal.kernel.exception.SystemException {
405 getPersistence().addGroups(pk, groups);
406 }
407
408 public static void clearGroups(long pk)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 getPersistence().clearGroups(pk);
411 }
412
413 public static void removeGroup(long pk, long groupPK)
414 throws com.liferay.portal.kernel.exception.SystemException {
415 getPersistence().removeGroup(pk, groupPK);
416 }
417
418 public static void removeGroup(long pk, com.liferay.portal.model.Group group)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 getPersistence().removeGroup(pk, group);
421 }
422
423 public static void removeGroups(long pk, long[] groupPKs)
424 throws com.liferay.portal.kernel.exception.SystemException {
425 getPersistence().removeGroups(pk, groupPKs);
426 }
427
428 public static void removeGroups(long pk,
429 java.util.List<com.liferay.portal.model.Group> groups)
430 throws com.liferay.portal.kernel.exception.SystemException {
431 getPersistence().removeGroups(pk, groups);
432 }
433
434 public static void setGroups(long pk, long[] groupPKs)
435 throws com.liferay.portal.kernel.exception.SystemException {
436 getPersistence().setGroups(pk, groupPKs);
437 }
438
439 public static void setGroups(long pk,
440 java.util.List<com.liferay.portal.model.Group> groups)
441 throws com.liferay.portal.kernel.exception.SystemException {
442 getPersistence().setGroups(pk, groups);
443 }
444
445 public static java.util.List<com.liferay.portal.model.User> getUsers(
446 long pk) throws com.liferay.portal.kernel.exception.SystemException {
447 return getPersistence().getUsers(pk);
448 }
449
450 public static java.util.List<com.liferay.portal.model.User> getUsers(
451 long pk, int start, int end)
452 throws com.liferay.portal.kernel.exception.SystemException {
453 return getPersistence().getUsers(pk, start, end);
454 }
455
456 public static java.util.List<com.liferay.portal.model.User> getUsers(
457 long pk, int start, int end,
458 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
459 throws com.liferay.portal.kernel.exception.SystemException {
460 return getPersistence().getUsers(pk, start, end, orderByComparator);
461 }
462
463 public static int getUsersSize(long pk)
464 throws com.liferay.portal.kernel.exception.SystemException {
465 return getPersistence().getUsersSize(pk);
466 }
467
468 public static boolean containsUser(long pk, long userPK)
469 throws com.liferay.portal.kernel.exception.SystemException {
470 return getPersistence().containsUser(pk, userPK);
471 }
472
473 public static boolean containsUsers(long pk)
474 throws com.liferay.portal.kernel.exception.SystemException {
475 return getPersistence().containsUsers(pk);
476 }
477
478 public static void addUser(long pk, long userPK)
479 throws com.liferay.portal.kernel.exception.SystemException {
480 getPersistence().addUser(pk, userPK);
481 }
482
483 public static void addUser(long pk, com.liferay.portal.model.User user)
484 throws com.liferay.portal.kernel.exception.SystemException {
485 getPersistence().addUser(pk, user);
486 }
487
488 public static void addUsers(long pk, long[] userPKs)
489 throws com.liferay.portal.kernel.exception.SystemException {
490 getPersistence().addUsers(pk, userPKs);
491 }
492
493 public static void addUsers(long pk,
494 java.util.List<com.liferay.portal.model.User> users)
495 throws com.liferay.portal.kernel.exception.SystemException {
496 getPersistence().addUsers(pk, users);
497 }
498
499 public static void clearUsers(long pk)
500 throws com.liferay.portal.kernel.exception.SystemException {
501 getPersistence().clearUsers(pk);
502 }
503
504 public static void removeUser(long pk, long userPK)
505 throws com.liferay.portal.kernel.exception.SystemException {
506 getPersistence().removeUser(pk, userPK);
507 }
508
509 public static void removeUser(long pk, com.liferay.portal.model.User user)
510 throws com.liferay.portal.kernel.exception.SystemException {
511 getPersistence().removeUser(pk, user);
512 }
513
514 public static void removeUsers(long pk, long[] userPKs)
515 throws com.liferay.portal.kernel.exception.SystemException {
516 getPersistence().removeUsers(pk, userPKs);
517 }
518
519 public static void removeUsers(long pk,
520 java.util.List<com.liferay.portal.model.User> users)
521 throws com.liferay.portal.kernel.exception.SystemException {
522 getPersistence().removeUsers(pk, users);
523 }
524
525 public static void setUsers(long pk, long[] userPKs)
526 throws com.liferay.portal.kernel.exception.SystemException {
527 getPersistence().setUsers(pk, userPKs);
528 }
529
530 public static void setUsers(long pk,
531 java.util.List<com.liferay.portal.model.User> users)
532 throws com.liferay.portal.kernel.exception.SystemException {
533 getPersistence().setUsers(pk, users);
534 }
535
536 public static void rebuildTree(long companyId, boolean force)
537 throws com.liferay.portal.kernel.exception.SystemException {
538 getPersistence().rebuildTree(companyId, force);
539 }
540
541 public static OrganizationPersistence getPersistence() {
542 if (_persistence == null) {
543 _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName());
544 }
545
546 return _persistence;
547 }
548
549 public void setPersistence(OrganizationPersistence persistence) {
550 _persistence = persistence;
551 }
552
553 private static OrganizationPersistence _persistence;
554 }