@ProviderType
public class ResourceBlockPermissionUtil
extends Object
ResourceBlockPermissionPersistenceImpl
and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
Caching information and settings can be found in portal.properties
ResourceBlockPermissionPersistence
,
ResourceBlockPermissionPersistenceImpl
Constructor and Description |
---|
ResourceBlockPermissionUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(List<ResourceBlockPermission> resourceBlockPermissions)
Caches the resource block permissions in the entity cache if it is enabled.
|
static void |
cacheResult(ResourceBlockPermission resourceBlockPermission)
Caches the resource block permission in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(ResourceBlockPermission resourceBlockPermission) |
static int |
countAll()
Returns the number of resource block permissions.
|
static int |
countByR_R(long resourceBlockId,
long roleId)
Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?.
|
static int |
countByResourceBlockId(long resourceBlockId)
Returns the number of resource block permissions where resourceBlockId = ?.
|
static int |
countByRoleId(long roleId)
Returns the number of resource block permissions where roleId = ?.
|
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery) |
static ResourceBlockPermission |
create(long resourceBlockPermissionId)
Creates a new resource block permission with the primary key.
|
static ResourceBlockPermission |
fetchByPrimaryKey(long resourceBlockPermissionId)
Returns the resource block permission with the primary key or returns
null if it could not be found. |
static Map<Serializable,ResourceBlockPermission> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
static ResourceBlockPermission |
fetchByR_R(long resourceBlockId,
long roleId)
Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns
null if it could not be found. |
static ResourceBlockPermission |
fetchByR_R(long resourceBlockId,
long roleId,
boolean retrieveFromCache)
Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns
null if it could not be found, optionally using the finder cache. |
static ResourceBlockPermission |
fetchByResourceBlockId_First(long resourceBlockId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the first resource block permission in the ordered set where resourceBlockId = ?.
|
static ResourceBlockPermission |
fetchByResourceBlockId_Last(long resourceBlockId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the last resource block permission in the ordered set where resourceBlockId = ?.
|
static ResourceBlockPermission |
fetchByRoleId_First(long roleId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the first resource block permission in the ordered set where roleId = ?.
|
static ResourceBlockPermission |
fetchByRoleId_Last(long roleId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the last resource block permission in the ordered set where roleId = ?.
|
static List<ResourceBlockPermission> |
findAll()
Returns all the resource block permissions.
|
static List<ResourceBlockPermission> |
findAll(int start,
int end)
Returns a range of all the resource block permissions.
|
static List<ResourceBlockPermission> |
findAll(int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns an ordered range of all the resource block permissions.
|
static List<ResourceBlockPermission> |
findAll(int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the resource block permissions.
|
static ResourceBlockPermission |
findByPrimaryKey(long resourceBlockPermissionId)
Returns the resource block permission with the primary key or throws a
NoSuchResourceBlockPermissionException if it could not be found. |
static ResourceBlockPermission |
findByR_R(long resourceBlockId,
long roleId)
Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a
NoSuchResourceBlockPermissionException if it could not be found. |
static ResourceBlockPermission |
findByResourceBlockId_First(long resourceBlockId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the first resource block permission in the ordered set where resourceBlockId = ?.
|
static ResourceBlockPermission |
findByResourceBlockId_Last(long resourceBlockId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the last resource block permission in the ordered set where resourceBlockId = ?.
|
static ResourceBlockPermission[] |
findByResourceBlockId_PrevAndNext(long resourceBlockPermissionId,
long resourceBlockId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = ?.
|
static List<ResourceBlockPermission> |
findByResourceBlockId(long resourceBlockId)
Returns all the resource block permissions where resourceBlockId = ?.
|
static List<ResourceBlockPermission> |
findByResourceBlockId(long resourceBlockId,
int start,
int end)
Returns a range of all the resource block permissions where resourceBlockId = ?.
|
static List<ResourceBlockPermission> |
findByResourceBlockId(long resourceBlockId,
int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns an ordered range of all the resource block permissions where resourceBlockId = ?.
|
static List<ResourceBlockPermission> |
findByResourceBlockId(long resourceBlockId,
int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the resource block permissions where resourceBlockId = ?.
|
static ResourceBlockPermission |
findByRoleId_First(long roleId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the first resource block permission in the ordered set where roleId = ?.
|
static ResourceBlockPermission |
findByRoleId_Last(long roleId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the last resource block permission in the ordered set where roleId = ?.
|
static ResourceBlockPermission[] |
findByRoleId_PrevAndNext(long resourceBlockPermissionId,
long roleId,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = ?.
|
static List<ResourceBlockPermission> |
findByRoleId(long roleId)
Returns all the resource block permissions where roleId = ?.
|
static List<ResourceBlockPermission> |
findByRoleId(long roleId,
int start,
int end)
Returns a range of all the resource block permissions where roleId = ?.
|
static List<ResourceBlockPermission> |
findByRoleId(long roleId,
int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator)
Returns an ordered range of all the resource block permissions where roleId = ?.
|
static List<ResourceBlockPermission> |
findByRoleId(long roleId,
int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the resource block permissions where roleId = ?.
|
static List<ResourceBlockPermission> |
findWithDynamicQuery(DynamicQuery dynamicQuery) |
static List<ResourceBlockPermission> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end) |
static List<ResourceBlockPermission> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<ResourceBlockPermission> orderByComparator) |
static ResourceBlockPermissionPersistence |
getPersistence() |
static ResourceBlockPermission |
remove(long resourceBlockPermissionId)
Removes the resource block permission with the primary key from the database.
|
static void |
removeAll()
Removes all the resource block permissions from the database.
|
static ResourceBlockPermission |
removeByR_R(long resourceBlockId,
long roleId)
Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database.
|
static void |
removeByResourceBlockId(long resourceBlockId)
Removes all the resource block permissions where resourceBlockId = ? from the database.
|
static void |
removeByRoleId(long roleId)
Removes all the resource block permissions where roleId = ? from the database.
|
static ResourceBlockPermission |
update(ResourceBlockPermission resourceBlockPermission) |
static ResourceBlockPermission |
update(ResourceBlockPermission resourceBlockPermission,
ServiceContext serviceContext) |
static ResourceBlockPermission |
updateImpl(ResourceBlockPermission resourceBlockPermission) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(ResourceBlockPermission resourceBlockPermission)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static List<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator)
public static ResourceBlockPermission update(ResourceBlockPermission resourceBlockPermission)
public static ResourceBlockPermission update(ResourceBlockPermission resourceBlockPermission, ServiceContext serviceContext)
public static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId)
resourceBlockId
- the resource block IDpublic static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
resourceBlockId
- the resource block IDstart
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)public static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId, int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
resourceBlockId
- the resource block IDstart
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId, int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
resourceBlockId
- the resource block IDstart
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static ResourceBlockPermission findByResourceBlockId_First(long resourceBlockId, OrderByComparator<ResourceBlockPermission> orderByComparator) throws NoSuchResourceBlockPermissionException
resourceBlockId
- the resource block IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockPermissionException
- if a matching resource block permission could not be foundpublic static ResourceBlockPermission fetchByResourceBlockId_First(long resourceBlockId, OrderByComparator<ResourceBlockPermission> orderByComparator)
resourceBlockId
- the resource block IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block permission could not be foundpublic static ResourceBlockPermission findByResourceBlockId_Last(long resourceBlockId, OrderByComparator<ResourceBlockPermission> orderByComparator) throws NoSuchResourceBlockPermissionException
resourceBlockId
- the resource block IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockPermissionException
- if a matching resource block permission could not be foundpublic static ResourceBlockPermission fetchByResourceBlockId_Last(long resourceBlockId, OrderByComparator<ResourceBlockPermission> orderByComparator)
resourceBlockId
- the resource block IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block permission could not be foundpublic static ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(long resourceBlockPermissionId, long resourceBlockId, OrderByComparator<ResourceBlockPermission> orderByComparator) throws NoSuchResourceBlockPermissionException
resourceBlockPermissionId
- the primary key of the current resource block permissionresourceBlockId
- the resource block IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockPermissionException
- if a resource block permission with the primary key could not be foundpublic static void removeByResourceBlockId(long resourceBlockId)
resourceBlockId
- the resource block IDpublic static int countByResourceBlockId(long resourceBlockId)
resourceBlockId
- the resource block IDpublic static List<ResourceBlockPermission> findByRoleId(long roleId)
roleId
- the role IDpublic static List<ResourceBlockPermission> findByRoleId(long roleId, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
roleId
- the role IDstart
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)public static List<ResourceBlockPermission> findByRoleId(long roleId, int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
roleId
- the role IDstart
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<ResourceBlockPermission> findByRoleId(long roleId, int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
roleId
- the role IDstart
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static ResourceBlockPermission findByRoleId_First(long roleId, OrderByComparator<ResourceBlockPermission> orderByComparator) throws NoSuchResourceBlockPermissionException
roleId
- the role IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockPermissionException
- if a matching resource block permission could not be foundpublic static ResourceBlockPermission fetchByRoleId_First(long roleId, OrderByComparator<ResourceBlockPermission> orderByComparator)
roleId
- the role IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block permission could not be foundpublic static ResourceBlockPermission findByRoleId_Last(long roleId, OrderByComparator<ResourceBlockPermission> orderByComparator) throws NoSuchResourceBlockPermissionException
roleId
- the role IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockPermissionException
- if a matching resource block permission could not be foundpublic static ResourceBlockPermission fetchByRoleId_Last(long roleId, OrderByComparator<ResourceBlockPermission> orderByComparator)
roleId
- the role IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block permission could not be foundpublic static ResourceBlockPermission[] findByRoleId_PrevAndNext(long resourceBlockPermissionId, long roleId, OrderByComparator<ResourceBlockPermission> orderByComparator) throws NoSuchResourceBlockPermissionException
resourceBlockPermissionId
- the primary key of the current resource block permissionroleId
- the role IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockPermissionException
- if a resource block permission with the primary key could not be foundpublic static void removeByRoleId(long roleId)
roleId
- the role IDpublic static int countByRoleId(long roleId)
roleId
- the role IDpublic static ResourceBlockPermission findByR_R(long resourceBlockId, long roleId) throws NoSuchResourceBlockPermissionException
NoSuchResourceBlockPermissionException
if it could not be found.resourceBlockId
- the resource block IDroleId
- the role IDNoSuchResourceBlockPermissionException
- if a matching resource block permission could not be foundpublic static ResourceBlockPermission fetchByR_R(long resourceBlockId, long roleId)
null
if it could not be found. Uses the finder cache.resourceBlockId
- the resource block IDroleId
- the role IDnull
if a matching resource block permission could not be foundpublic static ResourceBlockPermission fetchByR_R(long resourceBlockId, long roleId, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.resourceBlockId
- the resource block IDroleId
- the role IDretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching resource block permission could not be foundpublic static ResourceBlockPermission removeByR_R(long resourceBlockId, long roleId) throws NoSuchResourceBlockPermissionException
resourceBlockId
- the resource block IDroleId
- the role IDNoSuchResourceBlockPermissionException
public static int countByR_R(long resourceBlockId, long roleId)
resourceBlockId
- the resource block IDroleId
- the role IDpublic static void cacheResult(ResourceBlockPermission resourceBlockPermission)
resourceBlockPermission
- the resource block permissionpublic static void cacheResult(List<ResourceBlockPermission> resourceBlockPermissions)
resourceBlockPermissions
- the resource block permissionspublic static ResourceBlockPermission create(long resourceBlockPermissionId)
resourceBlockPermissionId
- the primary key for the new resource block permissionpublic static ResourceBlockPermission remove(long resourceBlockPermissionId) throws NoSuchResourceBlockPermissionException
resourceBlockPermissionId
- the primary key of the resource block permissionNoSuchResourceBlockPermissionException
- if a resource block permission with the primary key could not be foundpublic static ResourceBlockPermission updateImpl(ResourceBlockPermission resourceBlockPermission)
public static ResourceBlockPermission findByPrimaryKey(long resourceBlockPermissionId) throws NoSuchResourceBlockPermissionException
NoSuchResourceBlockPermissionException
if it could not be found.resourceBlockPermissionId
- the primary key of the resource block permissionNoSuchResourceBlockPermissionException
- if a resource block permission with the primary key could not be foundpublic static ResourceBlockPermission fetchByPrimaryKey(long resourceBlockPermissionId)
null
if it could not be found.resourceBlockPermissionId
- the primary key of the resource block permissionnull
if a resource block permission with the primary key could not be foundpublic static Map<Serializable,ResourceBlockPermission> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
public static List<ResourceBlockPermission> findAll()
public static List<ResourceBlockPermission> findAll(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)public static List<ResourceBlockPermission> findAll(int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<ResourceBlockPermission> findAll(int start, int end, OrderByComparator<ResourceBlockPermission> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ResourceBlockPermissionModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of resource block permissionsend
- the upper bound of the range of resource block permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static void removeAll()
public static int countAll()
public static ResourceBlockPermissionPersistence getPersistence()