Liferay 6.2-ce-ga5

com.liferay.portlet.shopping.service.persistence
Class ShoppingCategoryUtil

java.lang.Object
  extended by com.liferay.portlet.shopping.service.persistence.ShoppingCategoryUtil

@ProviderType
public class ShoppingCategoryUtil
extends Object

The persistence utility for the shopping category service. This utility wraps ShoppingCategoryPersistenceImpl 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:
ShoppingCategoryPersistence, ShoppingCategoryPersistenceImpl

Constructor Summary
ShoppingCategoryUtil()
           
 
Method Summary
static void cacheResult(List<ShoppingCategory> shoppingCategories)
          Caches the shopping categories in the entity cache if it is enabled.
static void cacheResult(ShoppingCategory shoppingCategory)
          Caches the shopping category in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ShoppingCategory shoppingCategory)
           
static int countAll()
          Returns the number of shopping categories.
static int countByG_N(long groupId, String name)
          Returns the number of shopping categories where groupId = ? and name = ?.
static int countByG_P(long groupId, long parentCategoryId)
          Returns the number of shopping categories where groupId = ? and parentCategoryId = ?.
static int countByGroupId(long groupId)
          Returns the number of shopping categories where groupId = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ShoppingCategory create(long categoryId)
          Creates a new shopping category with the primary key.
static ShoppingCategory fetchByG_N(long groupId, String name)
          Returns the shopping category where groupId = ? and name = ? or returns null if it could not be found.
static ShoppingCategory fetchByG_N(long groupId, String name, boolean retrieveFromCache)
          Returns the shopping category where groupId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.
static ShoppingCategory fetchByG_P_First(long groupId, long parentCategoryId, OrderByComparator orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
static ShoppingCategory fetchByG_P_Last(long groupId, long parentCategoryId, OrderByComparator orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
static ShoppingCategory fetchByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ?.
static ShoppingCategory fetchByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ?.
static ShoppingCategory fetchByPrimaryKey(long categoryId)
          Returns the shopping category with the primary key or returns null if it could not be found.
static int filterCountByG_P(long groupId, long parentCategoryId)
          Returns the number of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.
static int filterCountByGroupId(long groupId)
          Returns the number of shopping categories that the user has permission to view where groupId = ?.
static ShoppingCategory[] filterFindByG_P_PrevAndNext(long categoryId, long groupId, long parentCategoryId, OrderByComparator orderByComparator)
          Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.
static List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId)
          Returns all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.
static List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId, int start, int end)
          Returns a range of all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.
static List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ? and parentCategoryId = ?.
static ShoppingCategory[] filterFindByGroupId_PrevAndNext(long categoryId, long groupId, OrderByComparator orderByComparator)
          Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = ?.
static List<ShoppingCategory> filterFindByGroupId(long groupId)
          Returns all the shopping categories that the user has permission to view where groupId = ?.
static List<ShoppingCategory> filterFindByGroupId(long groupId, int start, int end)
          Returns a range of all the shopping categories that the user has permission to view where groupId = ?.
static List<ShoppingCategory> filterFindByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ?.
static List<ShoppingCategory> findAll()
          Returns all the shopping categories.
static List<ShoppingCategory> findAll(int start, int end)
          Returns a range of all the shopping categories.
static List<ShoppingCategory> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping categories.
static ShoppingCategory findByG_N(long groupId, String name)
          Returns the shopping category where groupId = ? and name = ? or throws a NoSuchCategoryException if it could not be found.
static ShoppingCategory findByG_P_First(long groupId, long parentCategoryId, OrderByComparator orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
static ShoppingCategory findByG_P_Last(long groupId, long parentCategoryId, OrderByComparator orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
static ShoppingCategory[] findByG_P_PrevAndNext(long categoryId, long groupId, long parentCategoryId, OrderByComparator orderByComparator)
          Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
static List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId)
          Returns all the shopping categories where groupId = ? and parentCategoryId = ?.
static List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId, int start, int end)
          Returns a range of all the shopping categories where groupId = ? and parentCategoryId = ?.
static List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping categories where groupId = ? and parentCategoryId = ?.
static ShoppingCategory findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ?.
static ShoppingCategory findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ?.
static ShoppingCategory[] findByGroupId_PrevAndNext(long categoryId, long groupId, OrderByComparator orderByComparator)
          Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ?.
static List<ShoppingCategory> findByGroupId(long groupId)
          Returns all the shopping categories where groupId = ?.
static List<ShoppingCategory> findByGroupId(long groupId, int start, int end)
          Returns a range of all the shopping categories where groupId = ?.
static List<ShoppingCategory> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping categories where groupId = ?.
static ShoppingCategory findByPrimaryKey(long categoryId)
          Returns the shopping category with the primary key or throws a NoSuchCategoryException if it could not be found.
static List<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ShoppingCategoryPersistence getPersistence()
           
static ShoppingCategory remove(long categoryId)
          Removes the shopping category with the primary key from the database.
static void removeAll()
          Removes all the shopping categories from the database.
static ShoppingCategory removeByG_N(long groupId, String name)
          Removes the shopping category where groupId = ? and name = ? from the database.
static void removeByG_P(long groupId, long parentCategoryId)
          Removes all the shopping categories where groupId = ? and parentCategoryId = ? from the database.
static void removeByGroupId(long groupId)
          Removes all the shopping categories where groupId = ? from the database.
 void setPersistence(ShoppingCategoryPersistence persistence)
          Deprecated. As of 6.2.0
static ShoppingCategory update(ShoppingCategory shoppingCategory)
           
static ShoppingCategory update(ShoppingCategory shoppingCategory, ServiceContext serviceContext)
           
static ShoppingCategory updateImpl(ShoppingCategory shoppingCategory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingCategoryUtil

public ShoppingCategoryUtil()
Method Detail

clearCache

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

clearCache

public static void clearCache(ShoppingCategory shoppingCategory)
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<ShoppingCategory> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

findByGroupId

public static List<ShoppingCategory> findByGroupId(long groupId)
                                            throws SystemException
Returns all the shopping categories where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the matching shopping categories
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<ShoppingCategory> findByGroupId(long groupId,
                                                   int start,
                                                   int end)
                                            throws SystemException
Returns a range of all the shopping categories where groupId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
Returns:
the range of matching shopping categories
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<ShoppingCategory> findByGroupId(long groupId,
                                                   int start,
                                                   int end,
                                                   OrderByComparator orderByComparator)
                                            throws SystemException
Returns an ordered range of all the shopping categories where groupId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping categories
Throws:
SystemException - if a system exception occurred

findByGroupId_First

public static ShoppingCategory findByGroupId_First(long groupId,
                                                   OrderByComparator orderByComparator)
                                            throws SystemException,
                                                   NoSuchCategoryException
Returns the first shopping category in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching shopping category
Throws:
NoSuchCategoryException - if a matching shopping category could not be found
SystemException - if a system exception occurred

fetchByGroupId_First

public static ShoppingCategory fetchByGroupId_First(long groupId,
                                                    OrderByComparator orderByComparator)
                                             throws SystemException
Returns the first shopping category in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching shopping category, or null if a matching shopping category could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_Last

public static ShoppingCategory findByGroupId_Last(long groupId,
                                                  OrderByComparator orderByComparator)
                                           throws SystemException,
                                                  NoSuchCategoryException
Returns the last shopping category in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching shopping category
Throws:
NoSuchCategoryException - if a matching shopping category could not be found
SystemException - if a system exception occurred

fetchByGroupId_Last

public static ShoppingCategory fetchByGroupId_Last(long groupId,
                                                   OrderByComparator orderByComparator)
                                            throws SystemException
Returns the last shopping category in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching shopping category, or null if a matching shopping category could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

public static ShoppingCategory[] findByGroupId_PrevAndNext(long categoryId,
                                                           long groupId,
                                                           OrderByComparator orderByComparator)
                                                    throws SystemException,
                                                           NoSuchCategoryException
Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ?.

Parameters:
categoryId - the primary key of the current shopping category
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next shopping category
Throws:
NoSuchCategoryException - if a shopping category with the primary key could not be found
SystemException - if a system exception occurred

filterFindByGroupId

public static List<ShoppingCategory> filterFindByGroupId(long groupId)
                                                  throws SystemException
Returns all the shopping categories that the user has permission to view where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByGroupId

public static List<ShoppingCategory> filterFindByGroupId(long groupId,
                                                         int start,
                                                         int end)
                                                  throws SystemException
Returns a range of all the shopping categories that the user has permission to view where groupId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
Returns:
the range of matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByGroupId

public static List<ShoppingCategory> filterFindByGroupId(long groupId,
                                                         int start,
                                                         int end,
                                                         OrderByComparator orderByComparator)
                                                  throws SystemException
Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByGroupId_PrevAndNext

public static ShoppingCategory[] filterFindByGroupId_PrevAndNext(long categoryId,
                                                                 long groupId,
                                                                 OrderByComparator orderByComparator)
                                                          throws SystemException,
                                                                 NoSuchCategoryException
Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = ?.

Parameters:
categoryId - the primary key of the current shopping category
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next shopping category
Throws:
NoSuchCategoryException - if a shopping category with the primary key could not be found
SystemException - if a system exception occurred

removeByGroupId

public static void removeByGroupId(long groupId)
                            throws SystemException
Removes all the shopping categories where groupId = ? from the database.

Parameters:
groupId - the group ID
Throws:
SystemException - if a system exception occurred

countByGroupId

public static int countByGroupId(long groupId)
                          throws SystemException
Returns the number of shopping categories where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the number of matching shopping categories
Throws:
SystemException - if a system exception occurred

filterCountByGroupId

public static int filterCountByGroupId(long groupId)
                                throws SystemException
Returns the number of shopping categories that the user has permission to view where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the number of matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

findByG_P

public static List<ShoppingCategory> findByG_P(long groupId,
                                               long parentCategoryId)
                                        throws SystemException
Returns all the shopping categories where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
Returns:
the matching shopping categories
Throws:
SystemException - if a system exception occurred

findByG_P

public static List<ShoppingCategory> findByG_P(long groupId,
                                               long parentCategoryId,
                                               int start,
                                               int end)
                                        throws SystemException
Returns a range of all the shopping categories where groupId = ? and parentCategoryId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
parentCategoryId - the parent category ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
Returns:
the range of matching shopping categories
Throws:
SystemException - if a system exception occurred

findByG_P

public static List<ShoppingCategory> findByG_P(long groupId,
                                               long parentCategoryId,
                                               int start,
                                               int end,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns an ordered range of all the shopping categories where groupId = ? and parentCategoryId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
parentCategoryId - the parent category ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping categories
Throws:
SystemException - if a system exception occurred

findByG_P_First

public static ShoppingCategory findByG_P_First(long groupId,
                                               long parentCategoryId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException,
                                               NoSuchCategoryException
Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching shopping category
Throws:
NoSuchCategoryException - if a matching shopping category could not be found
SystemException - if a system exception occurred

fetchByG_P_First

public static ShoppingCategory fetchByG_P_First(long groupId,
                                                long parentCategoryId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching shopping category, or null if a matching shopping category could not be found
Throws:
SystemException - if a system exception occurred

findByG_P_Last

public static ShoppingCategory findByG_P_Last(long groupId,
                                              long parentCategoryId,
                                              OrderByComparator orderByComparator)
                                       throws SystemException,
                                              NoSuchCategoryException
Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching shopping category
Throws:
NoSuchCategoryException - if a matching shopping category could not be found
SystemException - if a system exception occurred

fetchByG_P_Last

public static ShoppingCategory fetchByG_P_Last(long groupId,
                                               long parentCategoryId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching shopping category, or null if a matching shopping category could not be found
Throws:
SystemException - if a system exception occurred

findByG_P_PrevAndNext

public static ShoppingCategory[] findByG_P_PrevAndNext(long categoryId,
                                                       long groupId,
                                                       long parentCategoryId,
                                                       OrderByComparator orderByComparator)
                                                throws SystemException,
                                                       NoSuchCategoryException
Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ? and parentCategoryId = ?.

Parameters:
categoryId - the primary key of the current shopping category
groupId - the group ID
parentCategoryId - the parent category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next shopping category
Throws:
NoSuchCategoryException - if a shopping category with the primary key could not be found
SystemException - if a system exception occurred

filterFindByG_P

public static List<ShoppingCategory> filterFindByG_P(long groupId,
                                                     long parentCategoryId)
                                              throws SystemException
Returns all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
Returns:
the matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_P

public static List<ShoppingCategory> filterFindByG_P(long groupId,
                                                     long parentCategoryId,
                                                     int start,
                                                     int end)
                                              throws SystemException
Returns a range of all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
parentCategoryId - the parent category ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
Returns:
the range of matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_P

public static List<ShoppingCategory> filterFindByG_P(long groupId,
                                                     long parentCategoryId,
                                                     int start,
                                                     int end,
                                                     OrderByComparator orderByComparator)
                                              throws SystemException
Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ? and parentCategoryId = ?.

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 ShoppingCategoryModelImpl. 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:
groupId - the group ID
parentCategoryId - the parent category ID
start - the lower bound of the range of shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_P_PrevAndNext

public static ShoppingCategory[] filterFindByG_P_PrevAndNext(long categoryId,
                                                             long groupId,
                                                             long parentCategoryId,
                                                             OrderByComparator orderByComparator)
                                                      throws SystemException,
                                                             NoSuchCategoryException
Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.

Parameters:
categoryId - the primary key of the current shopping category
groupId - the group ID
parentCategoryId - the parent category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next shopping category
Throws:
NoSuchCategoryException - if a shopping category with the primary key could not be found
SystemException - if a system exception occurred

removeByG_P

public static void removeByG_P(long groupId,
                               long parentCategoryId)
                        throws SystemException
Removes all the shopping categories where groupId = ? and parentCategoryId = ? from the database.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
Throws:
SystemException - if a system exception occurred

countByG_P

public static int countByG_P(long groupId,
                             long parentCategoryId)
                      throws SystemException
Returns the number of shopping categories where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
Returns:
the number of matching shopping categories
Throws:
SystemException - if a system exception occurred

filterCountByG_P

public static int filterCountByG_P(long groupId,
                                   long parentCategoryId)
                            throws SystemException
Returns the number of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
Returns:
the number of matching shopping categories that the user has permission to view
Throws:
SystemException - if a system exception occurred

findByG_N

public static ShoppingCategory findByG_N(long groupId,
                                         String name)
                                  throws SystemException,
                                         NoSuchCategoryException
Returns the shopping category where groupId = ? and name = ? or throws a NoSuchCategoryException if it could not be found.

Parameters:
groupId - the group ID
name - the name
Returns:
the matching shopping category
Throws:
NoSuchCategoryException - if a matching shopping category could not be found
SystemException - if a system exception occurred

fetchByG_N

public static ShoppingCategory fetchByG_N(long groupId,
                                          String name)
                                   throws SystemException
Returns the shopping category where groupId = ? and name = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
groupId - the group ID
name - the name
Returns:
the matching shopping category, or null if a matching shopping category could not be found
Throws:
SystemException - if a system exception occurred

fetchByG_N

public static ShoppingCategory fetchByG_N(long groupId,
                                          String name,
                                          boolean retrieveFromCache)
                                   throws SystemException
Returns the shopping category where groupId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.

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

removeByG_N

public static ShoppingCategory removeByG_N(long groupId,
                                           String name)
                                    throws SystemException,
                                           NoSuchCategoryException
Removes the shopping category where groupId = ? and name = ? from the database.

Parameters:
groupId - the group ID
name - the name
Returns:
the shopping category that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCategoryException

countByG_N

public static int countByG_N(long groupId,
                             String name)
                      throws SystemException
Returns the number of shopping categories where groupId = ? and name = ?.

Parameters:
groupId - the group ID
name - the name
Returns:
the number of matching shopping categories
Throws:
SystemException - if a system exception occurred

cacheResult

public static void cacheResult(ShoppingCategory shoppingCategory)
Caches the shopping category in the entity cache if it is enabled.

Parameters:
shoppingCategory - the shopping category

cacheResult

public static void cacheResult(List<ShoppingCategory> shoppingCategories)
Caches the shopping categories in the entity cache if it is enabled.

Parameters:
shoppingCategories - the shopping categories

create

public static ShoppingCategory create(long categoryId)
Creates a new shopping category with the primary key. Does not add the shopping category to the database.

Parameters:
categoryId - the primary key for the new shopping category
Returns:
the new shopping category

remove

public static ShoppingCategory remove(long categoryId)
                               throws SystemException,
                                      NoSuchCategoryException
Removes the shopping category with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
categoryId - the primary key of the shopping category
Returns:
the shopping category that was removed
Throws:
NoSuchCategoryException - if a shopping category with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static ShoppingCategory updateImpl(ShoppingCategory shoppingCategory)
                                   throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ShoppingCategory findByPrimaryKey(long categoryId)
                                         throws SystemException,
                                                NoSuchCategoryException
Returns the shopping category with the primary key or throws a NoSuchCategoryException if it could not be found.

Parameters:
categoryId - the primary key of the shopping category
Returns:
the shopping category
Throws:
NoSuchCategoryException - if a shopping category with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ShoppingCategory fetchByPrimaryKey(long categoryId)
                                          throws SystemException
Returns the shopping category with the primary key or returns null if it could not be found.

Parameters:
categoryId - the primary key of the shopping category
Returns:
the shopping category, or null if a shopping category with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ShoppingCategory> findAll()
                                      throws SystemException
Returns all the shopping categories.

Returns:
the shopping categories
Throws:
SystemException - if a system exception occurred

findAll

public static List<ShoppingCategory> findAll(int start,
                                             int end)
                                      throws SystemException
Returns a range of all the shopping categories.

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 ShoppingCategoryModelImpl. 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 shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
Returns:
the range of shopping categories
Throws:
SystemException - if a system exception occurred

findAll

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

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 ShoppingCategoryModelImpl. 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 shopping categories
end - the upper bound of the range of shopping categories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of shopping categories
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the shopping categories from the database.

Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of shopping categories.

Returns:
the number of shopping categories
Throws:
SystemException - if a system exception occurred

getPersistence

public static ShoppingCategoryPersistence getPersistence()

setPersistence

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


Liferay 6.2-ce-ga5