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 java.util.List<com.liferay.portal.model.Role> findBySubtype(
119         java.lang.String subtype) throws com.liferay.portal.SystemException;
120 
121     public java.util.List<com.liferay.portal.model.Role> findBySubtype(
122         java.lang.String subtype, int start, int end)
123         throws com.liferay.portal.SystemException;
124 
125     public java.util.List<com.liferay.portal.model.Role> findBySubtype(
126         java.lang.String subtype, int start, int end,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException;
129 
130     public com.liferay.portal.model.Role findBySubtype_First(
131         java.lang.String subtype,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.NoSuchRoleException,
134             com.liferay.portal.SystemException;
135 
136     public com.liferay.portal.model.Role findBySubtype_Last(
137         java.lang.String subtype,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.NoSuchRoleException,
140             com.liferay.portal.SystemException;
141 
142     public com.liferay.portal.model.Role[] findBySubtype_PrevAndNext(
143         long roleId, java.lang.String subtype,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.NoSuchRoleException,
146             com.liferay.portal.SystemException;
147 
148     public com.liferay.portal.model.Role findByC_N(long companyId,
149         java.lang.String name)
150         throws com.liferay.portal.NoSuchRoleException,
151             com.liferay.portal.SystemException;
152 
153     public com.liferay.portal.model.Role fetchByC_N(long companyId,
154         java.lang.String name) throws com.liferay.portal.SystemException;
155 
156     public com.liferay.portal.model.Role fetchByC_N(long companyId,
157         java.lang.String name, boolean retrieveFromCache)
158         throws com.liferay.portal.SystemException;
159 
160     public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
161         java.lang.String subtype) throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
164         java.lang.String subtype, int start, int end)
165         throws com.liferay.portal.SystemException;
166 
167     public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
168         java.lang.String subtype, int start, int end,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException;
171 
172     public com.liferay.portal.model.Role findByT_S_First(int type,
173         java.lang.String subtype,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.NoSuchRoleException,
176             com.liferay.portal.SystemException;
177 
178     public com.liferay.portal.model.Role findByT_S_Last(int type,
179         java.lang.String subtype,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.NoSuchRoleException,
182             com.liferay.portal.SystemException;
183 
184     public com.liferay.portal.model.Role[] findByT_S_PrevAndNext(long roleId,
185         int type, java.lang.String subtype,
186         com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.NoSuchRoleException,
188             com.liferay.portal.SystemException;
189 
190     public com.liferay.portal.model.Role findByC_C_C(long companyId,
191         long classNameId, long classPK)
192         throws com.liferay.portal.NoSuchRoleException,
193             com.liferay.portal.SystemException;
194 
195     public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
196         long classNameId, long classPK)
197         throws com.liferay.portal.SystemException;
198 
199     public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
200         long classNameId, long classPK, boolean retrieveFromCache)
201         throws com.liferay.portal.SystemException;
202 
203     public java.util.List<Object> findWithDynamicQuery(
204         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
205         throws com.liferay.portal.SystemException;
206 
207     public java.util.List<Object> findWithDynamicQuery(
208         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
209         int end) throws com.liferay.portal.SystemException;
210 
211     public java.util.List<com.liferay.portal.model.Role> findAll()
212         throws com.liferay.portal.SystemException;
213 
214     public java.util.List<com.liferay.portal.model.Role> findAll(int start,
215         int end) throws com.liferay.portal.SystemException;
216 
217     public java.util.List<com.liferay.portal.model.Role> findAll(int start,
218         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeByCompanyId(long companyId)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeBySubtype(java.lang.String subtype)
225         throws com.liferay.portal.SystemException;
226 
227     public void removeByC_N(long companyId, java.lang.String name)
228         throws com.liferay.portal.NoSuchRoleException,
229             com.liferay.portal.SystemException;
230 
231     public void removeByT_S(int type, java.lang.String subtype)
232         throws com.liferay.portal.SystemException;
233 
234     public void removeByC_C_C(long companyId, long classNameId, long classPK)
235         throws com.liferay.portal.NoSuchRoleException,
236             com.liferay.portal.SystemException;
237 
238     public void removeAll() throws com.liferay.portal.SystemException;
239 
240     public int countByCompanyId(long companyId)
241         throws com.liferay.portal.SystemException;
242 
243     public int countBySubtype(java.lang.String subtype)
244         throws com.liferay.portal.SystemException;
245 
246     public int countByC_N(long companyId, java.lang.String name)
247         throws com.liferay.portal.SystemException;
248 
249     public int countByT_S(int type, java.lang.String subtype)
250         throws com.liferay.portal.SystemException;
251 
252     public int countByC_C_C(long companyId, long classNameId, long classPK)
253         throws com.liferay.portal.SystemException;
254 
255     public int countAll() throws com.liferay.portal.SystemException;
256 
257     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
258         throws com.liferay.portal.SystemException;
259 
260     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
261         int start, int end) throws com.liferay.portal.SystemException;
262 
263     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
264         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.SystemException;
266 
267     public int getGroupsSize(long pk) throws com.liferay.portal.SystemException;
268 
269     public boolean containsGroup(long pk, long groupPK)
270         throws com.liferay.portal.SystemException;
271 
272     public boolean containsGroups(long pk)
273         throws com.liferay.portal.SystemException;
274 
275     public void addGroup(long pk, long groupPK)
276         throws com.liferay.portal.SystemException;
277 
278     public void addGroup(long pk, com.liferay.portal.model.Group group)
279         throws com.liferay.portal.SystemException;
280 
281     public void addGroups(long pk, long[] groupPKs)
282         throws com.liferay.portal.SystemException;
283 
284     public void addGroups(long pk,
285         java.util.List<com.liferay.portal.model.Group> groups)
286         throws com.liferay.portal.SystemException;
287 
288     public void clearGroups(long pk) throws com.liferay.portal.SystemException;
289 
290     public void removeGroup(long pk, long groupPK)
291         throws com.liferay.portal.SystemException;
292 
293     public void removeGroup(long pk, com.liferay.portal.model.Group group)
294         throws com.liferay.portal.SystemException;
295 
296     public void removeGroups(long pk, long[] groupPKs)
297         throws com.liferay.portal.SystemException;
298 
299     public void removeGroups(long pk,
300         java.util.List<com.liferay.portal.model.Group> groups)
301         throws com.liferay.portal.SystemException;
302 
303     public void setGroups(long pk, long[] groupPKs)
304         throws com.liferay.portal.SystemException;
305 
306     public void setGroups(long pk,
307         java.util.List<com.liferay.portal.model.Group> groups)
308         throws com.liferay.portal.SystemException;
309 
310     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
311         long pk) throws com.liferay.portal.SystemException;
312 
313     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
314         long pk, int start, int end) throws com.liferay.portal.SystemException;
315 
316     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
317         long pk, int start, int end,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException;
320 
321     public int getPermissionsSize(long pk)
322         throws com.liferay.portal.SystemException;
323 
324     public boolean containsPermission(long pk, long permissionPK)
325         throws com.liferay.portal.SystemException;
326 
327     public boolean containsPermissions(long pk)
328         throws com.liferay.portal.SystemException;
329 
330     public void addPermission(long pk, long permissionPK)
331         throws com.liferay.portal.SystemException;
332 
333     public void addPermission(long pk,
334         com.liferay.portal.model.Permission permission)
335         throws com.liferay.portal.SystemException;
336 
337     public void addPermissions(long pk, long[] permissionPKs)
338         throws com.liferay.portal.SystemException;
339 
340     public void addPermissions(long pk,
341         java.util.List<com.liferay.portal.model.Permission> permissions)
342         throws com.liferay.portal.SystemException;
343 
344     public void clearPermissions(long pk)
345         throws com.liferay.portal.SystemException;
346 
347     public void removePermission(long pk, long permissionPK)
348         throws com.liferay.portal.SystemException;
349 
350     public void removePermission(long pk,
351         com.liferay.portal.model.Permission permission)
352         throws com.liferay.portal.SystemException;
353 
354     public void removePermissions(long pk, long[] permissionPKs)
355         throws com.liferay.portal.SystemException;
356 
357     public void removePermissions(long pk,
358         java.util.List<com.liferay.portal.model.Permission> permissions)
359         throws com.liferay.portal.SystemException;
360 
361     public void setPermissions(long pk, long[] permissionPKs)
362         throws com.liferay.portal.SystemException;
363 
364     public void setPermissions(long pk,
365         java.util.List<com.liferay.portal.model.Permission> permissions)
366         throws com.liferay.portal.SystemException;
367 
368     public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
369         throws com.liferay.portal.SystemException;
370 
371     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
372         int start, int end) throws com.liferay.portal.SystemException;
373 
374     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
375         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
376         throws com.liferay.portal.SystemException;
377 
378     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
379 
380     public boolean containsUser(long pk, long userPK)
381         throws com.liferay.portal.SystemException;
382 
383     public boolean containsUsers(long pk)
384         throws com.liferay.portal.SystemException;
385 
386     public void addUser(long pk, long userPK)
387         throws com.liferay.portal.SystemException;
388 
389     public void addUser(long pk, com.liferay.portal.model.User user)
390         throws com.liferay.portal.SystemException;
391 
392     public void addUsers(long pk, long[] userPKs)
393         throws com.liferay.portal.SystemException;
394 
395     public void addUsers(long pk,
396         java.util.List<com.liferay.portal.model.User> users)
397         throws com.liferay.portal.SystemException;
398 
399     public void clearUsers(long pk) throws com.liferay.portal.SystemException;
400 
401     public void removeUser(long pk, long userPK)
402         throws com.liferay.portal.SystemException;
403 
404     public void removeUser(long pk, com.liferay.portal.model.User user)
405         throws com.liferay.portal.SystemException;
406 
407     public void removeUsers(long pk, long[] userPKs)
408         throws com.liferay.portal.SystemException;
409 
410     public void removeUsers(long pk,
411         java.util.List<com.liferay.portal.model.User> users)
412         throws com.liferay.portal.SystemException;
413 
414     public void setUsers(long pk, long[] userPKs)
415         throws com.liferay.portal.SystemException;
416 
417     public void setUsers(long pk,
418         java.util.List<com.liferay.portal.model.User> users)
419         throws com.liferay.portal.SystemException;
420 }