001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.ResourcePermission;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class ResourcePermissionUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(ResourcePermission resourcePermission) {
044 getPersistence().clearCache(resourcePermission);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<ResourcePermission> findWithDynamicQuery(
059 DynamicQuery dynamicQuery) throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<ResourcePermission> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<ResourcePermission> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static ResourcePermission remove(
087 ResourcePermission resourcePermission) throws SystemException {
088 return getPersistence().remove(resourcePermission);
089 }
090
091
094 public static ResourcePermission update(
095 ResourcePermission resourcePermission, boolean merge)
096 throws SystemException {
097 return getPersistence().update(resourcePermission, merge);
098 }
099
100
103 public static ResourcePermission update(
104 ResourcePermission resourcePermission, boolean merge,
105 ServiceContext serviceContext) throws SystemException {
106 return getPersistence().update(resourcePermission, merge, serviceContext);
107 }
108
109 public static void cacheResult(
110 com.liferay.portal.model.ResourcePermission resourcePermission) {
111 getPersistence().cacheResult(resourcePermission);
112 }
113
114 public static void cacheResult(
115 java.util.List<com.liferay.portal.model.ResourcePermission> resourcePermissions) {
116 getPersistence().cacheResult(resourcePermissions);
117 }
118
119 public static com.liferay.portal.model.ResourcePermission create(
120 long resourcePermissionId) {
121 return getPersistence().create(resourcePermissionId);
122 }
123
124 public static com.liferay.portal.model.ResourcePermission remove(
125 long resourcePermissionId)
126 throws com.liferay.portal.NoSuchResourcePermissionException,
127 com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().remove(resourcePermissionId);
129 }
130
131 public static com.liferay.portal.model.ResourcePermission updateImpl(
132 com.liferay.portal.model.ResourcePermission resourcePermission,
133 boolean merge)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().updateImpl(resourcePermission, merge);
136 }
137
138 public static com.liferay.portal.model.ResourcePermission findByPrimaryKey(
139 long resourcePermissionId)
140 throws com.liferay.portal.NoSuchResourcePermissionException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().findByPrimaryKey(resourcePermissionId);
143 }
144
145 public static com.liferay.portal.model.ResourcePermission fetchByPrimaryKey(
146 long resourcePermissionId)
147 throws com.liferay.portal.kernel.exception.SystemException {
148 return getPersistence().fetchByPrimaryKey(resourcePermissionId);
149 }
150
151 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
152 long roleId) throws com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence().findByRoleId(roleId);
154 }
155
156 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
157 long roleId, int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().findByRoleId(roleId, start, end);
160 }
161
162 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
163 long roleId, int start, int end,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence()
167 .findByRoleId(roleId, start, end, orderByComparator);
168 }
169
170 public static com.liferay.portal.model.ResourcePermission findByRoleId_First(
171 long roleId,
172 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173 throws com.liferay.portal.NoSuchResourcePermissionException,
174 com.liferay.portal.kernel.exception.SystemException {
175 return getPersistence().findByRoleId_First(roleId, orderByComparator);
176 }
177
178 public static com.liferay.portal.model.ResourcePermission findByRoleId_Last(
179 long roleId,
180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181 throws com.liferay.portal.NoSuchResourcePermissionException,
182 com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence().findByRoleId_Last(roleId, orderByComparator);
184 }
185
186 public static com.liferay.portal.model.ResourcePermission[] findByRoleId_PrevAndNext(
187 long resourcePermissionId, long roleId,
188 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189 throws com.liferay.portal.NoSuchResourcePermissionException,
190 com.liferay.portal.kernel.exception.SystemException {
191 return getPersistence()
192 .findByRoleId_PrevAndNext(resourcePermissionId, roleId,
193 orderByComparator);
194 }
195
196 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
197 long roleId, int scope)
198 throws com.liferay.portal.kernel.exception.SystemException {
199 return getPersistence().findByR_S(roleId, scope);
200 }
201
202 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
203 long roleId, int scope, int start, int end)
204 throws com.liferay.portal.kernel.exception.SystemException {
205 return getPersistence().findByR_S(roleId, scope, start, end);
206 }
207
208 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
209 long roleId, int scope, int start, int end,
210 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211 throws com.liferay.portal.kernel.exception.SystemException {
212 return getPersistence()
213 .findByR_S(roleId, scope, start, end, orderByComparator);
214 }
215
216 public static com.liferay.portal.model.ResourcePermission findByR_S_First(
217 long roleId, int scope,
218 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219 throws com.liferay.portal.NoSuchResourcePermissionException,
220 com.liferay.portal.kernel.exception.SystemException {
221 return getPersistence().findByR_S_First(roleId, scope, orderByComparator);
222 }
223
224 public static com.liferay.portal.model.ResourcePermission findByR_S_Last(
225 long roleId, int scope,
226 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227 throws com.liferay.portal.NoSuchResourcePermissionException,
228 com.liferay.portal.kernel.exception.SystemException {
229 return getPersistence().findByR_S_Last(roleId, scope, orderByComparator);
230 }
231
232 public static com.liferay.portal.model.ResourcePermission[] findByR_S_PrevAndNext(
233 long resourcePermissionId, long roleId, 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 .findByR_S_PrevAndNext(resourcePermissionId, roleId, scope,
239 orderByComparator);
240 }
241
242 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
243 long companyId, java.lang.String name, int scope)
244 throws com.liferay.portal.kernel.exception.SystemException {
245 return getPersistence().findByC_N_S(companyId, name, scope);
246 }
247
248 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
249 long companyId, java.lang.String name, int scope, int start, int end)
250 throws com.liferay.portal.kernel.exception.SystemException {
251 return getPersistence().findByC_N_S(companyId, name, scope, start, end);
252 }
253
254 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
255 long companyId, java.lang.String name, int scope, int start, int end,
256 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return getPersistence()
259 .findByC_N_S(companyId, name, scope, start, end,
260 orderByComparator);
261 }
262
263 public static com.liferay.portal.model.ResourcePermission findByC_N_S_First(
264 long companyId, java.lang.String name, int scope,
265 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266 throws com.liferay.portal.NoSuchResourcePermissionException,
267 com.liferay.portal.kernel.exception.SystemException {
268 return getPersistence()
269 .findByC_N_S_First(companyId, name, scope, orderByComparator);
270 }
271
272 public static com.liferay.portal.model.ResourcePermission findByC_N_S_Last(
273 long companyId, java.lang.String name, int scope,
274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275 throws com.liferay.portal.NoSuchResourcePermissionException,
276 com.liferay.portal.kernel.exception.SystemException {
277 return getPersistence()
278 .findByC_N_S_Last(companyId, name, scope, orderByComparator);
279 }
280
281 public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_PrevAndNext(
282 long resourcePermissionId, long companyId, java.lang.String name,
283 int scope,
284 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285 throws com.liferay.portal.NoSuchResourcePermissionException,
286 com.liferay.portal.kernel.exception.SystemException {
287 return getPersistence()
288 .findByC_N_S_PrevAndNext(resourcePermissionId, companyId,
289 name, scope, orderByComparator);
290 }
291
292 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
293 long companyId, java.lang.String name, int scope,
294 java.lang.String primKey)
295 throws com.liferay.portal.kernel.exception.SystemException {
296 return getPersistence().findByC_N_S_P(companyId, name, scope, primKey);
297 }
298
299 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
300 long companyId, java.lang.String name, int scope,
301 java.lang.String primKey, int start, int end)
302 throws com.liferay.portal.kernel.exception.SystemException {
303 return getPersistence()
304 .findByC_N_S_P(companyId, name, scope, primKey, start, end);
305 }
306
307 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
308 long companyId, java.lang.String name, int scope,
309 java.lang.String primKey, int start, int end,
310 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311 throws com.liferay.portal.kernel.exception.SystemException {
312 return getPersistence()
313 .findByC_N_S_P(companyId, name, scope, primKey, start, end,
314 orderByComparator);
315 }
316
317 public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_First(
318 long companyId, java.lang.String name, int scope,
319 java.lang.String primKey,
320 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
321 throws com.liferay.portal.NoSuchResourcePermissionException,
322 com.liferay.portal.kernel.exception.SystemException {
323 return getPersistence()
324 .findByC_N_S_P_First(companyId, name, scope, primKey,
325 orderByComparator);
326 }
327
328 public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_Last(
329 long companyId, java.lang.String name, int scope,
330 java.lang.String primKey,
331 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
332 throws com.liferay.portal.NoSuchResourcePermissionException,
333 com.liferay.portal.kernel.exception.SystemException {
334 return getPersistence()
335 .findByC_N_S_P_Last(companyId, name, scope, primKey,
336 orderByComparator);
337 }
338
339 public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_PrevAndNext(
340 long resourcePermissionId, long companyId, java.lang.String name,
341 int scope, java.lang.String primKey,
342 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
343 throws com.liferay.portal.NoSuchResourcePermissionException,
344 com.liferay.portal.kernel.exception.SystemException {
345 return getPersistence()
346 .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId,
347 name, scope, primKey, orderByComparator);
348 }
349
350 public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R(
351 long companyId, java.lang.String name, int scope,
352 java.lang.String primKey, long roleId)
353 throws com.liferay.portal.NoSuchResourcePermissionException,
354 com.liferay.portal.kernel.exception.SystemException {
355 return getPersistence()
356 .findByC_N_S_P_R(companyId, name, scope, primKey, roleId);
357 }
358
359 public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
360 long companyId, java.lang.String name, int scope,
361 java.lang.String primKey, long roleId)
362 throws com.liferay.portal.kernel.exception.SystemException {
363 return getPersistence()
364 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId);
365 }
366
367 public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
368 long companyId, java.lang.String name, int scope,
369 java.lang.String primKey, long roleId, boolean retrieveFromCache)
370 throws com.liferay.portal.kernel.exception.SystemException {
371 return getPersistence()
372 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId,
373 retrieveFromCache);
374 }
375
376 public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll()
377 throws com.liferay.portal.kernel.exception.SystemException {
378 return getPersistence().findAll();
379 }
380
381 public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
382 int start, int end)
383 throws com.liferay.portal.kernel.exception.SystemException {
384 return getPersistence().findAll(start, end);
385 }
386
387 public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
388 int start, int end,
389 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
390 throws com.liferay.portal.kernel.exception.SystemException {
391 return getPersistence().findAll(start, end, orderByComparator);
392 }
393
394 public static void removeByRoleId(long roleId)
395 throws com.liferay.portal.kernel.exception.SystemException {
396 getPersistence().removeByRoleId(roleId);
397 }
398
399 public static void removeByR_S(long roleId, int scope)
400 throws com.liferay.portal.kernel.exception.SystemException {
401 getPersistence().removeByR_S(roleId, scope);
402 }
403
404 public static void removeByC_N_S(long companyId, java.lang.String name,
405 int scope) throws com.liferay.portal.kernel.exception.SystemException {
406 getPersistence().removeByC_N_S(companyId, name, scope);
407 }
408
409 public static void removeByC_N_S_P(long companyId, java.lang.String name,
410 int scope, java.lang.String primKey)
411 throws com.liferay.portal.kernel.exception.SystemException {
412 getPersistence().removeByC_N_S_P(companyId, name, scope, primKey);
413 }
414
415 public static void removeByC_N_S_P_R(long companyId, java.lang.String name,
416 int scope, java.lang.String primKey, long roleId)
417 throws com.liferay.portal.NoSuchResourcePermissionException,
418 com.liferay.portal.kernel.exception.SystemException {
419 getPersistence()
420 .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId);
421 }
422
423 public static void removeAll()
424 throws com.liferay.portal.kernel.exception.SystemException {
425 getPersistence().removeAll();
426 }
427
428 public static int countByRoleId(long roleId)
429 throws com.liferay.portal.kernel.exception.SystemException {
430 return getPersistence().countByRoleId(roleId);
431 }
432
433 public static int countByR_S(long roleId, int scope)
434 throws com.liferay.portal.kernel.exception.SystemException {
435 return getPersistence().countByR_S(roleId, scope);
436 }
437
438 public static int countByC_N_S(long companyId, java.lang.String name,
439 int scope) throws com.liferay.portal.kernel.exception.SystemException {
440 return getPersistence().countByC_N_S(companyId, name, scope);
441 }
442
443 public static int countByC_N_S_P(long companyId, java.lang.String name,
444 int scope, java.lang.String primKey)
445 throws com.liferay.portal.kernel.exception.SystemException {
446 return getPersistence().countByC_N_S_P(companyId, name, scope, primKey);
447 }
448
449 public static int countByC_N_S_P_R(long companyId, java.lang.String name,
450 int scope, java.lang.String primKey, long roleId)
451 throws com.liferay.portal.kernel.exception.SystemException {
452 return getPersistence()
453 .countByC_N_S_P_R(companyId, name, scope, primKey, roleId);
454 }
455
456 public static int countAll()
457 throws com.liferay.portal.kernel.exception.SystemException {
458 return getPersistence().countAll();
459 }
460
461 public static ResourcePermissionPersistence getPersistence() {
462 if (_persistence == null) {
463 _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName());
464 }
465
466 return _persistence;
467 }
468
469 public void setPersistence(ResourcePermissionPersistence persistence) {
470 _persistence = persistence;
471 }
472
473 private static ResourcePermissionPersistence _persistence;
474 }