001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="OrganizationUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class OrganizationUtil {
030: public static com.liferay.portal.model.Organization create(
031: long organizationId) {
032: return getPersistence().create(organizationId);
033: }
034:
035: public static com.liferay.portal.model.Organization remove(
036: long organizationId)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portal.NoSuchOrganizationException {
039: return getPersistence().remove(organizationId);
040: }
041:
042: public static com.liferay.portal.model.Organization remove(
043: com.liferay.portal.model.Organization organization)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(organization);
046: }
047:
048: public static com.liferay.portal.model.Organization update(
049: com.liferay.portal.model.Organization organization)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(organization);
052: }
053:
054: public static com.liferay.portal.model.Organization update(
055: com.liferay.portal.model.Organization organization,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(organization, merge);
058: }
059:
060: public static com.liferay.portal.model.Organization updateImpl(
061: com.liferay.portal.model.Organization organization,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(organization, merge);
064: }
065:
066: public static com.liferay.portal.model.Organization findByPrimaryKey(
067: long organizationId)
068: throws com.liferay.portal.SystemException,
069: com.liferay.portal.NoSuchOrganizationException {
070: return getPersistence().findByPrimaryKey(organizationId);
071: }
072:
073: public static com.liferay.portal.model.Organization fetchByPrimaryKey(
074: long organizationId)
075: throws com.liferay.portal.SystemException {
076: return getPersistence().fetchByPrimaryKey(organizationId);
077: }
078:
079: public static java.util.List findByCompanyId(long companyId)
080: throws com.liferay.portal.SystemException {
081: return getPersistence().findByCompanyId(companyId);
082: }
083:
084: public static java.util.List findByCompanyId(long companyId,
085: int begin, int end)
086: throws com.liferay.portal.SystemException {
087: return getPersistence().findByCompanyId(companyId, begin, end);
088: }
089:
090: public static java.util.List findByCompanyId(long companyId,
091: int begin, int end,
092: com.liferay.portal.kernel.util.OrderByComparator obc)
093: throws com.liferay.portal.SystemException {
094: return getPersistence().findByCompanyId(companyId, begin, end,
095: obc);
096: }
097:
098: public static com.liferay.portal.model.Organization findByCompanyId_First(
099: long companyId,
100: com.liferay.portal.kernel.util.OrderByComparator obc)
101: throws com.liferay.portal.SystemException,
102: com.liferay.portal.NoSuchOrganizationException {
103: return getPersistence().findByCompanyId_First(companyId, obc);
104: }
105:
106: public static com.liferay.portal.model.Organization findByCompanyId_Last(
107: long companyId,
108: com.liferay.portal.kernel.util.OrderByComparator obc)
109: throws com.liferay.portal.SystemException,
110: com.liferay.portal.NoSuchOrganizationException {
111: return getPersistence().findByCompanyId_Last(companyId, obc);
112: }
113:
114: public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
115: long organizationId, long companyId,
116: com.liferay.portal.kernel.util.OrderByComparator obc)
117: throws com.liferay.portal.SystemException,
118: com.liferay.portal.NoSuchOrganizationException {
119: return getPersistence().findByCompanyId_PrevAndNext(
120: organizationId, companyId, obc);
121: }
122:
123: public static java.util.List findByLocations(long companyId)
124: throws com.liferay.portal.SystemException {
125: return getPersistence().findByLocations(companyId);
126: }
127:
128: public static java.util.List findByLocations(long companyId,
129: int begin, int end)
130: throws com.liferay.portal.SystemException {
131: return getPersistence().findByLocations(companyId, begin, end);
132: }
133:
134: public static java.util.List findByLocations(long companyId,
135: int begin, int end,
136: com.liferay.portal.kernel.util.OrderByComparator obc)
137: throws com.liferay.portal.SystemException {
138: return getPersistence().findByLocations(companyId, begin, end,
139: obc);
140: }
141:
142: public static com.liferay.portal.model.Organization findByLocations_First(
143: long companyId,
144: com.liferay.portal.kernel.util.OrderByComparator obc)
145: throws com.liferay.portal.SystemException,
146: com.liferay.portal.NoSuchOrganizationException {
147: return getPersistence().findByLocations_First(companyId, obc);
148: }
149:
150: public static com.liferay.portal.model.Organization findByLocations_Last(
151: long companyId,
152: com.liferay.portal.kernel.util.OrderByComparator obc)
153: throws com.liferay.portal.SystemException,
154: com.liferay.portal.NoSuchOrganizationException {
155: return getPersistence().findByLocations_Last(companyId, obc);
156: }
157:
158: public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
159: long organizationId, long companyId,
160: com.liferay.portal.kernel.util.OrderByComparator obc)
161: throws com.liferay.portal.SystemException,
162: com.liferay.portal.NoSuchOrganizationException {
163: return getPersistence().findByLocations_PrevAndNext(
164: organizationId, companyId, obc);
165: }
166:
167: public static java.util.List findByC_P(long companyId,
168: long parentOrganizationId)
169: throws com.liferay.portal.SystemException {
170: return getPersistence().findByC_P(companyId,
171: parentOrganizationId);
172: }
173:
174: public static java.util.List findByC_P(long companyId,
175: long parentOrganizationId, int begin, int end)
176: throws com.liferay.portal.SystemException {
177: return getPersistence().findByC_P(companyId,
178: parentOrganizationId, begin, end);
179: }
180:
181: public static java.util.List findByC_P(long companyId,
182: long parentOrganizationId, int begin, int end,
183: com.liferay.portal.kernel.util.OrderByComparator obc)
184: throws com.liferay.portal.SystemException {
185: return getPersistence().findByC_P(companyId,
186: parentOrganizationId, begin, end, obc);
187: }
188:
189: public static com.liferay.portal.model.Organization findByC_P_First(
190: long companyId, long parentOrganizationId,
191: com.liferay.portal.kernel.util.OrderByComparator obc)
192: throws com.liferay.portal.SystemException,
193: com.liferay.portal.NoSuchOrganizationException {
194: return getPersistence().findByC_P_First(companyId,
195: parentOrganizationId, obc);
196: }
197:
198: public static com.liferay.portal.model.Organization findByC_P_Last(
199: long companyId, long parentOrganizationId,
200: com.liferay.portal.kernel.util.OrderByComparator obc)
201: throws com.liferay.portal.SystemException,
202: com.liferay.portal.NoSuchOrganizationException {
203: return getPersistence().findByC_P_Last(companyId,
204: parentOrganizationId, obc);
205: }
206:
207: public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
208: long organizationId, long companyId,
209: long parentOrganizationId,
210: com.liferay.portal.kernel.util.OrderByComparator obc)
211: throws com.liferay.portal.SystemException,
212: com.liferay.portal.NoSuchOrganizationException {
213: return getPersistence().findByC_P_PrevAndNext(organizationId,
214: companyId, parentOrganizationId, obc);
215: }
216:
217: public static com.liferay.portal.model.Organization findByC_N(
218: long companyId, java.lang.String name)
219: throws com.liferay.portal.SystemException,
220: com.liferay.portal.NoSuchOrganizationException {
221: return getPersistence().findByC_N(companyId, name);
222: }
223:
224: public static com.liferay.portal.model.Organization fetchByC_N(
225: long companyId, java.lang.String name)
226: throws com.liferay.portal.SystemException {
227: return getPersistence().fetchByC_N(companyId, name);
228: }
229:
230: public static java.util.List findWithDynamicQuery(
231: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
232: throws com.liferay.portal.SystemException {
233: return getPersistence().findWithDynamicQuery(queryInitializer);
234: }
235:
236: public static java.util.List findWithDynamicQuery(
237: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
238: int begin, int end)
239: throws com.liferay.portal.SystemException {
240: return getPersistence().findWithDynamicQuery(queryInitializer,
241: begin, end);
242: }
243:
244: public static java.util.List findAll()
245: throws com.liferay.portal.SystemException {
246: return getPersistence().findAll();
247: }
248:
249: public static java.util.List findAll(int begin, int end)
250: throws com.liferay.portal.SystemException {
251: return getPersistence().findAll(begin, end);
252: }
253:
254: public static java.util.List findAll(int begin, int end,
255: com.liferay.portal.kernel.util.OrderByComparator obc)
256: throws com.liferay.portal.SystemException {
257: return getPersistence().findAll(begin, end, obc);
258: }
259:
260: public static void removeByCompanyId(long companyId)
261: throws com.liferay.portal.SystemException {
262: getPersistence().removeByCompanyId(companyId);
263: }
264:
265: public static void removeByLocations(long companyId)
266: throws com.liferay.portal.SystemException {
267: getPersistence().removeByLocations(companyId);
268: }
269:
270: public static void removeByC_P(long companyId,
271: long parentOrganizationId)
272: throws com.liferay.portal.SystemException {
273: getPersistence().removeByC_P(companyId, parentOrganizationId);
274: }
275:
276: public static void removeByC_N(long companyId, java.lang.String name)
277: throws com.liferay.portal.SystemException,
278: com.liferay.portal.NoSuchOrganizationException {
279: getPersistence().removeByC_N(companyId, name);
280: }
281:
282: public static void removeAll()
283: throws com.liferay.portal.SystemException {
284: getPersistence().removeAll();
285: }
286:
287: public static int countByCompanyId(long companyId)
288: throws com.liferay.portal.SystemException {
289: return getPersistence().countByCompanyId(companyId);
290: }
291:
292: public static int countByLocations(long companyId)
293: throws com.liferay.portal.SystemException {
294: return getPersistence().countByLocations(companyId);
295: }
296:
297: public static int countByC_P(long companyId,
298: long parentOrganizationId)
299: throws com.liferay.portal.SystemException {
300: return getPersistence().countByC_P(companyId,
301: parentOrganizationId);
302: }
303:
304: public static int countByC_N(long companyId, java.lang.String name)
305: throws com.liferay.portal.SystemException {
306: return getPersistence().countByC_N(companyId, name);
307: }
308:
309: public static int countAll()
310: throws com.liferay.portal.SystemException {
311: return getPersistence().countAll();
312: }
313:
314: public static java.util.List getGroups(long pk)
315: throws com.liferay.portal.SystemException,
316: com.liferay.portal.NoSuchOrganizationException {
317: return getPersistence().getGroups(pk);
318: }
319:
320: public static java.util.List getGroups(long pk, int begin, int end)
321: throws com.liferay.portal.SystemException,
322: com.liferay.portal.NoSuchOrganizationException {
323: return getPersistence().getGroups(pk, begin, end);
324: }
325:
326: public static java.util.List getGroups(long pk, int begin, int end,
327: com.liferay.portal.kernel.util.OrderByComparator obc)
328: throws com.liferay.portal.SystemException,
329: com.liferay.portal.NoSuchOrganizationException {
330: return getPersistence().getGroups(pk, begin, end, obc);
331: }
332:
333: public static int getGroupsSize(long pk)
334: throws com.liferay.portal.SystemException {
335: return getPersistence().getGroupsSize(pk);
336: }
337:
338: public static boolean containsGroup(long pk, long groupPK)
339: throws com.liferay.portal.SystemException {
340: return getPersistence().containsGroup(pk, groupPK);
341: }
342:
343: public static boolean containsGroups(long pk)
344: throws com.liferay.portal.SystemException {
345: return getPersistence().containsGroups(pk);
346: }
347:
348: public static void addGroup(long pk, long groupPK)
349: throws com.liferay.portal.SystemException,
350: com.liferay.portal.NoSuchGroupException,
351: com.liferay.portal.NoSuchOrganizationException {
352: getPersistence().addGroup(pk, groupPK);
353: }
354:
355: public static void addGroup(long pk,
356: com.liferay.portal.model.Group group)
357: throws com.liferay.portal.SystemException,
358: com.liferay.portal.NoSuchGroupException,
359: com.liferay.portal.NoSuchOrganizationException {
360: getPersistence().addGroup(pk, group);
361: }
362:
363: public static void addGroups(long pk, long[] groupPKs)
364: throws com.liferay.portal.SystemException,
365: com.liferay.portal.NoSuchGroupException,
366: com.liferay.portal.NoSuchOrganizationException {
367: getPersistence().addGroups(pk, groupPKs);
368: }
369:
370: public static void addGroups(long pk, java.util.List groups)
371: throws com.liferay.portal.SystemException,
372: com.liferay.portal.NoSuchGroupException,
373: com.liferay.portal.NoSuchOrganizationException {
374: getPersistence().addGroups(pk, groups);
375: }
376:
377: public static void clearGroups(long pk)
378: throws com.liferay.portal.SystemException,
379: com.liferay.portal.NoSuchOrganizationException {
380: getPersistence().clearGroups(pk);
381: }
382:
383: public static void removeGroup(long pk, long groupPK)
384: throws com.liferay.portal.SystemException,
385: com.liferay.portal.NoSuchGroupException,
386: com.liferay.portal.NoSuchOrganizationException {
387: getPersistence().removeGroup(pk, groupPK);
388: }
389:
390: public static void removeGroup(long pk,
391: com.liferay.portal.model.Group group)
392: throws com.liferay.portal.SystemException,
393: com.liferay.portal.NoSuchGroupException,
394: com.liferay.portal.NoSuchOrganizationException {
395: getPersistence().removeGroup(pk, group);
396: }
397:
398: public static void removeGroups(long pk, long[] groupPKs)
399: throws com.liferay.portal.SystemException,
400: com.liferay.portal.NoSuchGroupException,
401: com.liferay.portal.NoSuchOrganizationException {
402: getPersistence().removeGroups(pk, groupPKs);
403: }
404:
405: public static void removeGroups(long pk, java.util.List groups)
406: throws com.liferay.portal.SystemException,
407: com.liferay.portal.NoSuchGroupException,
408: com.liferay.portal.NoSuchOrganizationException {
409: getPersistence().removeGroups(pk, groups);
410: }
411:
412: public static void setGroups(long pk, long[] groupPKs)
413: throws com.liferay.portal.SystemException,
414: com.liferay.portal.NoSuchGroupException,
415: com.liferay.portal.NoSuchOrganizationException {
416: getPersistence().setGroups(pk, groupPKs);
417: }
418:
419: public static void setGroups(long pk, java.util.List groups)
420: throws com.liferay.portal.SystemException,
421: com.liferay.portal.NoSuchGroupException,
422: com.liferay.portal.NoSuchOrganizationException {
423: getPersistence().setGroups(pk, groups);
424: }
425:
426: public static java.util.List getUsers(long pk)
427: throws com.liferay.portal.SystemException,
428: com.liferay.portal.NoSuchOrganizationException {
429: return getPersistence().getUsers(pk);
430: }
431:
432: public static java.util.List getUsers(long pk, int begin, int end)
433: throws com.liferay.portal.SystemException,
434: com.liferay.portal.NoSuchOrganizationException {
435: return getPersistence().getUsers(pk, begin, end);
436: }
437:
438: public static java.util.List getUsers(long pk, int begin, int end,
439: com.liferay.portal.kernel.util.OrderByComparator obc)
440: throws com.liferay.portal.SystemException,
441: com.liferay.portal.NoSuchOrganizationException {
442: return getPersistence().getUsers(pk, begin, end, obc);
443: }
444:
445: public static int getUsersSize(long pk)
446: throws com.liferay.portal.SystemException {
447: return getPersistence().getUsersSize(pk);
448: }
449:
450: public static boolean containsUser(long pk, long userPK)
451: throws com.liferay.portal.SystemException {
452: return getPersistence().containsUser(pk, userPK);
453: }
454:
455: public static boolean containsUsers(long pk)
456: throws com.liferay.portal.SystemException {
457: return getPersistence().containsUsers(pk);
458: }
459:
460: public static void addUser(long pk, long userPK)
461: throws com.liferay.portal.SystemException,
462: com.liferay.portal.NoSuchOrganizationException,
463: com.liferay.portal.NoSuchUserException {
464: getPersistence().addUser(pk, userPK);
465: }
466:
467: public static void addUser(long pk,
468: com.liferay.portal.model.User user)
469: throws com.liferay.portal.SystemException,
470: com.liferay.portal.NoSuchOrganizationException,
471: com.liferay.portal.NoSuchUserException {
472: getPersistence().addUser(pk, user);
473: }
474:
475: public static void addUsers(long pk, long[] userPKs)
476: throws com.liferay.portal.SystemException,
477: com.liferay.portal.NoSuchOrganizationException,
478: com.liferay.portal.NoSuchUserException {
479: getPersistence().addUsers(pk, userPKs);
480: }
481:
482: public static void addUsers(long pk, java.util.List users)
483: throws com.liferay.portal.SystemException,
484: com.liferay.portal.NoSuchOrganizationException,
485: com.liferay.portal.NoSuchUserException {
486: getPersistence().addUsers(pk, users);
487: }
488:
489: public static void clearUsers(long pk)
490: throws com.liferay.portal.SystemException,
491: com.liferay.portal.NoSuchOrganizationException {
492: getPersistence().clearUsers(pk);
493: }
494:
495: public static void removeUser(long pk, long userPK)
496: throws com.liferay.portal.SystemException,
497: com.liferay.portal.NoSuchOrganizationException,
498: com.liferay.portal.NoSuchUserException {
499: getPersistence().removeUser(pk, userPK);
500: }
501:
502: public static void removeUser(long pk,
503: com.liferay.portal.model.User user)
504: throws com.liferay.portal.SystemException,
505: com.liferay.portal.NoSuchOrganizationException,
506: com.liferay.portal.NoSuchUserException {
507: getPersistence().removeUser(pk, user);
508: }
509:
510: public static void removeUsers(long pk, long[] userPKs)
511: throws com.liferay.portal.SystemException,
512: com.liferay.portal.NoSuchOrganizationException,
513: com.liferay.portal.NoSuchUserException {
514: getPersistence().removeUsers(pk, userPKs);
515: }
516:
517: public static void removeUsers(long pk, java.util.List users)
518: throws com.liferay.portal.SystemException,
519: com.liferay.portal.NoSuchOrganizationException,
520: com.liferay.portal.NoSuchUserException {
521: getPersistence().removeUsers(pk, users);
522: }
523:
524: public static void setUsers(long pk, long[] userPKs)
525: throws com.liferay.portal.SystemException,
526: com.liferay.portal.NoSuchOrganizationException,
527: com.liferay.portal.NoSuchUserException {
528: getPersistence().setUsers(pk, userPKs);
529: }
530:
531: public static void setUsers(long pk, java.util.List users)
532: throws com.liferay.portal.SystemException,
533: com.liferay.portal.NoSuchOrganizationException,
534: com.liferay.portal.NoSuchUserException {
535: getPersistence().setUsers(pk, users);
536: }
537:
538: public static OrganizationPersistence getPersistence() {
539: return _getUtil()._persistence;
540: }
541:
542: public void setPersistence(OrganizationPersistence persistence) {
543: _persistence = persistence;
544: }
545:
546: private static OrganizationUtil _getUtil() {
547: if (_util == null) {
548: _util = (OrganizationUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
549: .locate(_UTIL);
550: }
551:
552: return _util;
553: }
554:
555: private static final String _UTIL = OrganizationUtil.class
556: .getName();
557: private static OrganizationUtil _util;
558: private OrganizationPersistence _persistence;
559: }
|