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