1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
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.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.OrgGroupRole;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="OrgGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       OrgGroupRolePersistence
35   * @see       OrgGroupRolePersistenceImpl
36   * @generated
37   */
38  public class OrgGroupRoleUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(OrgGroupRole)
48       */
49      public static void clearCache(OrgGroupRole orgGroupRole) {
50          getPersistence().clearCache(orgGroupRole);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static OrgGroupRole remove(OrgGroupRole orgGroupRole)
81          throws SystemException {
82          return getPersistence().remove(orgGroupRole);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static OrgGroupRole update(OrgGroupRole orgGroupRole, boolean merge)
89          throws SystemException {
90          return getPersistence().update(orgGroupRole, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.OrgGroupRole orgGroupRole) {
95          getPersistence().cacheResult(orgGroupRole);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) {
100         getPersistence().cacheResult(orgGroupRoles);
101     }
102 
103     public static com.liferay.portal.model.OrgGroupRole create(
104         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
105         return getPersistence().create(orgGroupRolePK);
106     }
107 
108     public static com.liferay.portal.model.OrgGroupRole remove(
109         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
110         throws com.liferay.portal.NoSuchOrgGroupRoleException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(orgGroupRolePK);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.OrgGroupRole update(
119         com.liferay.portal.model.OrgGroupRole orgGroupRole)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(orgGroupRole);
122     }
123 
124     public static com.liferay.portal.model.OrgGroupRole updateImpl(
125         com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(orgGroupRole, merge);
128     }
129 
130     public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey(
131         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
132         throws com.liferay.portal.NoSuchOrgGroupRoleException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(orgGroupRolePK);
135     }
136 
137     public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey(
138         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
139         throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
141     }
142 
143     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
144         long groupId) throws com.liferay.portal.SystemException {
145         return getPersistence().findByGroupId(groupId);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
149         long groupId, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByGroupId(groupId, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
155         long groupId, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByGroupId(groupId, start, end, orderByComparator);
160     }
161 
162     public static com.liferay.portal.model.OrgGroupRole findByGroupId_First(
163         long groupId,
164         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165         throws com.liferay.portal.NoSuchOrgGroupRoleException,
166             com.liferay.portal.SystemException {
167         return getPersistence().findByGroupId_First(groupId, orderByComparator);
168     }
169 
170     public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
171         long groupId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.NoSuchOrgGroupRoleException,
174             com.liferay.portal.SystemException {
175         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
176     }
177 
178     public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
179         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
180         long groupId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.NoSuchOrgGroupRoleException,
183             com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByGroupId_PrevAndNext(orgGroupRolePK, groupId,
186             orderByComparator);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
190         long roleId) throws com.liferay.portal.SystemException {
191         return getPersistence().findByRoleId(roleId);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
195         long roleId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByRoleId(roleId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
201         long roleId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.SystemException {
204         return getPersistence()
205                    .findByRoleId(roleId, start, end, orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.OrgGroupRole findByRoleId_First(
209         long roleId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchOrgGroupRoleException,
212             com.liferay.portal.SystemException {
213         return getPersistence().findByRoleId_First(roleId, orderByComparator);
214     }
215 
216     public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
217         long roleId,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.NoSuchOrgGroupRoleException,
220             com.liferay.portal.SystemException {
221         return getPersistence().findByRoleId_Last(roleId, orderByComparator);
222     }
223 
224     public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
225         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
226         long roleId,
227         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228         throws com.liferay.portal.NoSuchOrgGroupRoleException,
229             com.liferay.portal.SystemException {
230         return getPersistence()
231                    .findByRoleId_PrevAndNext(orgGroupRolePK, roleId,
232             orderByComparator);
233     }
234 
235     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
236         throws com.liferay.portal.SystemException {
237         return getPersistence().findAll();
238     }
239 
240     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
241         int start, int end) throws com.liferay.portal.SystemException {
242         return getPersistence().findAll(start, end);
243     }
244 
245     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
246         int start, int end,
247         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findAll(start, end, orderByComparator);
250     }
251 
252     public static void removeByGroupId(long groupId)
253         throws com.liferay.portal.SystemException {
254         getPersistence().removeByGroupId(groupId);
255     }
256 
257     public static void removeByRoleId(long roleId)
258         throws com.liferay.portal.SystemException {
259         getPersistence().removeByRoleId(roleId);
260     }
261 
262     public static void removeAll() throws com.liferay.portal.SystemException {
263         getPersistence().removeAll();
264     }
265 
266     public static int countByGroupId(long groupId)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().countByGroupId(groupId);
269     }
270 
271     public static int countByRoleId(long roleId)
272         throws com.liferay.portal.SystemException {
273         return getPersistence().countByRoleId(roleId);
274     }
275 
276     public static int countAll() throws com.liferay.portal.SystemException {
277         return getPersistence().countAll();
278     }
279 
280     public static OrgGroupRolePersistence getPersistence() {
281         if (_persistence == null) {
282             _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName());
283 
284             ReferenceRegistry.registerReference(OrgGroupRoleUtil.class,
285                 "_persistence");
286         }
287 
288         return _persistence;
289     }
290 
291     public void setPersistence(OrgGroupRolePersistence persistence) {
292         _persistence = persistence;
293 
294         ReferenceRegistry.registerReference(OrgGroupRoleUtil.class,
295             "_persistence");
296     }
297 
298     private static OrgGroupRolePersistence _persistence;
299 }