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