1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service.persistence;
21  
22  /**
23   * <a href="UserGroupRolePersistence.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public interface UserGroupRolePersistence extends BasePersistence {
29      public void cacheResult(
30          com.liferay.portal.model.UserGroupRole userGroupRole);
31  
32      public void cacheResult(
33          java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles);
34  
35      public void clearCache();
36  
37      public com.liferay.portal.model.UserGroupRole create(
38          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK);
39  
40      public com.liferay.portal.model.UserGroupRole remove(
41          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
42          throws com.liferay.portal.NoSuchUserGroupRoleException,
43              com.liferay.portal.SystemException;
44  
45      public com.liferay.portal.model.UserGroupRole remove(
46          com.liferay.portal.model.UserGroupRole userGroupRole)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(UserGroupRole userGroupRole, boolean merge)</code>.
51       */
52      public com.liferay.portal.model.UserGroupRole update(
53          com.liferay.portal.model.UserGroupRole userGroupRole)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        userGroupRole the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when userGroupRole is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portal.model.UserGroupRole update(
70          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portal.model.UserGroupRole updateImpl(
74          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portal.model.UserGroupRole findByPrimaryKey(
78          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
79          throws com.liferay.portal.NoSuchUserGroupRoleException,
80              com.liferay.portal.SystemException;
81  
82      public com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
83          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
84          throws com.liferay.portal.SystemException;
85  
86      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
87          long userId) throws com.liferay.portal.SystemException;
88  
89      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
90          long userId, int start, int end)
91          throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
94          long userId, int start, int end,
95          com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException;
97  
98      public com.liferay.portal.model.UserGroupRole findByUserId_First(
99          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.NoSuchUserGroupRoleException,
101             com.liferay.portal.SystemException;
102 
103     public com.liferay.portal.model.UserGroupRole findByUserId_Last(
104         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.NoSuchUserGroupRoleException,
106             com.liferay.portal.SystemException;
107 
108     public com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
109         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
110         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.NoSuchUserGroupRoleException,
112             com.liferay.portal.SystemException;
113 
114     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
115         long groupId) throws com.liferay.portal.SystemException;
116 
117     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
118         long groupId, int start, int end)
119         throws com.liferay.portal.SystemException;
120 
121     public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
122         long groupId, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portal.model.UserGroupRole findByGroupId_First(
127         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.NoSuchUserGroupRoleException,
129             com.liferay.portal.SystemException;
130 
131     public com.liferay.portal.model.UserGroupRole findByGroupId_Last(
132         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.NoSuchUserGroupRoleException,
134             com.liferay.portal.SystemException;
135 
136     public com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
137         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
138         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.NoSuchUserGroupRoleException,
140             com.liferay.portal.SystemException;
141 
142     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
143         long roleId) throws com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
146         long roleId, int start, int end)
147         throws com.liferay.portal.SystemException;
148 
149     public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
150         long roleId, int start, int end,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException;
153 
154     public com.liferay.portal.model.UserGroupRole findByRoleId_First(
155         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.NoSuchUserGroupRoleException,
157             com.liferay.portal.SystemException;
158 
159     public com.liferay.portal.model.UserGroupRole findByRoleId_Last(
160         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.NoSuchUserGroupRoleException,
162             com.liferay.portal.SystemException;
163 
164     public com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
165         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
166         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.NoSuchUserGroupRoleException,
168             com.liferay.portal.SystemException;
169 
170     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
171         long userId, long groupId) throws com.liferay.portal.SystemException;
172 
173     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
174         long userId, long groupId, int start, int end)
175         throws com.liferay.portal.SystemException;
176 
177     public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
178         long userId, long groupId, int start, int end,
179         com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException;
181 
182     public com.liferay.portal.model.UserGroupRole findByU_G_First(long userId,
183         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.NoSuchUserGroupRoleException,
185             com.liferay.portal.SystemException;
186 
187     public com.liferay.portal.model.UserGroupRole findByU_G_Last(long userId,
188         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.NoSuchUserGroupRoleException,
190             com.liferay.portal.SystemException;
191 
192     public com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
193         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
194         long userId, long groupId,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.NoSuchUserGroupRoleException,
197             com.liferay.portal.SystemException;
198 
199     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
200         long groupId, long roleId) throws com.liferay.portal.SystemException;
201 
202     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
203         long groupId, long roleId, int start, int end)
204         throws com.liferay.portal.SystemException;
205 
206     public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
207         long groupId, long roleId, int start, int end,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException;
210 
211     public com.liferay.portal.model.UserGroupRole findByG_R_First(
212         long groupId, long roleId,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.NoSuchUserGroupRoleException,
215             com.liferay.portal.SystemException;
216 
217     public com.liferay.portal.model.UserGroupRole findByG_R_Last(long groupId,
218         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.NoSuchUserGroupRoleException,
220             com.liferay.portal.SystemException;
221 
222     public com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
223         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
224         long groupId, long roleId,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.NoSuchUserGroupRoleException,
227             com.liferay.portal.SystemException;
228 
229     public java.util.List<Object> findWithDynamicQuery(
230         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
231         throws com.liferay.portal.SystemException;
232 
233     public java.util.List<Object> findWithDynamicQuery(
234         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
235         int end) throws com.liferay.portal.SystemException;
236 
237     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
238         throws com.liferay.portal.SystemException;
239 
240     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
241         int start, int end) throws com.liferay.portal.SystemException;
242 
243     public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
244         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.SystemException;
246 
247     public void removeByUserId(long userId)
248         throws com.liferay.portal.SystemException;
249 
250     public void removeByGroupId(long groupId)
251         throws com.liferay.portal.SystemException;
252 
253     public void removeByRoleId(long roleId)
254         throws com.liferay.portal.SystemException;
255 
256     public void removeByU_G(long userId, long groupId)
257         throws com.liferay.portal.SystemException;
258 
259     public void removeByG_R(long groupId, long roleId)
260         throws com.liferay.portal.SystemException;
261 
262     public void removeAll() throws com.liferay.portal.SystemException;
263 
264     public int countByUserId(long userId)
265         throws com.liferay.portal.SystemException;
266 
267     public int countByGroupId(long groupId)
268         throws com.liferay.portal.SystemException;
269 
270     public int countByRoleId(long roleId)
271         throws com.liferay.portal.SystemException;
272 
273     public int countByU_G(long userId, long groupId)
274         throws com.liferay.portal.SystemException;
275 
276     public int countByG_R(long groupId, long roleId)
277         throws com.liferay.portal.SystemException;
278 
279     public int countAll() throws com.liferay.portal.SystemException;
280 }