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="UserGroupRolePersistence.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       UserGroupRolePersistenceImpl
36   * @see       UserGroupRoleUtil
37   * @generated
38   */
39  public interface UserGroupRolePersistence extends BasePersistence {
40      public void cacheResult(
41          com.liferay.portal.model.UserGroupRole userGroupRole);
42  
43      public void cacheResult(
44          java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles);
45  
46      public void clearCache();
47  
48      public com.liferay.portal.model.UserGroupRole create(
49          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK);
50  
51      public com.liferay.portal.model.UserGroupRole remove(
52          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
53          throws com.liferay.portal.NoSuchUserGroupRoleException,
54              com.liferay.portal.SystemException;
55  
56      public com.liferay.portal.model.UserGroupRole remove(
57          com.liferay.portal.model.UserGroupRole userGroupRole)
58          throws com.liferay.portal.SystemException;
59  
60      /**
61       * @deprecated Use {@link #update(UserGroupRole, boolean merge)}.
62       */
63      public com.liferay.portal.model.UserGroupRole update(
64          com.liferay.portal.model.UserGroupRole userGroupRole)
65          throws com.liferay.portal.SystemException;
66  
67      /**
68       * Add, update, or merge, the entity. This method also calls the model
69       * listeners to trigger the proper events associated with adding, deleting,
70       * or updating an entity.
71       *
72       * @param  userGroupRole the entity to add, update, or merge
73       * @param  merge boolean value for whether to merge the entity. The default
74       *         value is false. Setting merge to true is more expensive and
75       *         should only be true when userGroupRole is transient. See
76       *         LEP-5473 for a detailed discussion of this method.
77       * @return the entity that was added, updated, or merged
78       */
79      public com.liferay.portal.model.UserGroupRole update(
80          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
81          throws com.liferay.portal.SystemException;
82  
83      public com.liferay.portal.model.UserGroupRole updateImpl(
84          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
85          throws com.liferay.portal.SystemException;
86  
87      public com.liferay.portal.model.UserGroupRole findByPrimaryKey(
88          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
89          throws com.liferay.portal.NoSuchUserGroupRoleException,
90              com.liferay.portal.SystemException;
91  
92      public com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
93          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
94          throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
97          long userId) throws com.liferay.portal.SystemException;
98  
99      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
100         long userId, int start, int end)
101         throws com.liferay.portal.SystemException;
102 
103     public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
104         long userId, int start, int end,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException;
107 
108     public com.liferay.portal.model.UserGroupRole findByUserId_First(
109         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.NoSuchUserGroupRoleException,
111             com.liferay.portal.SystemException;
112 
113     public com.liferay.portal.model.UserGroupRole findByUserId_Last(
114         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.NoSuchUserGroupRoleException,
116             com.liferay.portal.SystemException;
117 
118     public com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
119         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
120         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.NoSuchUserGroupRoleException,
122             com.liferay.portal.SystemException;
123 
124     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
125         long groupId) throws com.liferay.portal.SystemException;
126 
127     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
128         long groupId, int start, int end)
129         throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
132         long groupId, int start, int end,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException;
135 
136     public com.liferay.portal.model.UserGroupRole findByGroupId_First(
137         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.NoSuchUserGroupRoleException,
139             com.liferay.portal.SystemException;
140 
141     public com.liferay.portal.model.UserGroupRole findByGroupId_Last(
142         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.NoSuchUserGroupRoleException,
144             com.liferay.portal.SystemException;
145 
146     public com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
147         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
148         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.NoSuchUserGroupRoleException,
150             com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
153         long roleId) throws com.liferay.portal.SystemException;
154 
155     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
156         long roleId, int start, int end)
157         throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
160         long roleId, int start, int end,
161         com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException;
163 
164     public com.liferay.portal.model.UserGroupRole findByRoleId_First(
165         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.NoSuchUserGroupRoleException,
167             com.liferay.portal.SystemException;
168 
169     public com.liferay.portal.model.UserGroupRole findByRoleId_Last(
170         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.NoSuchUserGroupRoleException,
172             com.liferay.portal.SystemException;
173 
174     public com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
175         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
176         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.NoSuchUserGroupRoleException,
178             com.liferay.portal.SystemException;
179 
180     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
181         long userId, long groupId) throws com.liferay.portal.SystemException;
182 
183     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
184         long userId, long groupId, int start, int end)
185         throws com.liferay.portal.SystemException;
186 
187     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
188         long userId, long groupId, int start, int end,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException;
191 
192     public com.liferay.portal.model.UserGroupRole findByU_G_First(long userId,
193         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.NoSuchUserGroupRoleException,
195             com.liferay.portal.SystemException;
196 
197     public com.liferay.portal.model.UserGroupRole findByU_G_Last(long userId,
198         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.NoSuchUserGroupRoleException,
200             com.liferay.portal.SystemException;
201 
202     public com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
203         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
204         long userId, long groupId,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.NoSuchUserGroupRoleException,
207             com.liferay.portal.SystemException;
208 
209     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
210         long groupId, long roleId) throws com.liferay.portal.SystemException;
211 
212     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
213         long groupId, long roleId, int start, int end)
214         throws com.liferay.portal.SystemException;
215 
216     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
217         long groupId, long roleId, int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException;
220 
221     public com.liferay.portal.model.UserGroupRole findByG_R_First(
222         long groupId, long roleId,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.NoSuchUserGroupRoleException,
225             com.liferay.portal.SystemException;
226 
227     public com.liferay.portal.model.UserGroupRole findByG_R_Last(long groupId,
228         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.NoSuchUserGroupRoleException,
230             com.liferay.portal.SystemException;
231 
232     public com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
233         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
234         long groupId, long roleId,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.NoSuchUserGroupRoleException,
237             com.liferay.portal.SystemException;
238 
239     public java.util.List<Object> findWithDynamicQuery(
240         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
241         throws com.liferay.portal.SystemException;
242 
243     public java.util.List<Object> findWithDynamicQuery(
244         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
245         int end) throws com.liferay.portal.SystemException;
246 
247     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
248         throws com.liferay.portal.SystemException;
249 
250     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
251         int start, int end) throws com.liferay.portal.SystemException;
252 
253     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
254         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.SystemException;
256 
257     public void removeByUserId(long userId)
258         throws com.liferay.portal.SystemException;
259 
260     public void removeByGroupId(long groupId)
261         throws com.liferay.portal.SystemException;
262 
263     public void removeByRoleId(long roleId)
264         throws com.liferay.portal.SystemException;
265 
266     public void removeByU_G(long userId, long groupId)
267         throws com.liferay.portal.SystemException;
268 
269     public void removeByG_R(long groupId, long roleId)
270         throws com.liferay.portal.SystemException;
271 
272     public void removeAll() throws com.liferay.portal.SystemException;
273 
274     public int countByUserId(long userId)
275         throws com.liferay.portal.SystemException;
276 
277     public int countByGroupId(long groupId)
278         throws com.liferay.portal.SystemException;
279 
280     public int countByRoleId(long roleId)
281         throws com.liferay.portal.SystemException;
282 
283     public int countByU_G(long userId, long groupId)
284         throws com.liferay.portal.SystemException;
285 
286     public int countByG_R(long groupId, long roleId)
287         throws com.liferay.portal.SystemException;
288 
289     public int countAll() throws com.liferay.portal.SystemException;
290 }