Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Class ResourceActionUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.ResourceActionUtil

@ProviderType
public class ResourceActionUtil
extends Object

The persistence utility for the resource action service. This utility wraps ResourceActionPersistenceImpl 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

See Also:
ResourceActionPersistence, ResourceActionPersistenceImpl

Constructor Summary
ResourceActionUtil()
           
 
Method Summary
static void cacheResult(List<ResourceAction> resourceActions)
          Caches the resource actions in the entity cache if it is enabled.
static void cacheResult(ResourceAction resourceAction)
          Caches the resource action in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ResourceAction resourceAction)
           
static int countAll()
          Returns the number of resource actions.
static int countByN_A(String name, String actionId)
          Returns the number of resource actions where name = ? and actionId = ?.
static int countByName(String name)
          Returns the number of resource actions where name = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ResourceAction create(long resourceActionId)
          Creates a new resource action with the primary key.
static ResourceAction fetchByN_A(String name, String actionId)
          Returns the resource action where name = ? and actionId = ? or returns null if it could not be found.
static ResourceAction fetchByN_A(String name, String actionId, boolean retrieveFromCache)
          Returns the resource action where name = ? and actionId = ? or returns null if it could not be found, optionally using the finder cache.
static ResourceAction fetchByName_First(String name, OrderByComparator orderByComparator)
          Returns the first resource action in the ordered set where name = ?.
static ResourceAction fetchByName_Last(String name, OrderByComparator orderByComparator)
          Returns the last resource action in the ordered set where name = ?.
static ResourceAction fetchByPrimaryKey(long resourceActionId)
          Returns the resource action with the primary key or returns null if it could not be found.
static List<ResourceAction> findAll()
          Returns all the resource actions.
static List<ResourceAction> findAll(int start, int end)
          Returns a range of all the resource actions.
static List<ResourceAction> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource actions.
static ResourceAction findByN_A(String name, String actionId)
          Returns the resource action where name = ? and actionId = ? or throws a NoSuchResourceActionException if it could not be found.
static ResourceAction findByName_First(String name, OrderByComparator orderByComparator)
          Returns the first resource action in the ordered set where name = ?.
static ResourceAction findByName_Last(String name, OrderByComparator orderByComparator)
          Returns the last resource action in the ordered set where name = ?.
static ResourceAction[] findByName_PrevAndNext(long resourceActionId, String name, OrderByComparator orderByComparator)
          Returns the resource actions before and after the current resource action in the ordered set where name = ?.
static List<ResourceAction> findByName(String name)
          Returns all the resource actions where name = ?.
static List<ResourceAction> findByName(String name, int start, int end)
          Returns a range of all the resource actions where name = ?.
static List<ResourceAction> findByName(String name, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource actions where name = ?.
static ResourceAction findByPrimaryKey(long resourceActionId)
          Returns the resource action with the primary key or throws a NoSuchResourceActionException if it could not be found.
static List<ResourceAction> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ResourceAction> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ResourceAction> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ResourceActionPersistence getPersistence()
           
static ResourceAction remove(long resourceActionId)
          Removes the resource action with the primary key from the database.
static void removeAll()
          Removes all the resource actions from the database.
static ResourceAction removeByN_A(String name, String actionId)
          Removes the resource action where name = ? and actionId = ? from the database.
static void removeByName(String name)
          Removes all the resource actions where name = ? from the database.
 void setPersistence(ResourceActionPersistence persistence)
          Deprecated. As of 6.2.0
static ResourceAction update(ResourceAction resourceAction)
           
static ResourceAction update(ResourceAction resourceAction, ServiceContext serviceContext)
           
static ResourceAction updateImpl(ResourceAction resourceAction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceActionUtil

public ResourceActionUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(ResourceAction resourceAction)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
                                  throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ResourceAction> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                 throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ResourceAction> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                        int start,
                                                        int end)
                                                 throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<ResourceAction> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                        int start,
                                                        int end,
                                                        OrderByComparator orderByComparator)
                                                 throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static ResourceAction update(ResourceAction resourceAction)
                             throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel)

update

public static ResourceAction update(ResourceAction resourceAction,
                                    ServiceContext serviceContext)
                             throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)

findByName

public static List<ResourceAction> findByName(String name)
                                       throws SystemException
Returns all the resource actions where name = ?.

Parameters:
name - the name
Returns:
the matching resource actions
Throws:
SystemException - if a system exception occurred

findByName

public static List<ResourceAction> findByName(String name,
                                              int start,
                                              int end)
                                       throws SystemException
Returns a range of all the resource actions where name = ?.

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 ResourceActionModelImpl. 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.

Parameters:
name - the name
start - the lower bound of the range of resource actions
end - the upper bound of the range of resource actions (not inclusive)
Returns:
the range of matching resource actions
Throws:
SystemException - if a system exception occurred

findByName

public static List<ResourceAction> findByName(String name,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns an ordered range of all the resource actions where name = ?.

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 ResourceActionModelImpl. 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.

Parameters:
name - the name
start - the lower bound of the range of resource actions
end - the upper bound of the range of resource actions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching resource actions
Throws:
SystemException - if a system exception occurred

findByName_First

public static ResourceAction findByName_First(String name,
                                              OrderByComparator orderByComparator)
                                       throws NoSuchResourceActionException,
                                              SystemException
Returns the first resource action in the ordered set where name = ?.

Parameters:
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource action
Throws:
NoSuchResourceActionException - if a matching resource action could not be found
SystemException - if a system exception occurred

fetchByName_First

public static ResourceAction fetchByName_First(String name,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the first resource action in the ordered set where name = ?.

Parameters:
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource action, or null if a matching resource action could not be found
Throws:
SystemException - if a system exception occurred

findByName_Last

public static ResourceAction findByName_Last(String name,
                                             OrderByComparator orderByComparator)
                                      throws NoSuchResourceActionException,
                                             SystemException
Returns the last resource action in the ordered set where name = ?.

Parameters:
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource action
Throws:
NoSuchResourceActionException - if a matching resource action could not be found
SystemException - if a system exception occurred

fetchByName_Last

public static ResourceAction fetchByName_Last(String name,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns the last resource action in the ordered set where name = ?.

Parameters:
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource action, or null if a matching resource action could not be found
Throws:
SystemException - if a system exception occurred

findByName_PrevAndNext

public static ResourceAction[] findByName_PrevAndNext(long resourceActionId,
                                                      String name,
                                                      OrderByComparator orderByComparator)
                                               throws NoSuchResourceActionException,
                                                      SystemException
Returns the resource actions before and after the current resource action in the ordered set where name = ?.

Parameters:
resourceActionId - the primary key of the current resource action
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next resource action
Throws:
NoSuchResourceActionException - if a resource action with the primary key could not be found
SystemException - if a system exception occurred

removeByName

public static void removeByName(String name)
                         throws SystemException
Removes all the resource actions where name = ? from the database.

Parameters:
name - the name
Throws:
SystemException - if a system exception occurred

countByName

public static int countByName(String name)
                       throws SystemException
Returns the number of resource actions where name = ?.

Parameters:
name - the name
Returns:
the number of matching resource actions
Throws:
SystemException - if a system exception occurred

findByN_A

public static ResourceAction findByN_A(String name,
                                       String actionId)
                                throws NoSuchResourceActionException,
                                       SystemException
Returns the resource action where name = ? and actionId = ? or throws a NoSuchResourceActionException if it could not be found.

Parameters:
name - the name
actionId - the action ID
Returns:
the matching resource action
Throws:
NoSuchResourceActionException - if a matching resource action could not be found
SystemException - if a system exception occurred

fetchByN_A

public static ResourceAction fetchByN_A(String name,
                                        String actionId)
                                 throws SystemException
Returns the resource action where name = ? and actionId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
name - the name
actionId - the action ID
Returns:
the matching resource action, or null if a matching resource action could not be found
Throws:
SystemException - if a system exception occurred

fetchByN_A

public static ResourceAction fetchByN_A(String name,
                                        String actionId,
                                        boolean retrieveFromCache)
                                 throws SystemException
Returns the resource action where name = ? and actionId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
name - the name
actionId - the action ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching resource action, or null if a matching resource action could not be found
Throws:
SystemException - if a system exception occurred

removeByN_A

public static ResourceAction removeByN_A(String name,
                                         String actionId)
                                  throws NoSuchResourceActionException,
                                         SystemException
Removes the resource action where name = ? and actionId = ? from the database.

Parameters:
name - the name
actionId - the action ID
Returns:
the resource action that was removed
Throws:
SystemException - if a system exception occurred
NoSuchResourceActionException

countByN_A

public static int countByN_A(String name,
                             String actionId)
                      throws SystemException
Returns the number of resource actions where name = ? and actionId = ?.

Parameters:
name - the name
actionId - the action ID
Returns:
the number of matching resource actions
Throws:
SystemException - if a system exception occurred

cacheResult

public static void cacheResult(ResourceAction resourceAction)
Caches the resource action in the entity cache if it is enabled.

Parameters:
resourceAction - the resource action

cacheResult

public static void cacheResult(List<ResourceAction> resourceActions)
Caches the resource actions in the entity cache if it is enabled.

Parameters:
resourceActions - the resource actions

create

public static ResourceAction create(long resourceActionId)
Creates a new resource action with the primary key. Does not add the resource action to the database.

Parameters:
resourceActionId - the primary key for the new resource action
Returns:
the new resource action

remove

public static ResourceAction remove(long resourceActionId)
                             throws NoSuchResourceActionException,
                                    SystemException
Removes the resource action with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
resourceActionId - the primary key of the resource action
Returns:
the resource action that was removed
Throws:
NoSuchResourceActionException - if a resource action with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static ResourceAction updateImpl(ResourceAction resourceAction)
                                 throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ResourceAction findByPrimaryKey(long resourceActionId)
                                       throws NoSuchResourceActionException,
                                              SystemException
Returns the resource action with the primary key or throws a NoSuchResourceActionException if it could not be found.

Parameters:
resourceActionId - the primary key of the resource action
Returns:
the resource action
Throws:
NoSuchResourceActionException - if a resource action with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ResourceAction fetchByPrimaryKey(long resourceActionId)
                                        throws SystemException
Returns the resource action with the primary key or returns null if it could not be found.

Parameters:
resourceActionId - the primary key of the resource action
Returns:
the resource action, or null if a resource action with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceAction> findAll()
                                    throws SystemException
Returns all the resource actions.

Returns:
the resource actions
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceAction> findAll(int start,
                                           int end)
                                    throws SystemException
Returns a range of all the resource actions.

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 ResourceActionModelImpl. 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.

Parameters:
start - the lower bound of the range of resource actions
end - the upper bound of the range of resource actions (not inclusive)
Returns:
the range of resource actions
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceAction> findAll(int start,
                                           int end,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Returns an ordered range of all the resource actions.

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 ResourceActionModelImpl. 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.

Parameters:
start - the lower bound of the range of resource actions
end - the upper bound of the range of resource actions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of resource actions
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the resource actions from the database.

Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of resource actions.

Returns:
the number of resource actions
Throws:
SystemException - if a system exception occurred

getPersistence

public static ResourceActionPersistence getPersistence()

setPersistence

public void setPersistence(ResourceActionPersistence persistence)
Deprecated. As of 6.2.0


Liferay 6.2-ce-ga5