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="RolePersistence.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       RolePersistenceImpl
36   * @see       RoleUtil
37   * @generated
38   */
39  public interface RolePersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.Role role);
41  
42      public void cacheResult(java.util.List<com.liferay.portal.model.Role> roles);
43  
44      public void clearCache();
45  
46      public com.liferay.portal.model.Role create(long roleId);
47  
48      public com.liferay.portal.model.Role remove(long roleId)
49          throws com.liferay.portal.NoSuchRoleException,
50              com.liferay.portal.SystemException;
51  
52      public com.liferay.portal.model.Role remove(
53          com.liferay.portal.model.Role role)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * @deprecated Use {@link #update(Role, boolean merge)}.
58       */
59      public com.liferay.portal.model.Role update(
60          com.liferay.portal.model.Role role)
61          throws com.liferay.portal.SystemException;
62  
63      /**
64       * Add, update, or merge, the entity. This method also calls the model
65       * listeners to trigger the proper events associated with adding, deleting,
66       * or updating an entity.
67       *
68       * @param  role the entity to add, update, or merge
69       * @param  merge boolean value for whether to merge the entity. The default
70       *         value is false. Setting merge to true is more expensive and
71       *         should only be true when role is transient. See
72       *         LEP-5473 for a detailed discussion of this method.
73       * @return the entity that was added, updated, or merged
74       */
75      public com.liferay.portal.model.Role update(
76          com.liferay.portal.model.Role role, boolean merge)
77          throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portal.model.Role updateImpl(
80          com.liferay.portal.model.Role role, boolean merge)
81          throws com.liferay.portal.SystemException;
82  
83      public com.liferay.portal.model.Role findByPrimaryKey(long roleId)
84          throws com.liferay.portal.NoSuchRoleException,
85              com.liferay.portal.SystemException;
86  
87      public com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
88          throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
91          long companyId) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
94          long companyId, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
98          long companyId, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
102     public com.liferay.portal.model.Role findByCompanyId_First(long companyId,
103         com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.NoSuchRoleException,
105             com.liferay.portal.SystemException;
106 
107     public com.liferay.portal.model.Role findByCompanyId_Last(long companyId,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.NoSuchRoleException,
110             com.liferay.portal.SystemException;
111 
112     public com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
113         long roleId, long companyId,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.NoSuchRoleException,
116             com.liferay.portal.SystemException;
117 
118     public com.liferay.portal.model.Role findByC_N(long companyId,
119         java.lang.String name)
120         throws com.liferay.portal.NoSuchRoleException,
121             com.liferay.portal.SystemException;
122 
123     public com.liferay.portal.model.Role fetchByC_N(long companyId,
124         java.lang.String name) throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portal.model.Role fetchByC_N(long companyId,
127         java.lang.String name, boolean retrieveFromCache)
128         throws com.liferay.portal.SystemException;
129 
130     public com.liferay.portal.model.Role findByC_C_C(long companyId,
131         long classNameId, long classPK)
132         throws com.liferay.portal.NoSuchRoleException,
133             com.liferay.portal.SystemException;
134 
135     public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
136         long classNameId, long classPK)
137         throws com.liferay.portal.SystemException;
138 
139     public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
140         long classNameId, long classPK, boolean retrieveFromCache)
141         throws com.liferay.portal.SystemException;
142 
143     public java.util.List<Object> findWithDynamicQuery(
144         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
145         throws com.liferay.portal.SystemException;
146 
147     public java.util.List<Object> findWithDynamicQuery(
148         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
149         int end) throws com.liferay.portal.SystemException;
150 
151     public java.util.List<com.liferay.portal.model.Role> findAll()
152         throws com.liferay.portal.SystemException;
153 
154     public java.util.List<com.liferay.portal.model.Role> findAll(int start,
155         int end) throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portal.model.Role> findAll(int start,
158         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException;
160 
161     public void removeByCompanyId(long companyId)
162         throws com.liferay.portal.SystemException;
163 
164     public void removeByC_N(long companyId, java.lang.String name)
165         throws com.liferay.portal.NoSuchRoleException,
166             com.liferay.portal.SystemException;
167 
168     public void removeByC_C_C(long companyId, long classNameId, long classPK)
169         throws com.liferay.portal.NoSuchRoleException,
170             com.liferay.portal.SystemException;
171 
172     public void removeAll() throws com.liferay.portal.SystemException;
173 
174     public int countByCompanyId(long companyId)
175         throws com.liferay.portal.SystemException;
176 
177     public int countByC_N(long companyId, java.lang.String name)
178         throws com.liferay.portal.SystemException;
179 
180     public int countByC_C_C(long companyId, long classNameId, long classPK)
181         throws com.liferay.portal.SystemException;
182 
183     public int countAll() throws com.liferay.portal.SystemException;
184 
185     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
186         throws com.liferay.portal.SystemException;
187 
188     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
189         int start, int end) throws com.liferay.portal.SystemException;
190 
191     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
192         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException;
194 
195     public int getGroupsSize(long pk) throws com.liferay.portal.SystemException;
196 
197     public boolean containsGroup(long pk, long groupPK)
198         throws com.liferay.portal.SystemException;
199 
200     public boolean containsGroups(long pk)
201         throws com.liferay.portal.SystemException;
202 
203     public void addGroup(long pk, long groupPK)
204         throws com.liferay.portal.SystemException;
205 
206     public void addGroup(long pk, com.liferay.portal.model.Group group)
207         throws com.liferay.portal.SystemException;
208 
209     public void addGroups(long pk, long[] groupPKs)
210         throws com.liferay.portal.SystemException;
211 
212     public void addGroups(long pk,
213         java.util.List<com.liferay.portal.model.Group> groups)
214         throws com.liferay.portal.SystemException;
215 
216     public void clearGroups(long pk) throws com.liferay.portal.SystemException;
217 
218     public void removeGroup(long pk, long groupPK)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeGroup(long pk, com.liferay.portal.model.Group group)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeGroups(long pk, long[] groupPKs)
225         throws com.liferay.portal.SystemException;
226 
227     public void removeGroups(long pk,
228         java.util.List<com.liferay.portal.model.Group> groups)
229         throws com.liferay.portal.SystemException;
230 
231     public void setGroups(long pk, long[] groupPKs)
232         throws com.liferay.portal.SystemException;
233 
234     public void setGroups(long pk,
235         java.util.List<com.liferay.portal.model.Group> groups)
236         throws com.liferay.portal.SystemException;
237 
238     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
239         long pk) throws com.liferay.portal.SystemException;
240 
241     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
242         long pk, int start, int end) throws com.liferay.portal.SystemException;
243 
244     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
245         long pk, int start, int end,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.SystemException;
248 
249     public int getPermissionsSize(long pk)
250         throws com.liferay.portal.SystemException;
251 
252     public boolean containsPermission(long pk, long permissionPK)
253         throws com.liferay.portal.SystemException;
254 
255     public boolean containsPermissions(long pk)
256         throws com.liferay.portal.SystemException;
257 
258     public void addPermission(long pk, long permissionPK)
259         throws com.liferay.portal.SystemException;
260 
261     public void addPermission(long pk,
262         com.liferay.portal.model.Permission permission)
263         throws com.liferay.portal.SystemException;
264 
265     public void addPermissions(long pk, long[] permissionPKs)
266         throws com.liferay.portal.SystemException;
267 
268     public void addPermissions(long pk,
269         java.util.List<com.liferay.portal.model.Permission> permissions)
270         throws com.liferay.portal.SystemException;
271 
272     public void clearPermissions(long pk)
273         throws com.liferay.portal.SystemException;
274 
275     public void removePermission(long pk, long permissionPK)
276         throws com.liferay.portal.SystemException;
277 
278     public void removePermission(long pk,
279         com.liferay.portal.model.Permission permission)
280         throws com.liferay.portal.SystemException;
281 
282     public void removePermissions(long pk, long[] permissionPKs)
283         throws com.liferay.portal.SystemException;
284 
285     public void removePermissions(long pk,
286         java.util.List<com.liferay.portal.model.Permission> permissions)
287         throws com.liferay.portal.SystemException;
288 
289     public void setPermissions(long pk, long[] permissionPKs)
290         throws com.liferay.portal.SystemException;
291 
292     public void setPermissions(long pk,
293         java.util.List<com.liferay.portal.model.Permission> permissions)
294         throws com.liferay.portal.SystemException;
295 
296     public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
297         throws com.liferay.portal.SystemException;
298 
299     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
300         int start, int end) throws com.liferay.portal.SystemException;
301 
302     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
303         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
304         throws com.liferay.portal.SystemException;
305 
306     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
307 
308     public boolean containsUser(long pk, long userPK)
309         throws com.liferay.portal.SystemException;
310 
311     public boolean containsUsers(long pk)
312         throws com.liferay.portal.SystemException;
313 
314     public void addUser(long pk, long userPK)
315         throws com.liferay.portal.SystemException;
316 
317     public void addUser(long pk, com.liferay.portal.model.User user)
318         throws com.liferay.portal.SystemException;
319 
320     public void addUsers(long pk, long[] userPKs)
321         throws com.liferay.portal.SystemException;
322 
323     public void addUsers(long pk,
324         java.util.List<com.liferay.portal.model.User> users)
325         throws com.liferay.portal.SystemException;
326 
327     public void clearUsers(long pk) throws com.liferay.portal.SystemException;
328 
329     public void removeUser(long pk, long userPK)
330         throws com.liferay.portal.SystemException;
331 
332     public void removeUser(long pk, com.liferay.portal.model.User user)
333         throws com.liferay.portal.SystemException;
334 
335     public void removeUsers(long pk, long[] userPKs)
336         throws com.liferay.portal.SystemException;
337 
338     public void removeUsers(long pk,
339         java.util.List<com.liferay.portal.model.User> users)
340         throws com.liferay.portal.SystemException;
341 
342     public void setUsers(long pk, long[] userPKs)
343         throws com.liferay.portal.SystemException;
344 
345     public void setUsers(long pk,
346         java.util.List<com.liferay.portal.model.User> users)
347         throws com.liferay.portal.SystemException;
348 }