1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="UserGroupRolePersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface UserGroupRolePersistence extends BasePersistence {
32      public void cacheResult(
33          com.liferay.portal.model.UserGroupRole userGroupRole);
34  
35      public void cacheResult(
36          java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles);
37  
38      public void clearCache();
39  
40      public com.liferay.portal.model.UserGroupRole create(
41          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK);
42  
43      public com.liferay.portal.model.UserGroupRole remove(
44          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
45          throws com.liferay.portal.NoSuchUserGroupRoleException,
46              com.liferay.portal.SystemException;
47  
48      public com.liferay.portal.model.UserGroupRole remove(
49          com.liferay.portal.model.UserGroupRole userGroupRole)
50          throws com.liferay.portal.SystemException;
51  
52      /**
53       * @deprecated Use <code>update(UserGroupRole userGroupRole, boolean merge)</code>.
54       */
55      public com.liferay.portal.model.UserGroupRole update(
56          com.liferay.portal.model.UserGroupRole userGroupRole)
57          throws com.liferay.portal.SystemException;
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        userGroupRole the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when userGroupRole is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public com.liferay.portal.model.UserGroupRole update(
73          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
74          throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portal.model.UserGroupRole updateImpl(
77          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.UserGroupRole findByPrimaryKey(
81          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
82          throws com.liferay.portal.NoSuchUserGroupRoleException,
83              com.liferay.portal.SystemException;
84  
85      public com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
86          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
87          throws com.liferay.portal.SystemException;
88  
89      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
90          long userId) throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
93          long userId, int start, int end)
94          throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
97          long userId, int start, int end,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     public com.liferay.portal.model.UserGroupRole findByUserId_First(
102         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.NoSuchUserGroupRoleException,
104             com.liferay.portal.SystemException;
105 
106     public com.liferay.portal.model.UserGroupRole findByUserId_Last(
107         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.NoSuchUserGroupRoleException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
112         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
113         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.NoSuchUserGroupRoleException,
115             com.liferay.portal.SystemException;
116 
117     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
118         long groupId) throws com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
121         long groupId, int start, int end)
122         throws com.liferay.portal.SystemException;
123 
124     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
125         long groupId, int start, int end,
126         com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException;
128 
129     public com.liferay.portal.model.UserGroupRole findByGroupId_First(
130         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.NoSuchUserGroupRoleException,
132             com.liferay.portal.SystemException;
133 
134     public com.liferay.portal.model.UserGroupRole findByGroupId_Last(
135         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.NoSuchUserGroupRoleException,
137             com.liferay.portal.SystemException;
138 
139     public com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
140         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
141         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchUserGroupRoleException,
143             com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
146         long roleId) throws com.liferay.portal.SystemException;
147 
148     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
149         long roleId, int start, int end)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
153         long roleId, int start, int end,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException;
156 
157     public com.liferay.portal.model.UserGroupRole findByRoleId_First(
158         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.NoSuchUserGroupRoleException,
160             com.liferay.portal.SystemException;
161 
162     public com.liferay.portal.model.UserGroupRole findByRoleId_Last(
163         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.NoSuchUserGroupRoleException,
165             com.liferay.portal.SystemException;
166 
167     public com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
168         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
169         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.NoSuchUserGroupRoleException,
171             com.liferay.portal.SystemException;
172 
173     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
174         long userId, long groupId) throws com.liferay.portal.SystemException;
175 
176     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
177         long userId, long groupId, int start, int end)
178         throws com.liferay.portal.SystemException;
179 
180     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
181         long userId, long groupId, int start, int end,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException;
184 
185     public com.liferay.portal.model.UserGroupRole findByU_G_First(long userId,
186         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.NoSuchUserGroupRoleException,
188             com.liferay.portal.SystemException;
189 
190     public com.liferay.portal.model.UserGroupRole findByU_G_Last(long userId,
191         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.NoSuchUserGroupRoleException,
193             com.liferay.portal.SystemException;
194 
195     public com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
196         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
197         long userId, long groupId,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.NoSuchUserGroupRoleException,
200             com.liferay.portal.SystemException;
201 
202     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
203         long groupId, long roleId) throws com.liferay.portal.SystemException;
204 
205     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
206         long groupId, long roleId, int start, int end)
207         throws com.liferay.portal.SystemException;
208 
209     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
210         long groupId, long roleId, int start, int end,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException;
213 
214     public com.liferay.portal.model.UserGroupRole findByG_R_First(
215         long groupId, long roleId,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.NoSuchUserGroupRoleException,
218             com.liferay.portal.SystemException;
219 
220     public com.liferay.portal.model.UserGroupRole findByG_R_Last(long groupId,
221         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.NoSuchUserGroupRoleException,
223             com.liferay.portal.SystemException;
224 
225     public com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
226         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
227         long groupId, long roleId,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.NoSuchUserGroupRoleException,
230             com.liferay.portal.SystemException;
231 
232     public java.util.List<Object> findWithDynamicQuery(
233         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
234         throws com.liferay.portal.SystemException;
235 
236     public java.util.List<Object> findWithDynamicQuery(
237         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
238         int end) throws com.liferay.portal.SystemException;
239 
240     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
241         throws com.liferay.portal.SystemException;
242 
243     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
244         int start, int end) throws com.liferay.portal.SystemException;
245 
246     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
247         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException;
249 
250     public void removeByUserId(long userId)
251         throws com.liferay.portal.SystemException;
252 
253     public void removeByGroupId(long groupId)
254         throws com.liferay.portal.SystemException;
255 
256     public void removeByRoleId(long roleId)
257         throws com.liferay.portal.SystemException;
258 
259     public void removeByU_G(long userId, long groupId)
260         throws com.liferay.portal.SystemException;
261 
262     public void removeByG_R(long groupId, long roleId)
263         throws com.liferay.portal.SystemException;
264 
265     public void removeAll() throws com.liferay.portal.SystemException;
266 
267     public int countByUserId(long userId)
268         throws com.liferay.portal.SystemException;
269 
270     public int countByGroupId(long groupId)
271         throws com.liferay.portal.SystemException;
272 
273     public int countByRoleId(long roleId)
274         throws com.liferay.portal.SystemException;
275 
276     public int countByU_G(long userId, long groupId)
277         throws com.liferay.portal.SystemException;
278 
279     public int countByG_R(long groupId, long roleId)
280         throws com.liferay.portal.SystemException;
281 
282     public int countAll() throws com.liferay.portal.SystemException;
283 }