001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="RolePersistence.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public interface RolePersistence {
030: public com.liferay.portal.model.Role create(long roleId);
031:
032: public com.liferay.portal.model.Role remove(long roleId)
033: throws com.liferay.portal.SystemException,
034: com.liferay.portal.NoSuchRoleException;
035:
036: public com.liferay.portal.model.Role remove(
037: com.liferay.portal.model.Role role)
038: throws com.liferay.portal.SystemException;
039:
040: public com.liferay.portal.model.Role update(
041: com.liferay.portal.model.Role role)
042: throws com.liferay.portal.SystemException;
043:
044: public com.liferay.portal.model.Role update(
045: com.liferay.portal.model.Role role, boolean merge)
046: throws com.liferay.portal.SystemException;
047:
048: public com.liferay.portal.model.Role updateImpl(
049: com.liferay.portal.model.Role role, boolean merge)
050: throws com.liferay.portal.SystemException;
051:
052: public com.liferay.portal.model.Role findByPrimaryKey(long roleId)
053: throws com.liferay.portal.SystemException,
054: com.liferay.portal.NoSuchRoleException;
055:
056: public com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
057: throws com.liferay.portal.SystemException;
058:
059: public java.util.List findByCompanyId(long companyId)
060: throws com.liferay.portal.SystemException;
061:
062: public java.util.List findByCompanyId(long companyId, int begin,
063: int end) throws com.liferay.portal.SystemException;
064:
065: public java.util.List findByCompanyId(long companyId, int begin,
066: int end,
067: com.liferay.portal.kernel.util.OrderByComparator obc)
068: throws com.liferay.portal.SystemException;
069:
070: public com.liferay.portal.model.Role findByCompanyId_First(
071: long companyId,
072: com.liferay.portal.kernel.util.OrderByComparator obc)
073: throws com.liferay.portal.SystemException,
074: com.liferay.portal.NoSuchRoleException;
075:
076: public com.liferay.portal.model.Role findByCompanyId_Last(
077: long companyId,
078: com.liferay.portal.kernel.util.OrderByComparator obc)
079: throws com.liferay.portal.SystemException,
080: com.liferay.portal.NoSuchRoleException;
081:
082: public com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
083: long roleId, long companyId,
084: com.liferay.portal.kernel.util.OrderByComparator obc)
085: throws com.liferay.portal.SystemException,
086: com.liferay.portal.NoSuchRoleException;
087:
088: public com.liferay.portal.model.Role findByC_N(long companyId,
089: java.lang.String name)
090: throws com.liferay.portal.SystemException,
091: com.liferay.portal.NoSuchRoleException;
092:
093: public com.liferay.portal.model.Role fetchByC_N(long companyId,
094: java.lang.String name)
095: throws com.liferay.portal.SystemException;
096:
097: public com.liferay.portal.model.Role findByC_C_C(long companyId,
098: long classNameId, long classPK)
099: throws com.liferay.portal.SystemException,
100: com.liferay.portal.NoSuchRoleException;
101:
102: public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
103: long classNameId, long classPK)
104: throws com.liferay.portal.SystemException;
105:
106: public java.util.List findWithDynamicQuery(
107: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
108: throws com.liferay.portal.SystemException;
109:
110: public java.util.List findWithDynamicQuery(
111: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
112: int begin, int end)
113: throws com.liferay.portal.SystemException;
114:
115: public java.util.List findAll()
116: throws com.liferay.portal.SystemException;
117:
118: public java.util.List findAll(int begin, int end)
119: throws com.liferay.portal.SystemException;
120:
121: public java.util.List findAll(int begin, int end,
122: com.liferay.portal.kernel.util.OrderByComparator obc)
123: throws com.liferay.portal.SystemException;
124:
125: public void removeByCompanyId(long companyId)
126: throws com.liferay.portal.SystemException;
127:
128: public void removeByC_N(long companyId, java.lang.String name)
129: throws com.liferay.portal.SystemException,
130: com.liferay.portal.NoSuchRoleException;
131:
132: public void removeByC_C_C(long companyId, long classNameId,
133: long classPK) throws com.liferay.portal.SystemException,
134: com.liferay.portal.NoSuchRoleException;
135:
136: public void removeAll() throws com.liferay.portal.SystemException;
137:
138: public int countByCompanyId(long companyId)
139: throws com.liferay.portal.SystemException;
140:
141: public int countByC_N(long companyId, java.lang.String name)
142: throws com.liferay.portal.SystemException;
143:
144: public int countByC_C_C(long companyId, long classNameId,
145: long classPK) throws com.liferay.portal.SystemException;
146:
147: public int countAll() throws com.liferay.portal.SystemException;
148:
149: public java.util.List getGroups(long pk)
150: throws com.liferay.portal.SystemException,
151: com.liferay.portal.NoSuchRoleException;
152:
153: public java.util.List getGroups(long pk, int begin, int end)
154: throws com.liferay.portal.SystemException,
155: com.liferay.portal.NoSuchRoleException;
156:
157: public java.util.List getGroups(long pk, int begin, int end,
158: com.liferay.portal.kernel.util.OrderByComparator obc)
159: throws com.liferay.portal.SystemException,
160: com.liferay.portal.NoSuchRoleException;
161:
162: public int getGroupsSize(long pk)
163: throws com.liferay.portal.SystemException;
164:
165: public boolean containsGroup(long pk, long groupPK)
166: throws com.liferay.portal.SystemException;
167:
168: public boolean containsGroups(long pk)
169: throws com.liferay.portal.SystemException;
170:
171: public void addGroup(long pk, long groupPK)
172: throws com.liferay.portal.SystemException,
173: com.liferay.portal.NoSuchGroupException,
174: com.liferay.portal.NoSuchRoleException;
175:
176: public void addGroup(long pk, com.liferay.portal.model.Group group)
177: throws com.liferay.portal.SystemException,
178: com.liferay.portal.NoSuchGroupException,
179: com.liferay.portal.NoSuchRoleException;
180:
181: public void addGroups(long pk, long[] groupPKs)
182: throws com.liferay.portal.SystemException,
183: com.liferay.portal.NoSuchGroupException,
184: com.liferay.portal.NoSuchRoleException;
185:
186: public void addGroups(long pk, java.util.List groups)
187: throws com.liferay.portal.SystemException,
188: com.liferay.portal.NoSuchGroupException,
189: com.liferay.portal.NoSuchRoleException;
190:
191: public void clearGroups(long pk)
192: throws com.liferay.portal.SystemException,
193: com.liferay.portal.NoSuchRoleException;
194:
195: public void removeGroup(long pk, long groupPK)
196: throws com.liferay.portal.SystemException,
197: com.liferay.portal.NoSuchGroupException,
198: com.liferay.portal.NoSuchRoleException;
199:
200: public void removeGroup(long pk,
201: com.liferay.portal.model.Group group)
202: throws com.liferay.portal.SystemException,
203: com.liferay.portal.NoSuchGroupException,
204: com.liferay.portal.NoSuchRoleException;
205:
206: public void removeGroups(long pk, long[] groupPKs)
207: throws com.liferay.portal.SystemException,
208: com.liferay.portal.NoSuchGroupException,
209: com.liferay.portal.NoSuchRoleException;
210:
211: public void removeGroups(long pk, java.util.List groups)
212: throws com.liferay.portal.SystemException,
213: com.liferay.portal.NoSuchGroupException,
214: com.liferay.portal.NoSuchRoleException;
215:
216: public void setGroups(long pk, long[] groupPKs)
217: throws com.liferay.portal.SystemException,
218: com.liferay.portal.NoSuchGroupException,
219: com.liferay.portal.NoSuchRoleException;
220:
221: public void setGroups(long pk, java.util.List groups)
222: throws com.liferay.portal.SystemException,
223: com.liferay.portal.NoSuchGroupException,
224: com.liferay.portal.NoSuchRoleException;
225:
226: public java.util.List getPermissions(long pk)
227: throws com.liferay.portal.SystemException,
228: com.liferay.portal.NoSuchRoleException;
229:
230: public java.util.List getPermissions(long pk, int begin, int end)
231: throws com.liferay.portal.SystemException,
232: com.liferay.portal.NoSuchRoleException;
233:
234: public java.util.List getPermissions(long pk, int begin, int end,
235: com.liferay.portal.kernel.util.OrderByComparator obc)
236: throws com.liferay.portal.SystemException,
237: com.liferay.portal.NoSuchRoleException;
238:
239: public int getPermissionsSize(long pk)
240: throws com.liferay.portal.SystemException;
241:
242: public boolean containsPermission(long pk, long permissionPK)
243: throws com.liferay.portal.SystemException;
244:
245: public boolean containsPermissions(long pk)
246: throws com.liferay.portal.SystemException;
247:
248: public void addPermission(long pk, long permissionPK)
249: throws com.liferay.portal.SystemException,
250: com.liferay.portal.NoSuchPermissionException,
251: com.liferay.portal.NoSuchRoleException;
252:
253: public void addPermission(long pk,
254: com.liferay.portal.model.Permission permission)
255: throws com.liferay.portal.SystemException,
256: com.liferay.portal.NoSuchPermissionException,
257: com.liferay.portal.NoSuchRoleException;
258:
259: public void addPermissions(long pk, long[] permissionPKs)
260: throws com.liferay.portal.SystemException,
261: com.liferay.portal.NoSuchPermissionException,
262: com.liferay.portal.NoSuchRoleException;
263:
264: public void addPermissions(long pk, java.util.List permissions)
265: throws com.liferay.portal.SystemException,
266: com.liferay.portal.NoSuchPermissionException,
267: com.liferay.portal.NoSuchRoleException;
268:
269: public void clearPermissions(long pk)
270: throws com.liferay.portal.SystemException,
271: com.liferay.portal.NoSuchRoleException;
272:
273: public void removePermission(long pk, long permissionPK)
274: throws com.liferay.portal.SystemException,
275: com.liferay.portal.NoSuchPermissionException,
276: com.liferay.portal.NoSuchRoleException;
277:
278: public void removePermission(long pk,
279: com.liferay.portal.model.Permission permission)
280: throws com.liferay.portal.SystemException,
281: com.liferay.portal.NoSuchPermissionException,
282: com.liferay.portal.NoSuchRoleException;
283:
284: public void removePermissions(long pk, long[] permissionPKs)
285: throws com.liferay.portal.SystemException,
286: com.liferay.portal.NoSuchPermissionException,
287: com.liferay.portal.NoSuchRoleException;
288:
289: public void removePermissions(long pk, java.util.List permissions)
290: throws com.liferay.portal.SystemException,
291: com.liferay.portal.NoSuchPermissionException,
292: com.liferay.portal.NoSuchRoleException;
293:
294: public void setPermissions(long pk, long[] permissionPKs)
295: throws com.liferay.portal.SystemException,
296: com.liferay.portal.NoSuchPermissionException,
297: com.liferay.portal.NoSuchRoleException;
298:
299: public void setPermissions(long pk, java.util.List permissions)
300: throws com.liferay.portal.SystemException,
301: com.liferay.portal.NoSuchPermissionException,
302: com.liferay.portal.NoSuchRoleException;
303:
304: public java.util.List getUsers(long pk)
305: throws com.liferay.portal.SystemException,
306: com.liferay.portal.NoSuchRoleException;
307:
308: public java.util.List getUsers(long pk, int begin, int end)
309: throws com.liferay.portal.SystemException,
310: com.liferay.portal.NoSuchRoleException;
311:
312: public java.util.List getUsers(long pk, int begin, int end,
313: com.liferay.portal.kernel.util.OrderByComparator obc)
314: throws com.liferay.portal.SystemException,
315: com.liferay.portal.NoSuchRoleException;
316:
317: public int getUsersSize(long pk)
318: throws com.liferay.portal.SystemException;
319:
320: public boolean containsUser(long pk, long userPK)
321: throws com.liferay.portal.SystemException;
322:
323: public boolean containsUsers(long pk)
324: throws com.liferay.portal.SystemException;
325:
326: public void addUser(long pk, long userPK)
327: throws com.liferay.portal.SystemException,
328: com.liferay.portal.NoSuchRoleException,
329: com.liferay.portal.NoSuchUserException;
330:
331: public void addUser(long pk, com.liferay.portal.model.User user)
332: throws com.liferay.portal.SystemException,
333: com.liferay.portal.NoSuchRoleException,
334: com.liferay.portal.NoSuchUserException;
335:
336: public void addUsers(long pk, long[] userPKs)
337: throws com.liferay.portal.SystemException,
338: com.liferay.portal.NoSuchRoleException,
339: com.liferay.portal.NoSuchUserException;
340:
341: public void addUsers(long pk, java.util.List users)
342: throws com.liferay.portal.SystemException,
343: com.liferay.portal.NoSuchRoleException,
344: com.liferay.portal.NoSuchUserException;
345:
346: public void clearUsers(long pk)
347: throws com.liferay.portal.SystemException,
348: com.liferay.portal.NoSuchRoleException;
349:
350: public void removeUser(long pk, long userPK)
351: throws com.liferay.portal.SystemException,
352: com.liferay.portal.NoSuchRoleException,
353: com.liferay.portal.NoSuchUserException;
354:
355: public void removeUser(long pk, com.liferay.portal.model.User user)
356: throws com.liferay.portal.SystemException,
357: com.liferay.portal.NoSuchRoleException,
358: com.liferay.portal.NoSuchUserException;
359:
360: public void removeUsers(long pk, long[] userPKs)
361: throws com.liferay.portal.SystemException,
362: com.liferay.portal.NoSuchRoleException,
363: com.liferay.portal.NoSuchUserException;
364:
365: public void removeUsers(long pk, java.util.List users)
366: throws com.liferay.portal.SystemException,
367: com.liferay.portal.NoSuchRoleException,
368: com.liferay.portal.NoSuchUserException;
369:
370: public void setUsers(long pk, long[] userPKs)
371: throws com.liferay.portal.SystemException,
372: com.liferay.portal.NoSuchRoleException,
373: com.liferay.portal.NoSuchUserException;
374:
375: public void setUsers(long pk, java.util.List users)
376: throws com.liferay.portal.SystemException,
377: com.liferay.portal.NoSuchRoleException,
378: com.liferay.portal.NoSuchUserException;
379: }
|