1   /**
2    * Copyright (c) 2000-2007 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 {
32      public com.liferay.portal.model.UserGroupRole create(
33          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK);
34  
35      public com.liferay.portal.model.UserGroupRole remove(
36          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchUserGroupRoleException;
39  
40      public com.liferay.portal.model.UserGroupRole remove(
41          com.liferay.portal.model.UserGroupRole userGroupRole)
42          throws com.liferay.portal.SystemException;
43  
44      public com.liferay.portal.model.UserGroupRole update(
45          com.liferay.portal.model.UserGroupRole userGroupRole)
46          throws com.liferay.portal.SystemException;
47  
48      public com.liferay.portal.model.UserGroupRole update(
49          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
50          throws com.liferay.portal.SystemException;
51  
52      public com.liferay.portal.model.UserGroupRole findByPrimaryKey(
53          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
54          throws com.liferay.portal.SystemException, 
55              com.liferay.portal.NoSuchUserGroupRoleException;
56  
57      public com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
58          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
59          throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByU_G(long userId, long groupId)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByU_G(long userId, long groupId, int begin,
65          int end) throws com.liferay.portal.SystemException;
66  
67      public java.util.List findByU_G(long userId, long groupId, int begin,
68          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
69          throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portal.model.UserGroupRole findByU_G_First(long userId,
72          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
73          throws com.liferay.portal.SystemException, 
74              com.liferay.portal.NoSuchUserGroupRoleException;
75  
76      public com.liferay.portal.model.UserGroupRole findByU_G_Last(long userId,
77          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
78          throws com.liferay.portal.SystemException, 
79              com.liferay.portal.NoSuchUserGroupRoleException;
80  
81      public com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
82          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
83          long userId, long groupId,
84          com.liferay.portal.kernel.util.OrderByComparator obc)
85          throws com.liferay.portal.SystemException, 
86              com.liferay.portal.NoSuchUserGroupRoleException;
87  
88      public java.util.List findByUserId(long userId)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List findByUserId(long userId, int begin, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List findByUserId(long userId, int begin, 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.SystemException, 
101             com.liferay.portal.NoSuchUserGroupRoleException;
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.SystemException, 
106             com.liferay.portal.NoSuchUserGroupRoleException;
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.SystemException, 
112             com.liferay.portal.NoSuchUserGroupRoleException;
113 
114     public java.util.List findByGroupId(long groupId)
115         throws com.liferay.portal.SystemException;
116 
117     public java.util.List findByGroupId(long groupId, int begin, int end)
118         throws com.liferay.portal.SystemException;
119 
120     public java.util.List findByGroupId(long groupId, int begin, int end,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portal.model.UserGroupRole findByGroupId_First(
125         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException, 
127             com.liferay.portal.NoSuchUserGroupRoleException;
128 
129     public com.liferay.portal.model.UserGroupRole findByGroupId_Last(
130         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException, 
132             com.liferay.portal.NoSuchUserGroupRoleException;
133 
134     public com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
135         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
136         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException, 
138             com.liferay.portal.NoSuchUserGroupRoleException;
139 
140     public java.util.List findByRoleId(long roleId)
141         throws com.liferay.portal.SystemException;
142 
143     public java.util.List findByRoleId(long roleId, int begin, int end)
144         throws com.liferay.portal.SystemException;
145 
146     public java.util.List findByRoleId(long roleId, int begin, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException;
149 
150     public com.liferay.portal.model.UserGroupRole findByRoleId_First(
151         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException, 
153             com.liferay.portal.NoSuchUserGroupRoleException;
154 
155     public com.liferay.portal.model.UserGroupRole findByRoleId_Last(
156         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException, 
158             com.liferay.portal.NoSuchUserGroupRoleException;
159 
160     public com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
161         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
162         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException, 
164             com.liferay.portal.NoSuchUserGroupRoleException;
165 
166     public java.util.List findWithDynamicQuery(
167         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
168         throws com.liferay.portal.SystemException;
169 
170     public java.util.List findWithDynamicQuery(
171         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
172         int begin, int end) throws com.liferay.portal.SystemException;
173 
174     public java.util.List findAll() throws com.liferay.portal.SystemException;
175 
176     public java.util.List findAll(int begin, int end)
177         throws com.liferay.portal.SystemException;
178 
179     public java.util.List findAll(int begin, int end,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException;
182 
183     public void removeByU_G(long userId, long groupId)
184         throws com.liferay.portal.SystemException;
185 
186     public void removeByUserId(long userId)
187         throws com.liferay.portal.SystemException;
188 
189     public void removeByGroupId(long groupId)
190         throws com.liferay.portal.SystemException;
191 
192     public void removeByRoleId(long roleId)
193         throws com.liferay.portal.SystemException;
194 
195     public void removeAll() throws com.liferay.portal.SystemException;
196 
197     public int countByU_G(long userId, long groupId)
198         throws com.liferay.portal.SystemException;
199 
200     public int countByUserId(long userId)
201         throws com.liferay.portal.SystemException;
202 
203     public int countByGroupId(long groupId)
204         throws com.liferay.portal.SystemException;
205 
206     public int countByRoleId(long roleId)
207         throws com.liferay.portal.SystemException;
208 
209     public int countAll() throws com.liferay.portal.SystemException;
210 }