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  
26  /**
27   * <a href="OrgGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       OrgGroupRolePersistence
36   * @see       OrgGroupRolePersistenceImpl
37   * @generated
38   */
39  public class OrgGroupRoleUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.OrgGroupRole orgGroupRole) {
42          getPersistence().cacheResult(orgGroupRole);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) {
47          getPersistence().cacheResult(orgGroupRoles);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.OrgGroupRole create(
55          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
56          return getPersistence().create(orgGroupRolePK);
57      }
58  
59      public static com.liferay.portal.model.OrgGroupRole remove(
60          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
61          throws com.liferay.portal.NoSuchOrgGroupRoleException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(orgGroupRolePK);
64      }
65  
66      public static com.liferay.portal.model.OrgGroupRole remove(
67          com.liferay.portal.model.OrgGroupRole orgGroupRole)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(orgGroupRole);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(OrgGroupRole, boolean merge)}.
74       */
75      public static com.liferay.portal.model.OrgGroupRole update(
76          com.liferay.portal.model.OrgGroupRole orgGroupRole)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(orgGroupRole);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  orgGroupRole the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when orgGroupRole is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.OrgGroupRole update(
94          com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(orgGroupRole, merge);
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.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.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.SystemException {
115         return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
119         long groupId) throws com.liferay.portal.SystemException {
120         return getPersistence().findByGroupId(groupId);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
124         long groupId, int start, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByGroupId(groupId, start, end);
127     }
128 
129     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
130         long groupId, int start, int end,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByGroupId(groupId, start, end, obc);
134     }
135 
136     public static com.liferay.portal.model.OrgGroupRole findByGroupId_First(
137         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.NoSuchOrgGroupRoleException,
139             com.liferay.portal.SystemException {
140         return getPersistence().findByGroupId_First(groupId, obc);
141     }
142 
143     public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
144         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.NoSuchOrgGroupRoleException,
146             com.liferay.portal.SystemException {
147         return getPersistence().findByGroupId_Last(groupId, obc);
148     }
149 
150     public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
151         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
152         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.NoSuchOrgGroupRoleException,
154             com.liferay.portal.SystemException {
155         return getPersistence()
156                    .findByGroupId_PrevAndNext(orgGroupRolePK, groupId, obc);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
160         long roleId) throws com.liferay.portal.SystemException {
161         return getPersistence().findByRoleId(roleId);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
165         long roleId, int start, int end)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByRoleId(roleId, start, end);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
171         long roleId, int start, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByRoleId(roleId, start, end, obc);
175     }
176 
177     public static com.liferay.portal.model.OrgGroupRole findByRoleId_First(
178         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.NoSuchOrgGroupRoleException,
180             com.liferay.portal.SystemException {
181         return getPersistence().findByRoleId_First(roleId, obc);
182     }
183 
184     public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
185         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.NoSuchOrgGroupRoleException,
187             com.liferay.portal.SystemException {
188         return getPersistence().findByRoleId_Last(roleId, obc);
189     }
190 
191     public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
192         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
193         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.NoSuchOrgGroupRoleException,
195             com.liferay.portal.SystemException {
196         return getPersistence()
197                    .findByRoleId_PrevAndNext(orgGroupRolePK, roleId, obc);
198     }
199 
200     public static java.util.List<Object> findWithDynamicQuery(
201         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().findWithDynamicQuery(dynamicQuery);
204     }
205 
206     public static java.util.List<Object> findWithDynamicQuery(
207         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
208         int end) throws com.liferay.portal.SystemException {
209         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findAll();
215     }
216 
217     public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
218         int start, int end) throws com.liferay.portal.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, com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findAll(start, end, obc);
226     }
227 
228     public static void removeByGroupId(long groupId)
229         throws com.liferay.portal.SystemException {
230         getPersistence().removeByGroupId(groupId);
231     }
232 
233     public static void removeByRoleId(long roleId)
234         throws com.liferay.portal.SystemException {
235         getPersistence().removeByRoleId(roleId);
236     }
237 
238     public static void removeAll() throws com.liferay.portal.SystemException {
239         getPersistence().removeAll();
240     }
241 
242     public static int countByGroupId(long groupId)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().countByGroupId(groupId);
245     }
246 
247     public static int countByRoleId(long roleId)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().countByRoleId(roleId);
250     }
251 
252     public static int countAll() throws com.liferay.portal.SystemException {
253         return getPersistence().countAll();
254     }
255 
256     public static OrgGroupRolePersistence getPersistence() {
257         return _persistence;
258     }
259 
260     public void setPersistence(OrgGroupRolePersistence persistence) {
261         _persistence = persistence;
262     }
263 
264     private static OrgGroupRolePersistence _persistence;
265 }