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