@ProviderType public interface ResourceBlockPersistence extends BasePersistence<ResourceBlock>
Caching information and settings can be found in portal.properties
ResourceBlockPersistenceImpl
,
ResourceBlockUtil
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(List<ResourceBlock> resourceBlocks)
Caches the resource blocks in the entity cache if it is enabled.
|
void |
cacheResult(ResourceBlock resourceBlock)
Caches the resource block in the entity cache if it is enabled.
|
int |
countAll()
Returns the number of resource blocks.
|
int |
countByC_G_N_P(long companyId,
long groupId,
String name,
String permissionsHash)
Returns the number of resource blocks where companyId = ? and groupId = ? and name = ? and permissionsHash = ?.
|
int |
countByC_G_N(long companyId,
long groupId,
String name)
Returns the number of resource blocks where companyId = ? and groupId = ? and name = ?.
|
int |
countByC_N(long companyId,
String name)
Returns the number of resource blocks where companyId = ? and name = ?.
|
ResourceBlock |
create(long resourceBlockId)
Creates a new resource block with the primary key.
|
ResourceBlock |
fetchByC_G_N_First(long companyId,
long groupId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
|
ResourceBlock |
fetchByC_G_N_Last(long companyId,
long groupId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
|
ResourceBlock |
fetchByC_G_N_P(long companyId,
long groupId,
String name,
String permissionsHash)
Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or returns
null if it could not be found. |
ResourceBlock |
fetchByC_G_N_P(long companyId,
long groupId,
String name,
String permissionsHash,
boolean retrieveFromCache)
Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or returns
null if it could not be found, optionally using the finder cache. |
ResourceBlock |
fetchByC_N_First(long companyId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and name = ?.
|
ResourceBlock |
fetchByC_N_Last(long companyId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and name = ?.
|
ResourceBlock |
fetchByPrimaryKey(long resourceBlockId)
Returns the resource block with the primary key or returns
null if it could not be found. |
Map<Serializable,ResourceBlock> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
List<ResourceBlock> |
findAll()
Returns all the resource blocks.
|
List<ResourceBlock> |
findAll(int start,
int end)
Returns a range of all the resource blocks.
|
List<ResourceBlock> |
findAll(int start,
int end,
OrderByComparator<ResourceBlock> orderByComparator)
Returns an ordered range of all the resource blocks.
|
List<ResourceBlock> |
findAll(int start,
int end,
OrderByComparator<ResourceBlock> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the resource blocks.
|
ResourceBlock |
findByC_G_N_First(long companyId,
long groupId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
|
ResourceBlock |
findByC_G_N_Last(long companyId,
long groupId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
|
ResourceBlock |
findByC_G_N_P(long companyId,
long groupId,
String name,
String permissionsHash)
Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or throws a
NoSuchResourceBlockException if it could not be found. |
ResourceBlock[] |
findByC_G_N_PrevAndNext(long resourceBlockId,
long companyId,
long groupId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
|
List<ResourceBlock> |
findByC_G_N(long companyId,
long groupId,
String name)
Returns all the resource blocks where companyId = ? and groupId = ? and name = ?.
|
List<ResourceBlock> |
findByC_G_N(long companyId,
long groupId,
String name,
int start,
int end)
Returns a range of all the resource blocks where companyId = ? and groupId = ? and name = ?.
|
List<ResourceBlock> |
findByC_G_N(long companyId,
long groupId,
String name,
int start,
int end,
OrderByComparator<ResourceBlock> orderByComparator)
Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?.
|
List<ResourceBlock> |
findByC_G_N(long companyId,
long groupId,
String name,
int start,
int end,
OrderByComparator<ResourceBlock> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?.
|
ResourceBlock |
findByC_N_First(long companyId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and name = ?.
|
ResourceBlock |
findByC_N_Last(long companyId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and name = ?.
|
ResourceBlock[] |
findByC_N_PrevAndNext(long resourceBlockId,
long companyId,
String name,
OrderByComparator<ResourceBlock> orderByComparator)
Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and name = ?.
|
List<ResourceBlock> |
findByC_N(long companyId,
String name)
Returns all the resource blocks where companyId = ? and name = ?.
|
List<ResourceBlock> |
findByC_N(long companyId,
String name,
int start,
int end)
Returns a range of all the resource blocks where companyId = ? and name = ?.
|
List<ResourceBlock> |
findByC_N(long companyId,
String name,
int start,
int end,
OrderByComparator<ResourceBlock> orderByComparator)
Returns an ordered range of all the resource blocks where companyId = ? and name = ?.
|
List<ResourceBlock> |
findByC_N(long companyId,
String name,
int start,
int end,
OrderByComparator<ResourceBlock> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the resource blocks where companyId = ? and name = ?.
|
ResourceBlock |
findByPrimaryKey(long resourceBlockId)
Returns the resource block with the primary key or throws a
NoSuchResourceBlockException if it could not be found. |
ResourceBlock |
remove(long resourceBlockId)
Removes the resource block with the primary key from the database.
|
void |
removeAll()
Removes all the resource blocks from the database.
|
ResourceBlock |
removeByC_G_N_P(long companyId,
long groupId,
String name,
String permissionsHash)
Removes the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? from the database.
|
void |
removeByC_G_N(long companyId,
long groupId,
String name)
Removes all the resource blocks where companyId = ? and groupId = ? and name = ? from the database.
|
void |
removeByC_N(long companyId,
String name)
Removes all the resource blocks where companyId = ? and name = ? from the database.
|
ResourceBlock |
updateImpl(ResourceBlock resourceBlock) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
List<ResourceBlock> findByC_N(long companyId, String name)
companyId
- the company IDname
- the nameList<ResourceBlock> findByC_N(long companyId, String name, 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 ResourceBlockModelImpl
. 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.
companyId
- the company IDname
- the namestart
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)List<ResourceBlock> findByC_N(long companyId, String name, int start, int end, OrderByComparator<ResourceBlock> 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 ResourceBlockModelImpl
. 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.
companyId
- the company IDname
- the namestart
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<ResourceBlock> findByC_N(long companyId, String name, int start, int end, OrderByComparator<ResourceBlock> 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 ResourceBlockModelImpl
. 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.
companyId
- the company IDname
- the namestart
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheResourceBlock findByC_N_First(long companyId, String name, OrderByComparator<ResourceBlock> orderByComparator) throws NoSuchResourceBlockException
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockException
- if a matching resource block could not be foundResourceBlock fetchByC_N_First(long companyId, String name, OrderByComparator<ResourceBlock> orderByComparator)
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block could not be foundResourceBlock findByC_N_Last(long companyId, String name, OrderByComparator<ResourceBlock> orderByComparator) throws NoSuchResourceBlockException
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockException
- if a matching resource block could not be foundResourceBlock fetchByC_N_Last(long companyId, String name, OrderByComparator<ResourceBlock> orderByComparator)
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block could not be foundResourceBlock[] findByC_N_PrevAndNext(long resourceBlockId, long companyId, String name, OrderByComparator<ResourceBlock> orderByComparator) throws NoSuchResourceBlockException
resourceBlockId
- the primary key of the current resource blockcompanyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockException
- if a resource block with the primary key could not be foundvoid removeByC_N(long companyId, String name)
companyId
- the company IDname
- the nameint countByC_N(long companyId, String name)
companyId
- the company IDname
- the nameList<ResourceBlock> findByC_G_N(long companyId, long groupId, String name)
companyId
- the company IDgroupId
- the group IDname
- the nameList<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, 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 ResourceBlockModelImpl
. 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.
companyId
- the company IDgroupId
- the group IDname
- the namestart
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, int start, int end, OrderByComparator<ResourceBlock> 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 ResourceBlockModelImpl
. 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.
companyId
- the company IDgroupId
- the group IDname
- the namestart
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, int start, int end, OrderByComparator<ResourceBlock> 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 ResourceBlockModelImpl
. 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.
companyId
- the company IDgroupId
- the group IDname
- the namestart
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheResourceBlock findByC_G_N_First(long companyId, long groupId, String name, OrderByComparator<ResourceBlock> orderByComparator) throws NoSuchResourceBlockException
companyId
- the company IDgroupId
- the group IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockException
- if a matching resource block could not be foundResourceBlock fetchByC_G_N_First(long companyId, long groupId, String name, OrderByComparator<ResourceBlock> orderByComparator)
companyId
- the company IDgroupId
- the group IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block could not be foundResourceBlock findByC_G_N_Last(long companyId, long groupId, String name, OrderByComparator<ResourceBlock> orderByComparator) throws NoSuchResourceBlockException
companyId
- the company IDgroupId
- the group IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockException
- if a matching resource block could not be foundResourceBlock fetchByC_G_N_Last(long companyId, long groupId, String name, OrderByComparator<ResourceBlock> orderByComparator)
companyId
- the company IDgroupId
- the group IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching resource block could not be foundResourceBlock[] findByC_G_N_PrevAndNext(long resourceBlockId, long companyId, long groupId, String name, OrderByComparator<ResourceBlock> orderByComparator) throws NoSuchResourceBlockException
resourceBlockId
- the primary key of the current resource blockcompanyId
- the company IDgroupId
- the group IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)NoSuchResourceBlockException
- if a resource block with the primary key could not be foundvoid removeByC_G_N(long companyId, long groupId, String name)
companyId
- the company IDgroupId
- the group IDname
- the nameint countByC_G_N(long companyId, long groupId, String name)
companyId
- the company IDgroupId
- the group IDname
- the nameResourceBlock findByC_G_N_P(long companyId, long groupId, String name, String permissionsHash) throws NoSuchResourceBlockException
NoSuchResourceBlockException
if it could not be found.companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hashNoSuchResourceBlockException
- if a matching resource block could not be foundResourceBlock fetchByC_G_N_P(long companyId, long groupId, String name, String permissionsHash)
null
if it could not be found. Uses the finder cache.companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hashnull
if a matching resource block could not be foundResourceBlock fetchByC_G_N_P(long companyId, long groupId, String name, String permissionsHash, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hashretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching resource block could not be foundResourceBlock removeByC_G_N_P(long companyId, long groupId, String name, String permissionsHash) throws NoSuchResourceBlockException
companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hashNoSuchResourceBlockException
int countByC_G_N_P(long companyId, long groupId, String name, String permissionsHash)
companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hashvoid cacheResult(ResourceBlock resourceBlock)
resourceBlock
- the resource blockvoid cacheResult(List<ResourceBlock> resourceBlocks)
resourceBlocks
- the resource blocksResourceBlock create(long resourceBlockId)
resourceBlockId
- the primary key for the new resource blockResourceBlock remove(long resourceBlockId) throws NoSuchResourceBlockException
resourceBlockId
- the primary key of the resource blockNoSuchResourceBlockException
- if a resource block with the primary key could not be foundResourceBlock updateImpl(ResourceBlock resourceBlock)
ResourceBlock findByPrimaryKey(long resourceBlockId) throws NoSuchResourceBlockException
NoSuchResourceBlockException
if it could not be found.resourceBlockId
- the primary key of the resource blockNoSuchResourceBlockException
- if a resource block with the primary key could not be foundResourceBlock fetchByPrimaryKey(long resourceBlockId)
null
if it could not be found.resourceBlockId
- the primary key of the resource blocknull
if a resource block with the primary key could not be foundMap<Serializable,ResourceBlock> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys
in interface BasePersistence<ResourceBlock>
List<ResourceBlock> findAll()
List<ResourceBlock> 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 ResourceBlockModelImpl
. 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 blocksend
- the upper bound of the range of resource blocks (not inclusive)List<ResourceBlock> findAll(int start, int end, OrderByComparator<ResourceBlock> 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 ResourceBlockModelImpl
. 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 blocksend
- the upper bound of the range of resource blocks (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<ResourceBlock> findAll(int start, int end, OrderByComparator<ResourceBlock> 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 ResourceBlockModelImpl
. 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 blocksend
- the upper bound of the range of resource blocks (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachevoid removeAll()
int countAll()