1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
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.OrgGroupRole;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="OrgGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       OrgGroupRolePersistence
34   * @see       OrgGroupRolePersistenceImpl
35   * @generated
36   */
37  public class OrgGroupRoleUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
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      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static OrgGroupRole remove(OrgGroupRole orgGroupRole)
65          throws SystemException {
66          return getPersistence().remove(orgGroupRole);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static OrgGroupRole update(OrgGroupRole orgGroupRole, boolean merge)
73          throws SystemException {
74          return getPersistence().update(orgGroupRole, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.OrgGroupRole orgGroupRole) {
79          getPersistence().cacheResult(orgGroupRole);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) {
84          getPersistence().cacheResult(orgGroupRoles);
85      }
86  
87      public static com.liferay.portal.model.OrgGroupRole create(
88          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
89          return getPersistence().create(orgGroupRolePK);
90      }
91  
92      public static com.liferay.portal.model.OrgGroupRole remove(
93          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
94          throws com.liferay.portal.NoSuchOrgGroupRoleException,
95              com.liferay.portal.kernel.exception.SystemException {
96          return getPersistence().remove(orgGroupRolePK);
97      }
98  
99      public static com.liferay.portal.model.OrgGroupRole updateImpl(
100         com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getPersistence().updateImpl(orgGroupRole, merge);
103     }
104 
105     public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey(
106         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
107         throws com.liferay.portal.NoSuchOrgGroupRoleException,
108             com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().findByPrimaryKey(orgGroupRolePK);
110     }
111 
112     public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey(
113         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
119         long groupId)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByGroupId(groupId);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
125         long groupId, int start, int end)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().findByGroupId(groupId, start, end);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
131         long groupId, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence()
135                    .findByGroupId(groupId, start, end, orderByComparator);
136     }
137 
138     public static com.liferay.portal.model.OrgGroupRole findByGroupId_First(
139         long groupId,
140         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141         throws com.liferay.portal.NoSuchOrgGroupRoleException,
142             com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence().findByGroupId_First(groupId, orderByComparator);
144     }
145 
146     public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
147         long groupId,
148         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149         throws com.liferay.portal.NoSuchOrgGroupRoleException,
150             com.liferay.portal.kernel.exception.SystemException {
151         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
152     }
153 
154     public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
155         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
156         long groupId,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.NoSuchOrgGroupRoleException,
159             com.liferay.portal.kernel.exception.SystemException {
160         return getPersistence()
161                    .findByGroupId_PrevAndNext(orgGroupRolePK, groupId,
162             orderByComparator);
163     }
164 
165     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
166         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
167         return getPersistence().findByRoleId(roleId);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
171         long roleId, int start, int end)
172         throws com.liferay.portal.kernel.exception.SystemException {
173         return getPersistence().findByRoleId(roleId, start, end);
174     }
175 
176     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
177         long roleId, int start, int end,
178         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence()
181                    .findByRoleId(roleId, start, end, orderByComparator);
182     }
183 
184     public static com.liferay.portal.model.OrgGroupRole findByRoleId_First(
185         long roleId,
186         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187         throws com.liferay.portal.NoSuchOrgGroupRoleException,
188             com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().findByRoleId_First(roleId, orderByComparator);
190     }
191 
192     public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
193         long roleId,
194         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195         throws com.liferay.portal.NoSuchOrgGroupRoleException,
196             com.liferay.portal.kernel.exception.SystemException {
197         return getPersistence().findByRoleId_Last(roleId, orderByComparator);
198     }
199 
200     public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
201         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
202         long roleId,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.NoSuchOrgGroupRoleException,
205             com.liferay.portal.kernel.exception.SystemException {
206         return getPersistence()
207                    .findByRoleId_PrevAndNext(orgGroupRolePK, roleId,
208             orderByComparator);
209     }
210 
211     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().findAll();
214     }
215 
216     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
217         int start, int end)
218         throws com.liferay.portal.kernel.exception.SystemException {
219         return getPersistence().findAll(start, end);
220     }
221 
222     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
223         int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225         throws com.liferay.portal.kernel.exception.SystemException {
226         return getPersistence().findAll(start, end, orderByComparator);
227     }
228 
229     public static void removeByGroupId(long groupId)
230         throws com.liferay.portal.kernel.exception.SystemException {
231         getPersistence().removeByGroupId(groupId);
232     }
233 
234     public static void removeByRoleId(long roleId)
235         throws com.liferay.portal.kernel.exception.SystemException {
236         getPersistence().removeByRoleId(roleId);
237     }
238 
239     public static void removeAll()
240         throws com.liferay.portal.kernel.exception.SystemException {
241         getPersistence().removeAll();
242     }
243 
244     public static int countByGroupId(long groupId)
245         throws com.liferay.portal.kernel.exception.SystemException {
246         return getPersistence().countByGroupId(groupId);
247     }
248 
249     public static int countByRoleId(long roleId)
250         throws com.liferay.portal.kernel.exception.SystemException {
251         return getPersistence().countByRoleId(roleId);
252     }
253 
254     public static int countAll()
255         throws com.liferay.portal.kernel.exception.SystemException {
256         return getPersistence().countAll();
257     }
258 
259     public static OrgGroupRolePersistence getPersistence() {
260         if (_persistence == null) {
261             _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName());
262         }
263 
264         return _persistence;
265     }
266 
267     public void setPersistence(OrgGroupRolePersistence persistence) {
268         _persistence = persistence;
269     }
270 
271     private static OrgGroupRolePersistence _persistence;
272 }