Liferay 6.0-ee

com.liferay.portal.service.persistence
Class ResourceActionUtil

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

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.

Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class.

Caching information and settings can be found in portal.properties

See Also:
ResourceActionPersistence, ResourceActionPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

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()
          Counts all the resource actions.
static int countByN_A(String name, String actionId)
          Counts all the resource actions where name = ? and actionId = ?.
static int countByName(String name)
          Counts all the resource actions where name = ?.
 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)
          Finds 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)
          Finds the resource action where name = ? and actionId = ? or returns null if it could not be found, optionally using the finder cache.
static ResourceAction fetchByPrimaryKey(long resourceActionId)
          Finds the resource action with the primary key or returns null if it could not be found.
static List<ResourceAction> findAll()
          Finds all the resource actions.
static List<ResourceAction> findAll(int start, int end)
          Finds a range of all the resource actions.
static List<ResourceAction> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the resource actions.
static ResourceAction findByN_A(String name, String actionId)
          Finds 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)
          Finds the first resource action in the ordered set where name = ?.
static ResourceAction findByName_Last(String name, OrderByComparator orderByComparator)
          Finds the last resource action in the ordered set where name = ?.
static ResourceAction[] findByName_PrevAndNext(long resourceActionId, String name, OrderByComparator orderByComparator)
          Finds the resource actions before and after the current resource action in the ordered set where name = ?.
static List<ResourceAction> findByName(String name)
          Finds all the resource actions where name = ?.
static List<ResourceAction> findByName(String name, int start, int end)
          Finds a range of all the resource actions where name = ?.
static List<ResourceAction> findByName(String name, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the resource actions where name = ?.
static ResourceAction findByPrimaryKey(long resourceActionId)
          Finds 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 ResourceAction remove(ResourceAction resourceAction)
           
static void removeAll()
          Removes all the resource actions from the database.
static void 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)
           
static ResourceAction update(ResourceAction resourceAction, boolean merge)
           
static ResourceAction update(ResourceAction resourceAction, boolean merge, ServiceContext serviceContext)
           
static ResourceAction updateImpl(ResourceAction resourceAction, boolean merge)
           
 
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 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)

remove

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

update

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

update

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

cacheResult

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

Parameters:
resourceAction - the resource action to cache

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 to cache

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 to remove
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,
                                        boolean merge)
                                 throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ResourceAction findByPrimaryKey(long resourceActionId)
                                       throws NoSuchResourceActionException,
                                              SystemException
Finds 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 to find
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
Finds 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 to find
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

findByName

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

Parameters:
name - the name to search with
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
Finds 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.

Parameters:
name - the name to search with
start - the lower bound of the range of resource actions to return
end - the upper bound of the range of resource actions to return (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
Finds 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.

Parameters:
name - the name to search with
start - the lower bound of the range of resource actions to return
end - the upper bound of the range of resource actions to return (not inclusive)
orderByComparator - the comparator to order the results by
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
Finds the first resource action in the ordered set 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.

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

findByName_Last

public static ResourceAction findByName_Last(String name,
                                             OrderByComparator orderByComparator)
                                      throws NoSuchResourceActionException,
                                             SystemException
Finds the last resource action in the ordered set 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.

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

findByName_PrevAndNext

public static ResourceAction[] findByName_PrevAndNext(long resourceActionId,
                                                      String name,
                                                      OrderByComparator orderByComparator)
                                               throws NoSuchResourceActionException,
                                                      SystemException
Finds the resource actions before and after the current resource action in the ordered set 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.

Parameters:
resourceActionId - the primary key of the current resource action
name - the name to search with
orderByComparator - the comparator to order the set by
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

findByN_A

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

Parameters:
name - the name to search with
actionId - the action id to search with
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
Finds the resource action where name = ? and actionId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
name - the name to search with
actionId - the action id to search with
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
Finds 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 to search with
actionId - the action id to search with
Returns:
the matching resource action, or null if a matching resource action could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceAction> findAll()
                                    throws SystemException
Finds 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
Finds 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.

Parameters:
start - the lower bound of the range of resource actions to return
end - the upper bound of the range of resource actions to return (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
Finds 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.

Parameters:
start - the lower bound of the range of resource actions to return
end - the upper bound of the range of resource actions to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of resource actions
Throws:
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 to search with
Throws:
SystemException - if a system exception occurred

removeByN_A

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

Parameters:
name - the name to search with
actionId - the action id to search with
Throws:
SystemException - if a system exception occurred
NoSuchResourceActionException

removeAll

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

Throws:
SystemException - if a system exception occurred

countByName

public static int countByName(String name)
                       throws SystemException
Counts all the resource actions where name = ?.

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

countByN_A

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

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

countAll

public static int countAll()
                    throws SystemException
Counts all the 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)

Liferay 6.0-ee