1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19 import com.liferay.portal.kernel.exception.SystemException;
20 import com.liferay.portal.model.ResourcePermission;
21
22 import java.util.List;
23
24
37 public class ResourcePermissionUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57 int start, int end) throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59 }
60
61
64 public static ResourcePermission remove(
65 ResourcePermission resourcePermission) throws SystemException {
66 return getPersistence().remove(resourcePermission);
67 }
68
69
72 public static ResourcePermission update(
73 ResourcePermission resourcePermission, boolean merge)
74 throws SystemException {
75 return getPersistence().update(resourcePermission, merge);
76 }
77
78 public static void cacheResult(
79 com.liferay.portal.model.ResourcePermission resourcePermission) {
80 getPersistence().cacheResult(resourcePermission);
81 }
82
83 public static void cacheResult(
84 java.util.List<com.liferay.portal.model.ResourcePermission> resourcePermissions) {
85 getPersistence().cacheResult(resourcePermissions);
86 }
87
88 public static com.liferay.portal.model.ResourcePermission create(
89 long resourcePermissionId) {
90 return getPersistence().create(resourcePermissionId);
91 }
92
93 public static com.liferay.portal.model.ResourcePermission remove(
94 long resourcePermissionId)
95 throws com.liferay.portal.NoSuchResourcePermissionException,
96 com.liferay.portal.kernel.exception.SystemException {
97 return getPersistence().remove(resourcePermissionId);
98 }
99
100 public static com.liferay.portal.model.ResourcePermission updateImpl(
101 com.liferay.portal.model.ResourcePermission resourcePermission,
102 boolean merge)
103 throws com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().updateImpl(resourcePermission, merge);
105 }
106
107 public static com.liferay.portal.model.ResourcePermission findByPrimaryKey(
108 long resourcePermissionId)
109 throws com.liferay.portal.NoSuchResourcePermissionException,
110 com.liferay.portal.kernel.exception.SystemException {
111 return getPersistence().findByPrimaryKey(resourcePermissionId);
112 }
113
114 public static com.liferay.portal.model.ResourcePermission fetchByPrimaryKey(
115 long resourcePermissionId)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getPersistence().fetchByPrimaryKey(resourcePermissionId);
118 }
119
120 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
121 long roleId) throws com.liferay.portal.kernel.exception.SystemException {
122 return getPersistence().findByRoleId(roleId);
123 }
124
125 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
126 long roleId, int start, int end)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().findByRoleId(roleId, start, end);
129 }
130
131 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
132 long roleId, int start, int end,
133 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence()
136 .findByRoleId(roleId, start, end, orderByComparator);
137 }
138
139 public static com.liferay.portal.model.ResourcePermission findByRoleId_First(
140 long roleId,
141 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142 throws com.liferay.portal.NoSuchResourcePermissionException,
143 com.liferay.portal.kernel.exception.SystemException {
144 return getPersistence().findByRoleId_First(roleId, orderByComparator);
145 }
146
147 public static com.liferay.portal.model.ResourcePermission findByRoleId_Last(
148 long roleId,
149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150 throws com.liferay.portal.NoSuchResourcePermissionException,
151 com.liferay.portal.kernel.exception.SystemException {
152 return getPersistence().findByRoleId_Last(roleId, orderByComparator);
153 }
154
155 public static com.liferay.portal.model.ResourcePermission[] findByRoleId_PrevAndNext(
156 long resourcePermissionId, long roleId,
157 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158 throws com.liferay.portal.NoSuchResourcePermissionException,
159 com.liferay.portal.kernel.exception.SystemException {
160 return getPersistence()
161 .findByRoleId_PrevAndNext(resourcePermissionId, roleId,
162 orderByComparator);
163 }
164
165 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
166 long roleId, int scope)
167 throws com.liferay.portal.kernel.exception.SystemException {
168 return getPersistence().findByR_S(roleId, scope);
169 }
170
171 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
172 long roleId, int scope, int start, int end)
173 throws com.liferay.portal.kernel.exception.SystemException {
174 return getPersistence().findByR_S(roleId, scope, start, end);
175 }
176
177 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
178 long roleId, int scope, int start, int end,
179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180 throws com.liferay.portal.kernel.exception.SystemException {
181 return getPersistence()
182 .findByR_S(roleId, scope, start, end, orderByComparator);
183 }
184
185 public static com.liferay.portal.model.ResourcePermission findByR_S_First(
186 long roleId, int scope,
187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188 throws com.liferay.portal.NoSuchResourcePermissionException,
189 com.liferay.portal.kernel.exception.SystemException {
190 return getPersistence().findByR_S_First(roleId, scope, orderByComparator);
191 }
192
193 public static com.liferay.portal.model.ResourcePermission findByR_S_Last(
194 long roleId, int scope,
195 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196 throws com.liferay.portal.NoSuchResourcePermissionException,
197 com.liferay.portal.kernel.exception.SystemException {
198 return getPersistence().findByR_S_Last(roleId, scope, orderByComparator);
199 }
200
201 public static com.liferay.portal.model.ResourcePermission[] findByR_S_PrevAndNext(
202 long resourcePermissionId, long roleId, int scope,
203 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204 throws com.liferay.portal.NoSuchResourcePermissionException,
205 com.liferay.portal.kernel.exception.SystemException {
206 return getPersistence()
207 .findByR_S_PrevAndNext(resourcePermissionId, roleId, scope,
208 orderByComparator);
209 }
210
211 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
212 long companyId, java.lang.String name, int scope)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getPersistence().findByC_N_S(companyId, name, scope);
215 }
216
217 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
218 long companyId, java.lang.String name, int scope, int start, int end)
219 throws com.liferay.portal.kernel.exception.SystemException {
220 return getPersistence().findByC_N_S(companyId, name, scope, start, end);
221 }
222
223 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
224 long companyId, java.lang.String name, int scope, int start, int end,
225 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getPersistence()
228 .findByC_N_S(companyId, name, scope, start, end,
229 orderByComparator);
230 }
231
232 public static com.liferay.portal.model.ResourcePermission findByC_N_S_First(
233 long companyId, java.lang.String name, int scope,
234 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
235 throws com.liferay.portal.NoSuchResourcePermissionException,
236 com.liferay.portal.kernel.exception.SystemException {
237 return getPersistence()
238 .findByC_N_S_First(companyId, name, scope, orderByComparator);
239 }
240
241 public static com.liferay.portal.model.ResourcePermission findByC_N_S_Last(
242 long companyId, java.lang.String name, int scope,
243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244 throws com.liferay.portal.NoSuchResourcePermissionException,
245 com.liferay.portal.kernel.exception.SystemException {
246 return getPersistence()
247 .findByC_N_S_Last(companyId, name, scope, orderByComparator);
248 }
249
250 public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_PrevAndNext(
251 long resourcePermissionId, long companyId, java.lang.String name,
252 int scope,
253 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254 throws com.liferay.portal.NoSuchResourcePermissionException,
255 com.liferay.portal.kernel.exception.SystemException {
256 return getPersistence()
257 .findByC_N_S_PrevAndNext(resourcePermissionId, companyId,
258 name, scope, orderByComparator);
259 }
260
261 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
262 long companyId, java.lang.String name, int scope,
263 java.lang.String primKey)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getPersistence().findByC_N_S_P(companyId, name, scope, primKey);
266 }
267
268 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
269 long companyId, java.lang.String name, int scope,
270 java.lang.String primKey, int start, int end)
271 throws com.liferay.portal.kernel.exception.SystemException {
272 return getPersistence()
273 .findByC_N_S_P(companyId, name, scope, primKey, start, end);
274 }
275
276 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
277 long companyId, java.lang.String name, int scope,
278 java.lang.String primKey, int start, int end,
279 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280 throws com.liferay.portal.kernel.exception.SystemException {
281 return getPersistence()
282 .findByC_N_S_P(companyId, name, scope, primKey, start, end,
283 orderByComparator);
284 }
285
286 public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_First(
287 long companyId, java.lang.String name, int scope,
288 java.lang.String primKey,
289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290 throws com.liferay.portal.NoSuchResourcePermissionException,
291 com.liferay.portal.kernel.exception.SystemException {
292 return getPersistence()
293 .findByC_N_S_P_First(companyId, name, scope, primKey,
294 orderByComparator);
295 }
296
297 public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_Last(
298 long companyId, java.lang.String name, int scope,
299 java.lang.String primKey,
300 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301 throws com.liferay.portal.NoSuchResourcePermissionException,
302 com.liferay.portal.kernel.exception.SystemException {
303 return getPersistence()
304 .findByC_N_S_P_Last(companyId, name, scope, primKey,
305 orderByComparator);
306 }
307
308 public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_PrevAndNext(
309 long resourcePermissionId, long companyId, java.lang.String name,
310 int scope, java.lang.String primKey,
311 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312 throws com.liferay.portal.NoSuchResourcePermissionException,
313 com.liferay.portal.kernel.exception.SystemException {
314 return getPersistence()
315 .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId,
316 name, scope, primKey, orderByComparator);
317 }
318
319 public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R(
320 long companyId, java.lang.String name, int scope,
321 java.lang.String primKey, long roleId)
322 throws com.liferay.portal.NoSuchResourcePermissionException,
323 com.liferay.portal.kernel.exception.SystemException {
324 return getPersistence()
325 .findByC_N_S_P_R(companyId, name, scope, primKey, roleId);
326 }
327
328 public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
329 long companyId, java.lang.String name, int scope,
330 java.lang.String primKey, long roleId)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getPersistence()
333 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId);
334 }
335
336 public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
337 long companyId, java.lang.String name, int scope,
338 java.lang.String primKey, long roleId, boolean retrieveFromCache)
339 throws com.liferay.portal.kernel.exception.SystemException {
340 return getPersistence()
341 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId,
342 retrieveFromCache);
343 }
344
345 public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll()
346 throws com.liferay.portal.kernel.exception.SystemException {
347 return getPersistence().findAll();
348 }
349
350 public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
351 int start, int end)
352 throws com.liferay.portal.kernel.exception.SystemException {
353 return getPersistence().findAll(start, end);
354 }
355
356 public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
357 int start, int end,
358 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359 throws com.liferay.portal.kernel.exception.SystemException {
360 return getPersistence().findAll(start, end, orderByComparator);
361 }
362
363 public static void removeByRoleId(long roleId)
364 throws com.liferay.portal.kernel.exception.SystemException {
365 getPersistence().removeByRoleId(roleId);
366 }
367
368 public static void removeByR_S(long roleId, int scope)
369 throws com.liferay.portal.kernel.exception.SystemException {
370 getPersistence().removeByR_S(roleId, scope);
371 }
372
373 public static void removeByC_N_S(long companyId, java.lang.String name,
374 int scope) throws com.liferay.portal.kernel.exception.SystemException {
375 getPersistence().removeByC_N_S(companyId, name, scope);
376 }
377
378 public static void removeByC_N_S_P(long companyId, java.lang.String name,
379 int scope, java.lang.String primKey)
380 throws com.liferay.portal.kernel.exception.SystemException {
381 getPersistence().removeByC_N_S_P(companyId, name, scope, primKey);
382 }
383
384 public static void removeByC_N_S_P_R(long companyId, java.lang.String name,
385 int scope, java.lang.String primKey, long roleId)
386 throws com.liferay.portal.NoSuchResourcePermissionException,
387 com.liferay.portal.kernel.exception.SystemException {
388 getPersistence()
389 .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId);
390 }
391
392 public static void removeAll()
393 throws com.liferay.portal.kernel.exception.SystemException {
394 getPersistence().removeAll();
395 }
396
397 public static int countByRoleId(long roleId)
398 throws com.liferay.portal.kernel.exception.SystemException {
399 return getPersistence().countByRoleId(roleId);
400 }
401
402 public static int countByR_S(long roleId, int scope)
403 throws com.liferay.portal.kernel.exception.SystemException {
404 return getPersistence().countByR_S(roleId, scope);
405 }
406
407 public static int countByC_N_S(long companyId, java.lang.String name,
408 int scope) throws com.liferay.portal.kernel.exception.SystemException {
409 return getPersistence().countByC_N_S(companyId, name, scope);
410 }
411
412 public static int countByC_N_S_P(long companyId, java.lang.String name,
413 int scope, java.lang.String primKey)
414 throws com.liferay.portal.kernel.exception.SystemException {
415 return getPersistence().countByC_N_S_P(companyId, name, scope, primKey);
416 }
417
418 public static int countByC_N_S_P_R(long companyId, java.lang.String name,
419 int scope, java.lang.String primKey, long roleId)
420 throws com.liferay.portal.kernel.exception.SystemException {
421 return getPersistence()
422 .countByC_N_S_P_R(companyId, name, scope, primKey, roleId);
423 }
424
425 public static int countAll()
426 throws com.liferay.portal.kernel.exception.SystemException {
427 return getPersistence().countAll();
428 }
429
430 public static ResourcePermissionPersistence getPersistence() {
431 if (_persistence == null) {
432 _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName());
433 }
434
435 return _persistence;
436 }
437
438 public void setPersistence(ResourcePermissionPersistence persistence) {
439 _persistence = persistence;
440 }
441
442 private static ResourcePermissionPersistence _persistence;
443 }