Liferay 7.0-ce-m6

com.liferay.portlet.shopping.service.persistence
Interface ShoppingCategoryPersistence

All Superinterfaces:
BasePersistence<ShoppingCategory>

@ProviderType
public interface ShoppingCategoryPersistence
extends BasePersistence<ShoppingCategory>

The persistence interface for the shopping category service.

Caching information and settings can be found in portal.properties

See Also:
com.liferay.portlet.shopping.service.persistence.impl.ShoppingCategoryPersistenceImpl, ShoppingCategoryUtil

Method Summary
 void cacheResult(List<ShoppingCategory> shoppingCategories)
          Caches the shopping categories in the entity cache if it is enabled.
 void cacheResult(ShoppingCategory shoppingCategory)
          Caches the shopping category in the entity cache if it is enabled.
 int countAll()
          Returns the number of shopping categories.
 int countByG_N(long groupId, String name)
          Returns the number of shopping categories where groupId = ? and name = ?.
 int countByG_P(long groupId, long parentCategoryId)
          Returns the number of shopping categories where groupId = ? and parentCategoryId = ?.
 int countByGroupId(long groupId)
          Returns the number of shopping categories where groupId = ?.
 ShoppingCategory create(long categoryId)
          Creates a new shopping category with the primary key.
 ShoppingCategory fetchByG_N(long groupId, String name)
          Returns the shopping category where groupId = ? and name = ? or returns null if it could not be found.
 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.
 ShoppingCategory fetchByG_P_First(long groupId, long parentCategoryId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
 ShoppingCategory fetchByG_P_Last(long groupId, long parentCategoryId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
 ShoppingCategory fetchByGroupId_First(long groupId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ?.
 ShoppingCategory fetchByGroupId_Last(long groupId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ?.
 ShoppingCategory fetchByPrimaryKey(long categoryId)
          Returns the shopping category with the primary key or returns null if it could not be found.
 Map<Serializable,ShoppingCategory> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
           
 int filterCountByG_P(long groupId, long parentCategoryId)
          Returns the number of shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.
 int filterCountByGroupId(long groupId)
          Returns the number of shopping categories that the user has permission to view where groupId = ?.
 ShoppingCategory[] filterFindByG_P_PrevAndNext(long categoryId, long groupId, long parentCategoryId, OrderByComparator<ShoppingCategory> 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 = ?.
 List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId)
          Returns all the shopping categories that the user has permission to view where groupId = ? and parentCategoryId = ?.
 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 = ?.
 List<ShoppingCategory> filterFindByG_P(long groupId, long parentCategoryId, int start, int end, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ? and parentCategoryId = ?.
 ShoppingCategory[] filterFindByGroupId_PrevAndNext(long categoryId, long groupId, OrderByComparator<ShoppingCategory> 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 = ?.
 List<ShoppingCategory> filterFindByGroupId(long groupId)
          Returns all the shopping categories that the user has permission to view where groupId = ?.
 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 = ?.
 List<ShoppingCategory> filterFindByGroupId(long groupId, int start, int end, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = ?.
 List<ShoppingCategory> findAll()
          Returns all the shopping categories.
 List<ShoppingCategory> findAll(int start, int end)
          Returns a range of all the shopping categories.
 List<ShoppingCategory> findAll(int start, int end, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns an ordered range of all the shopping categories.
 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.
 ShoppingCategory findByG_P_First(long groupId, long parentCategoryId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
 ShoppingCategory findByG_P_Last(long groupId, long parentCategoryId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
 ShoppingCategory[] findByG_P_PrevAndNext(long categoryId, long groupId, long parentCategoryId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ? and parentCategoryId = ?.
 List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId)
          Returns all the shopping categories where groupId = ? and parentCategoryId = ?.
 List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId, int start, int end)
          Returns a range of all the shopping categories where groupId = ? and parentCategoryId = ?.
 List<ShoppingCategory> findByG_P(long groupId, long parentCategoryId, int start, int end, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns an ordered range of all the shopping categories where groupId = ? and parentCategoryId = ?.
 ShoppingCategory findByGroupId_First(long groupId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the first shopping category in the ordered set where groupId = ?.
 ShoppingCategory findByGroupId_Last(long groupId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the last shopping category in the ordered set where groupId = ?.
 ShoppingCategory[] findByGroupId_PrevAndNext(long categoryId, long groupId, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns the shopping categories before and after the current shopping category in the ordered set where groupId = ?.
 List<ShoppingCategory> findByGroupId(long groupId)
          Returns all the shopping categories where groupId = ?.
 List<ShoppingCategory> findByGroupId(long groupId, int start, int end)
          Returns a range of all the shopping categories where groupId = ?.
 List<ShoppingCategory> findByGroupId(long groupId, int start, int end, OrderByComparator<ShoppingCategory> orderByComparator)
          Returns an ordered range of all the shopping categories where groupId = ?.
 ShoppingCategory findByPrimaryKey(long categoryId)
          Returns the shopping category with the primary key or throws a NoSuchCategoryException if it could not be found.
 ShoppingCategory remove(long categoryId)
          Removes the shopping category with the primary key from the database.
 void removeAll()
          Removes all the shopping categories from the database.
 ShoppingCategory removeByG_N(long groupId, String name)
          Removes the shopping category where groupId = ? and name = ? from the database.
 void removeByG_P(long groupId, long parentCategoryId)
          Removes all the shopping categories where groupId = ? and parentCategoryId = ? from the database.
 void removeByGroupId(long groupId)
          Removes all the shopping categories where groupId = ? from the database.
 ShoppingCategory updateImpl(ShoppingCategory shoppingCategory)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update, update, update
 

Method Detail

findByGroupId

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

Parameters:
groupId - the group ID
Returns:
the matching shopping categories

findByGroupId

List<ShoppingCategory> findByGroupId(long groupId,
                                     int start,
                                     int end)
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

findByGroupId

List<ShoppingCategory> findByGroupId(long groupId,
                                     int start,
                                     int end,
                                     OrderByComparator<ShoppingCategory> orderByComparator)
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

findByGroupId_First

ShoppingCategory findByGroupId_First(long groupId,
                                     OrderByComparator<ShoppingCategory> orderByComparator)
                                     throws 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

fetchByGroupId_First

ShoppingCategory fetchByGroupId_First(long groupId,
                                      OrderByComparator<ShoppingCategory> orderByComparator)
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

findByGroupId_Last

ShoppingCategory findByGroupId_Last(long groupId,
                                    OrderByComparator<ShoppingCategory> orderByComparator)
                                    throws 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

fetchByGroupId_Last

ShoppingCategory fetchByGroupId_Last(long groupId,
                                     OrderByComparator<ShoppingCategory> orderByComparator)
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

findByGroupId_PrevAndNext

ShoppingCategory[] findByGroupId_PrevAndNext(long categoryId,
                                             long groupId,
                                             OrderByComparator<ShoppingCategory> orderByComparator)
                                             throws 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

filterFindByGroupId

List<ShoppingCategory> filterFindByGroupId(long groupId)
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

filterFindByGroupId

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 = ?.

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

filterFindByGroupId

List<ShoppingCategory> filterFindByGroupId(long groupId,
                                           int start,
                                           int end,
                                           OrderByComparator<ShoppingCategory> orderByComparator)
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

filterFindByGroupId_PrevAndNext

ShoppingCategory[] filterFindByGroupId_PrevAndNext(long categoryId,
                                                   long groupId,
                                                   OrderByComparator<ShoppingCategory> orderByComparator)
                                                   throws 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

removeByGroupId

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

Parameters:
groupId - the group ID

countByGroupId

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

Parameters:
groupId - the group ID
Returns:
the number of matching shopping categories

filterCountByGroupId

int filterCountByGroupId(long groupId)
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

findByG_P

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

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID
Returns:
the matching shopping categories

findByG_P

List<ShoppingCategory> findByG_P(long groupId,
                                 long parentCategoryId,
                                 int start,
                                 int end)
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

findByG_P

List<ShoppingCategory> findByG_P(long groupId,
                                 long parentCategoryId,
                                 int start,
                                 int end,
                                 OrderByComparator<ShoppingCategory> orderByComparator)
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

findByG_P_First

ShoppingCategory findByG_P_First(long groupId,
                                 long parentCategoryId,
                                 OrderByComparator<ShoppingCategory> orderByComparator)
                                 throws 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

fetchByG_P_First

ShoppingCategory fetchByG_P_First(long groupId,
                                  long parentCategoryId,
                                  OrderByComparator<ShoppingCategory> orderByComparator)
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

findByG_P_Last

ShoppingCategory findByG_P_Last(long groupId,
                                long parentCategoryId,
                                OrderByComparator<ShoppingCategory> orderByComparator)
                                throws 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

fetchByG_P_Last

ShoppingCategory fetchByG_P_Last(long groupId,
                                 long parentCategoryId,
                                 OrderByComparator<ShoppingCategory> orderByComparator)
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

findByG_P_PrevAndNext

ShoppingCategory[] findByG_P_PrevAndNext(long categoryId,
                                         long groupId,
                                         long parentCategoryId,
                                         OrderByComparator<ShoppingCategory> orderByComparator)
                                         throws 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

filterFindByG_P

List<ShoppingCategory> filterFindByG_P(long groupId,
                                       long parentCategoryId)
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

filterFindByG_P

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 = ?.

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

filterFindByG_P

List<ShoppingCategory> filterFindByG_P(long groupId,
                                       long parentCategoryId,
                                       int start,
                                       int end,
                                       OrderByComparator<ShoppingCategory> orderByComparator)
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

filterFindByG_P_PrevAndNext

ShoppingCategory[] filterFindByG_P_PrevAndNext(long categoryId,
                                               long groupId,
                                               long parentCategoryId,
                                               OrderByComparator<ShoppingCategory> orderByComparator)
                                               throws 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

removeByG_P

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

Parameters:
groupId - the group ID
parentCategoryId - the parent category ID

countByG_P

int countByG_P(long groupId,
               long parentCategoryId)
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

filterCountByG_P

int filterCountByG_P(long groupId,
                     long parentCategoryId)
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

findByG_N

ShoppingCategory findByG_N(long groupId,
                           String name)
                           throws 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

fetchByG_N

ShoppingCategory fetchByG_N(long groupId,
                            String name)
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

fetchByG_N

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.

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

removeByG_N

ShoppingCategory removeByG_N(long groupId,
                             String name)
                             throws 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:
NoSuchCategoryException

countByG_N

int countByG_N(long groupId,
               String name)
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

cacheResult

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

Parameters:
shoppingCategory - the shopping category

cacheResult

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

Parameters:
shoppingCategories - the shopping categories

create

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

ShoppingCategory remove(long categoryId)
                        throws 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

updateImpl

ShoppingCategory updateImpl(ShoppingCategory shoppingCategory)

findByPrimaryKey

ShoppingCategory findByPrimaryKey(long categoryId)
                                  throws 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

fetchByPrimaryKey

ShoppingCategory fetchByPrimaryKey(long categoryId)
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

fetchByPrimaryKeys

Map<Serializable,ShoppingCategory> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
Specified by:
fetchByPrimaryKeys in interface BasePersistence<ShoppingCategory>

findAll

List<ShoppingCategory> findAll()
Returns all the shopping categories.

Returns:
the shopping categories

findAll

List<ShoppingCategory> findAll(int start,
                               int end)
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

findAll

List<ShoppingCategory> findAll(int start,
                               int end,
                               OrderByComparator<ShoppingCategory> orderByComparator)
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

removeAll

void removeAll()
Removes all the shopping categories from the database.


countAll

int countAll()
Returns the number of shopping categories.

Returns:
the number of shopping categories

Liferay 7.0-ce-m6