|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.persistence.ResourceBlockUtil
public class ResourceBlockUtil
The persistence utility for the resource block service. This utility wraps ResourceBlockPersistenceImpl
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
ResourceBlockPersistence
,
ResourceBlockPersistenceImpl
Constructor Summary | |
---|---|
ResourceBlockUtil()
|
Method Summary | |
---|---|
static void |
cacheResult(List<ResourceBlock> resourceBlocks)
Caches the resource blocks in the entity cache if it is enabled. |
static void |
cacheResult(ResourceBlock resourceBlock)
Caches the resource block in the entity cache if it is enabled. |
static void |
clearCache()
|
static void |
clearCache(ResourceBlock resourceBlock)
|
static int |
countAll()
Returns the number of resource blocks. |
static 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 = ?. |
static int |
countByC_G_N(long companyId,
long groupId,
String name)
Returns the number of resource blocks where companyId = ? and groupId = ? and name = ?. |
static int |
countByC_N(long companyId,
String name)
Returns the number of resource blocks where companyId = ? and name = ?. |
long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static ResourceBlock |
create(long resourceBlockId)
Creates a new resource block with the primary key. |
static ResourceBlock |
fetchByC_G_N_First(long companyId,
long groupId,
String name,
OrderByComparator orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?. |
static ResourceBlock |
fetchByC_G_N_Last(long companyId,
long groupId,
String name,
OrderByComparator orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?. |
static 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. |
static 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. |
static ResourceBlock |
fetchByC_N_First(long companyId,
String name,
OrderByComparator orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and name = ?. |
static ResourceBlock |
fetchByC_N_Last(long companyId,
String name,
OrderByComparator orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and name = ?. |
static ResourceBlock |
fetchByPrimaryKey(long resourceBlockId)
Returns the resource block with the primary key or returns null if it could not be found. |
static List<ResourceBlock> |
findAll()
Returns all the resource blocks. |
static List<ResourceBlock> |
findAll(int start,
int end)
Returns a range of all the resource blocks. |
static List<ResourceBlock> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the resource blocks. |
static ResourceBlock |
findByC_G_N_First(long companyId,
long groupId,
String name,
OrderByComparator orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?. |
static ResourceBlock |
findByC_G_N_Last(long companyId,
long groupId,
String name,
OrderByComparator orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?. |
static 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. |
static ResourceBlock[] |
findByC_G_N_PrevAndNext(long resourceBlockId,
long companyId,
long groupId,
String name,
OrderByComparator orderByComparator)
Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and groupId = ? and name = ?. |
static List<ResourceBlock> |
findByC_G_N(long companyId,
long groupId,
String name)
Returns all the resource blocks where companyId = ? and groupId = ? and name = ?. |
static 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 = ?. |
static List<ResourceBlock> |
findByC_G_N(long companyId,
long groupId,
String name,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?. |
static ResourceBlock |
findByC_N_First(long companyId,
String name,
OrderByComparator orderByComparator)
Returns the first resource block in the ordered set where companyId = ? and name = ?. |
static ResourceBlock |
findByC_N_Last(long companyId,
String name,
OrderByComparator orderByComparator)
Returns the last resource block in the ordered set where companyId = ? and name = ?. |
static ResourceBlock[] |
findByC_N_PrevAndNext(long resourceBlockId,
long companyId,
String name,
OrderByComparator orderByComparator)
Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and name = ?. |
static List<ResourceBlock> |
findByC_N(long companyId,
String name)
Returns all the resource blocks where companyId = ? and name = ?. |
static List<ResourceBlock> |
findByC_N(long companyId,
String name,
int start,
int end)
Returns a range of all the resource blocks where companyId = ? and name = ?. |
static List<ResourceBlock> |
findByC_N(long companyId,
String name,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the resource blocks where companyId = ? and name = ?. |
static ResourceBlock |
findByPrimaryKey(long resourceBlockId)
Returns the resource block with the primary key or throws a NoSuchResourceBlockException if it could not be found. |
static List<ResourceBlock> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<ResourceBlock> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List<ResourceBlock> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
|
static ResourceBlockPersistence |
getPersistence()
|
static ResourceBlock |
remove(long resourceBlockId)
Removes the resource block with the primary key from the database. |
static void |
removeAll()
Removes all the resource blocks from the database. |
static 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. |
static void |
removeByC_G_N(long companyId,
long groupId,
String name)
Removes all the resource blocks where companyId = ? and groupId = ? and name = ? from the database. |
static void |
removeByC_N(long companyId,
String name)
Removes all the resource blocks where companyId = ? and name = ? from the database. |
void |
setPersistence(ResourceBlockPersistence persistence)
Deprecated. |
static ResourceBlock |
update(ResourceBlock resourceBlock,
boolean merge)
|
static ResourceBlock |
update(ResourceBlock resourceBlock,
boolean merge,
ServiceContext serviceContext)
|
static ResourceBlock |
updateImpl(ResourceBlock resourceBlock,
boolean merge)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBlockUtil()
Method Detail |
---|
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(ResourceBlock resourceBlock)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)
public long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<ResourceBlock> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<ResourceBlock> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<ResourceBlock> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static ResourceBlock update(ResourceBlock resourceBlock, boolean merge) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)
public static ResourceBlock update(ResourceBlock resourceBlock, boolean merge, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
public static void cacheResult(ResourceBlock resourceBlock)
resourceBlock
- the resource blockpublic static void cacheResult(List<ResourceBlock> resourceBlocks)
resourceBlocks
- the resource blockspublic static ResourceBlock create(long resourceBlockId)
resourceBlockId
- the primary key for the new resource block
public static ResourceBlock remove(long resourceBlockId) throws NoSuchResourceBlockException, SystemException
resourceBlockId
- the primary key of the resource block
NoSuchResourceBlockException
- if a resource block with the primary key could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock updateImpl(ResourceBlock resourceBlock, boolean merge) throws SystemException
SystemException
public static ResourceBlock findByPrimaryKey(long resourceBlockId) throws NoSuchResourceBlockException, SystemException
NoSuchResourceBlockException
if it could not be found.
resourceBlockId
- the primary key of the resource block
NoSuchResourceBlockException
- if a resource block with the primary key could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByPrimaryKey(long resourceBlockId) throws SystemException
null
if it could not be found.
resourceBlockId
- the primary key of the resource block
null
if a resource block with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findByC_N(long companyId, String name) throws SystemException
companyId
- the company IDname
- the name
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findByC_N(long companyId, String name, int start, int end) throws SystemException
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.
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)
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findByC_N(long companyId, String name, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredpublic static ResourceBlock findByC_N_First(long companyId, String name, OrderByComparator orderByComparator) throws NoSuchResourceBlockException, SystemException
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceBlockException
- if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByC_N_First(long companyId, String name, OrderByComparator orderByComparator) throws SystemException
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock findByC_N_Last(long companyId, String name, OrderByComparator orderByComparator) throws NoSuchResourceBlockException, SystemException
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceBlockException
- if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByC_N_Last(long companyId, String name, OrderByComparator orderByComparator) throws SystemException
companyId
- the company IDname
- the nameorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock[] findByC_N_PrevAndNext(long resourceBlockId, long companyId, String name, OrderByComparator orderByComparator) throws NoSuchResourceBlockException, SystemException
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 found
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name) throws SystemException
companyId
- the company IDgroupId
- the group IDname
- the name
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, int start, int end) throws SystemException
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.
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)
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredpublic static ResourceBlock findByC_G_N_First(long companyId, long groupId, String name, OrderByComparator orderByComparator) throws NoSuchResourceBlockException, SystemException
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 found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByC_G_N_First(long companyId, long groupId, String name, OrderByComparator orderByComparator) throws SystemException
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 found
SystemException
- if a system exception occurredpublic static ResourceBlock findByC_G_N_Last(long companyId, long groupId, String name, OrderByComparator orderByComparator) throws NoSuchResourceBlockException, SystemException
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 found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByC_G_N_Last(long companyId, long groupId, String name, OrderByComparator orderByComparator) throws SystemException
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 found
SystemException
- if a system exception occurredpublic static ResourceBlock[] findByC_G_N_PrevAndNext(long resourceBlockId, long companyId, long groupId, String name, OrderByComparator orderByComparator) throws NoSuchResourceBlockException, SystemException
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 found
SystemException
- if a system exception occurredpublic static ResourceBlock findByC_G_N_P(long companyId, long groupId, String name, String permissionsHash) throws NoSuchResourceBlockException, SystemException
NoSuchResourceBlockException
if it could not be found.
companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hash
NoSuchResourceBlockException
- if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByC_G_N_P(long companyId, long groupId, String name, String permissionsHash) throws SystemException
null
if it could not be found. Uses the finder cache.
companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hash
null
if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static ResourceBlock fetchByC_G_N_P(long companyId, long groupId, String name, String permissionsHash, boolean retrieveFromCache) throws SystemException
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 use the finder cache
null
if a matching resource block could not be found
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of resource blocksend
- the upper bound of the range of resource blocks (not inclusive)
SystemException
- if a system exception occurredpublic static List<ResourceBlock> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredpublic static void removeByC_N(long companyId, String name) throws SystemException
companyId
- the company IDname
- the name
SystemException
- if a system exception occurredpublic static void removeByC_G_N(long companyId, long groupId, String name) throws SystemException
companyId
- the company IDgroupId
- the group IDname
- the name
SystemException
- if a system exception occurredpublic static ResourceBlock removeByC_G_N_P(long companyId, long groupId, String name, String permissionsHash) throws NoSuchResourceBlockException, SystemException
companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hash
SystemException
- if a system exception occurred
NoSuchResourceBlockException
public static void removeAll() throws SystemException
SystemException
- if a system exception occurredpublic static int countByC_N(long companyId, String name) throws SystemException
companyId
- the company IDname
- the name
SystemException
- if a system exception occurredpublic static int countByC_G_N(long companyId, long groupId, String name) throws SystemException
companyId
- the company IDgroupId
- the group IDname
- the name
SystemException
- if a system exception occurredpublic static int countByC_G_N_P(long companyId, long groupId, String name, String permissionsHash) throws SystemException
companyId
- the company IDgroupId
- the group IDname
- the namepermissionsHash
- the permissions hash
SystemException
- if a system exception occurredpublic static int countAll() throws SystemException
SystemException
- if a system exception occurredpublic static ResourceBlockPersistence getPersistence()
public void setPersistence(ResourceBlockPersistence persistence)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |