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.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.SystemException {
96          return getPersistence().remove(orgGroupRolePK);
97      }
98  
99      /**
100      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
101      */
102     public static com.liferay.portal.model.OrgGroupRole update(
103         com.liferay.portal.model.OrgGroupRole orgGroupRole)
104         throws com.liferay.portal.SystemException {
105         return getPersistence().update(orgGroupRole);
106     }
107 
108     public static com.liferay.portal.model.OrgGroupRole updateImpl(
109         com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().updateImpl(orgGroupRole, merge);
112     }
113 
114     public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey(
115         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
116         throws com.liferay.portal.NoSuchOrgGroupRoleException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByPrimaryKey(orgGroupRolePK);
119     }
120 
121     public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey(
122         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
125     }
126 
127     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
128         long groupId) throws com.liferay.portal.SystemException {
129         return getPersistence().findByGroupId(groupId);
130     }
131 
132     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
133         long groupId, int start, int end)
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findByGroupId(groupId, start, end);
136     }
137 
138     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
139         long groupId, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByGroupId(groupId, start, end, obc);
143     }
144 
145     public static com.liferay.portal.model.OrgGroupRole findByGroupId_First(
146         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.NoSuchOrgGroupRoleException,
148             com.liferay.portal.SystemException {
149         return getPersistence().findByGroupId_First(groupId, obc);
150     }
151 
152     public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
153         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.NoSuchOrgGroupRoleException,
155             com.liferay.portal.SystemException {
156         return getPersistence().findByGroupId_Last(groupId, obc);
157     }
158 
159     public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
160         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
161         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.NoSuchOrgGroupRoleException,
163             com.liferay.portal.SystemException {
164         return getPersistence()
165                    .findByGroupId_PrevAndNext(orgGroupRolePK, groupId, obc);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
169         long roleId) throws com.liferay.portal.SystemException {
170         return getPersistence().findByRoleId(roleId);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
174         long roleId, int start, int end)
175         throws com.liferay.portal.SystemException {
176         return getPersistence().findByRoleId(roleId, start, end);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
180         long roleId, int start, int end,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException {
183         return getPersistence().findByRoleId(roleId, start, end, obc);
184     }
185 
186     public static com.liferay.portal.model.OrgGroupRole findByRoleId_First(
187         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.NoSuchOrgGroupRoleException,
189             com.liferay.portal.SystemException {
190         return getPersistence().findByRoleId_First(roleId, obc);
191     }
192 
193     public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
194         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.NoSuchOrgGroupRoleException,
196             com.liferay.portal.SystemException {
197         return getPersistence().findByRoleId_Last(roleId, obc);
198     }
199 
200     public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
201         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
202         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.NoSuchOrgGroupRoleException,
204             com.liferay.portal.SystemException {
205         return getPersistence()
206                    .findByRoleId_PrevAndNext(orgGroupRolePK, roleId, obc);
207     }
208 
209     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
210         throws com.liferay.portal.SystemException {
211         return getPersistence().findAll();
212     }
213 
214     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
215         int start, int end) throws com.liferay.portal.SystemException {
216         return getPersistence().findAll(start, end);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
220         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findAll(start, end, obc);
223     }
224 
225     public static void removeByGroupId(long groupId)
226         throws com.liferay.portal.SystemException {
227         getPersistence().removeByGroupId(groupId);
228     }
229 
230     public static void removeByRoleId(long roleId)
231         throws com.liferay.portal.SystemException {
232         getPersistence().removeByRoleId(roleId);
233     }
234 
235     public static void removeAll() throws com.liferay.portal.SystemException {
236         getPersistence().removeAll();
237     }
238 
239     public static int countByGroupId(long groupId)
240         throws com.liferay.portal.SystemException {
241         return getPersistence().countByGroupId(groupId);
242     }
243 
244     public static int countByRoleId(long roleId)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().countByRoleId(roleId);
247     }
248 
249     public static int countAll() throws com.liferay.portal.SystemException {
250         return getPersistence().countAll();
251     }
252 
253     public static OrgGroupRolePersistence getPersistence() {
254         if (_persistence == null) {
255             _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName());
256         }
257 
258         return _persistence;
259     }
260 
261     public void setPersistence(OrgGroupRolePersistence persistence) {
262         _persistence = persistence;
263     }
264 
265     private static OrgGroupRolePersistence _persistence;
266 }