Liferay 6.0.5

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

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

public class ShoppingItemUtil
extends Object

The persistence utility for the shopping item service. This utility wraps ShoppingItemPersistenceImpl 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:
ShoppingItemPersistence, ShoppingItemPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
ShoppingItemUtil()
           
 
Method Summary
static void cacheResult(List<ShoppingItem> shoppingItems)
          Caches the shopping items in the entity cache if it is enabled.
static void cacheResult(ShoppingItem shoppingItem)
          Caches the shopping item in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ShoppingItem shoppingItem)
           
static boolean containsShoppingItemPrice(long pk, long shoppingItemPricePK)
          Determines whether the shopping item price is associated with the shopping item.
static boolean containsShoppingItemPrices(long pk)
          Determines whether the shopping item has any shopping item prices associated with it.
static int countAll()
          Counts all the shopping items.
static int countByC_S(long companyId, String sku)
          Counts all the shopping items where companyId = ? and sku = ?.
static int countByG_C(long groupId, long categoryId)
          Counts all the shopping items where groupId = ? and categoryId = ?.
static int countByLargeImageId(long largeImageId)
          Counts all the shopping items where largeImageId = ?.
static int countByMediumImageId(long mediumImageId)
          Counts all the shopping items where mediumImageId = ?.
static int countBySmallImageId(long smallImageId)
          Counts all the shopping items where smallImageId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ShoppingItem create(long itemId)
          Creates a new shopping item with the primary key.
static ShoppingItem fetchByC_S(long companyId, String sku)
          Finds the shopping item where companyId = ? and sku = ? or returns null if it could not be found.
static ShoppingItem fetchByC_S(long companyId, String sku, boolean retrieveFromCache)
          Finds the shopping item where companyId = ? and sku = ? or returns null if it could not be found, optionally using the finder cache.
static ShoppingItem fetchByLargeImageId(long largeImageId)
          Finds the shopping item where largeImageId = ? or returns null if it could not be found.
static ShoppingItem fetchByLargeImageId(long largeImageId, boolean retrieveFromCache)
          Finds the shopping item where largeImageId = ? or returns null if it could not be found, optionally using the finder cache.
static ShoppingItem fetchByMediumImageId(long mediumImageId)
          Finds the shopping item where mediumImageId = ? or returns null if it could not be found.
static ShoppingItem fetchByMediumImageId(long mediumImageId, boolean retrieveFromCache)
          Finds the shopping item where mediumImageId = ? or returns null if it could not be found, optionally using the finder cache.
static ShoppingItem fetchByPrimaryKey(long itemId)
          Finds the shopping item with the primary key or returns null if it could not be found.
static ShoppingItem fetchBySmallImageId(long smallImageId)
          Finds the shopping item where smallImageId = ? or returns null if it could not be found.
static ShoppingItem fetchBySmallImageId(long smallImageId, boolean retrieveFromCache)
          Finds the shopping item where smallImageId = ? or returns null if it could not be found, optionally using the finder cache.
static int filterCountByG_C(long groupId, long categoryId)
          Filters by the user's permissions and counts all the shopping items where groupId = ? and categoryId = ?.
static List<ShoppingItem> filterFindByG_C(long groupId, long categoryId)
          Filters by the user's permissions and finds all the shopping items where groupId = ? and categoryId = ?.
static List<ShoppingItem> filterFindByG_C(long groupId, long categoryId, int start, int end)
          Filters by the user's permissions and finds a range of all the shopping items where groupId = ? and categoryId = ?.
static List<ShoppingItem> filterFindByG_C(long groupId, long categoryId, int start, int end, OrderByComparator orderByComparator)
          Filters by the user's permissions and finds an ordered range of all the shopping items where groupId = ? and categoryId = ?.
static List<ShoppingItem> findAll()
          Finds all the shopping items.
static List<ShoppingItem> findAll(int start, int end)
          Finds a range of all the shopping items.
static List<ShoppingItem> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the shopping items.
static ShoppingItem findByC_S(long companyId, String sku)
          Finds the shopping item where companyId = ? and sku = ? or throws a NoSuchItemException if it could not be found.
static ShoppingItem findByG_C_First(long groupId, long categoryId, OrderByComparator orderByComparator)
          Finds the first shopping item in the ordered set where groupId = ? and categoryId = ?.
static ShoppingItem findByG_C_Last(long groupId, long categoryId, OrderByComparator orderByComparator)
          Finds the last shopping item in the ordered set where groupId = ? and categoryId = ?.
static ShoppingItem[] findByG_C_PrevAndNext(long itemId, long groupId, long categoryId, OrderByComparator orderByComparator)
          Finds the shopping items before and after the current shopping item in the ordered set where groupId = ? and categoryId = ?.
static List<ShoppingItem> findByG_C(long groupId, long categoryId)
          Finds all the shopping items where groupId = ? and categoryId = ?.
static List<ShoppingItem> findByG_C(long groupId, long categoryId, int start, int end)
          Finds a range of all the shopping items where groupId = ? and categoryId = ?.
static List<ShoppingItem> findByG_C(long groupId, long categoryId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the shopping items where groupId = ? and categoryId = ?.
static ShoppingItem findByLargeImageId(long largeImageId)
          Finds the shopping item where largeImageId = ? or throws a NoSuchItemException if it could not be found.
static ShoppingItem findByMediumImageId(long mediumImageId)
          Finds the shopping item where mediumImageId = ? or throws a NoSuchItemException if it could not be found.
static ShoppingItem findByPrimaryKey(long itemId)
          Finds the shopping item with the primary key or throws a NoSuchItemException if it could not be found.
static ShoppingItem findBySmallImageId(long smallImageId)
          Finds the shopping item where smallImageId = ? or throws a NoSuchItemException if it could not be found.
static List<ShoppingItem> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ShoppingItem> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ShoppingItem> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ShoppingItemPersistence getPersistence()
           
static List<ShoppingItemPrice> getShoppingItemPrices(long pk)
          Gets all the shopping item prices associated with the shopping item.
static List<ShoppingItemPrice> getShoppingItemPrices(long pk, int start, int end)
          Gets a range of all the shopping item prices associated with the shopping item.
static List<ShoppingItemPrice> getShoppingItemPrices(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the shopping item prices associated with the shopping item.
static int getShoppingItemPricesSize(long pk)
          Gets the number of shopping item prices associated with the shopping item.
static ShoppingItem remove(long itemId)
          Removes the shopping item with the primary key from the database.
static ShoppingItem remove(ShoppingItem shoppingItem)
           
static void removeAll()
          Removes all the shopping items from the database.
static void removeByC_S(long companyId, String sku)
          Removes the shopping item where companyId = ? and sku = ? from the database.
static void removeByG_C(long groupId, long categoryId)
          Removes all the shopping items where groupId = ? and categoryId = ? from the database.
static void removeByLargeImageId(long largeImageId)
          Removes the shopping item where largeImageId = ? from the database.
static void removeByMediumImageId(long mediumImageId)
          Removes the shopping item where mediumImageId = ? from the database.
static void removeBySmallImageId(long smallImageId)
          Removes the shopping item where smallImageId = ? from the database.
 void setPersistence(ShoppingItemPersistence persistence)
           
static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
           
static ShoppingItem update(ShoppingItem shoppingItem, boolean merge, ServiceContext serviceContext)
           
static ShoppingItem updateImpl(ShoppingItem shoppingItem, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingItemUtil

public ShoppingItemUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

remove

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

update

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

update

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

cacheResult

public static void cacheResult(ShoppingItem shoppingItem)
Caches the shopping item in the entity cache if it is enabled.

Parameters:
shoppingItem - the shopping item to cache

cacheResult

public static void cacheResult(List<ShoppingItem> shoppingItems)
Caches the shopping items in the entity cache if it is enabled.

Parameters:
shoppingItems - the shopping items to cache

create

public static ShoppingItem create(long itemId)
Creates a new shopping item with the primary key. Does not add the shopping item to the database.

Parameters:
itemId - the primary key for the new shopping item
Returns:
the new shopping item

remove

public static ShoppingItem remove(long itemId)
                           throws SystemException,
                                  NoSuchItemException
Removes the shopping item with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
itemId - the primary key of the shopping item to remove
Returns:
the shopping item that was removed
Throws:
NoSuchItemException - if a shopping item with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static ShoppingItem updateImpl(ShoppingItem shoppingItem,
                                      boolean merge)
                               throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ShoppingItem findByPrimaryKey(long itemId)
                                     throws SystemException,
                                            NoSuchItemException
Finds the shopping item with the primary key or throws a NoSuchItemException if it could not be found.

Parameters:
itemId - the primary key of the shopping item to find
Returns:
the shopping item
Throws:
NoSuchItemException - if a shopping item with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ShoppingItem fetchByPrimaryKey(long itemId)
                                      throws SystemException
Finds the shopping item with the primary key or returns null if it could not be found.

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

findBySmallImageId

public static ShoppingItem findBySmallImageId(long smallImageId)
                                       throws SystemException,
                                              NoSuchItemException
Finds the shopping item where smallImageId = ? or throws a NoSuchItemException if it could not be found.

Parameters:
smallImageId - the small image id to search with
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchBySmallImageId

public static ShoppingItem fetchBySmallImageId(long smallImageId)
                                        throws SystemException
Finds the shopping item where smallImageId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
smallImageId - the small image id to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

fetchBySmallImageId

public static ShoppingItem fetchBySmallImageId(long smallImageId,
                                               boolean retrieveFromCache)
                                        throws SystemException
Finds the shopping item where smallImageId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
smallImageId - the small image id to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

findByMediumImageId

public static ShoppingItem findByMediumImageId(long mediumImageId)
                                        throws SystemException,
                                               NoSuchItemException
Finds the shopping item where mediumImageId = ? or throws a NoSuchItemException if it could not be found.

Parameters:
mediumImageId - the medium image id to search with
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByMediumImageId

public static ShoppingItem fetchByMediumImageId(long mediumImageId)
                                         throws SystemException
Finds the shopping item where mediumImageId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
mediumImageId - the medium image id to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

fetchByMediumImageId

public static ShoppingItem fetchByMediumImageId(long mediumImageId,
                                                boolean retrieveFromCache)
                                         throws SystemException
Finds the shopping item where mediumImageId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
mediumImageId - the medium image id to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

findByLargeImageId

public static ShoppingItem findByLargeImageId(long largeImageId)
                                       throws SystemException,
                                              NoSuchItemException
Finds the shopping item where largeImageId = ? or throws a NoSuchItemException if it could not be found.

Parameters:
largeImageId - the large image id to search with
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByLargeImageId

public static ShoppingItem fetchByLargeImageId(long largeImageId)
                                        throws SystemException
Finds the shopping item where largeImageId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
largeImageId - the large image id to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

fetchByLargeImageId

public static ShoppingItem fetchByLargeImageId(long largeImageId,
                                               boolean retrieveFromCache)
                                        throws SystemException
Finds the shopping item where largeImageId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
largeImageId - the large image id to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

findByG_C

public static List<ShoppingItem> findByG_C(long groupId,
                                           long categoryId)
                                    throws SystemException
Finds all the shopping items where groupId = ? and categoryId = ?.

Parameters:
groupId - the group id to search with
categoryId - the category id to search with
Returns:
the matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C

public static List<ShoppingItem> findByG_C(long groupId,
                                           long categoryId,
                                           int start,
                                           int end)
                                    throws SystemException
Finds a range of all the shopping items where groupId = ? and categoryId = ?.

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:
groupId - the group id to search with
categoryId - the category id to search with
start - the lower bound of the range of shopping items to return
end - the upper bound of the range of shopping items to return (not inclusive)
Returns:
the range of matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C

public static List<ShoppingItem> findByG_C(long groupId,
                                           long categoryId,
                                           int start,
                                           int end,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Finds an ordered range of all the shopping items where groupId = ? and categoryId = ?.

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:
groupId - the group id to search with
categoryId - the category id to search with
start - the lower bound of the range of shopping items to return
end - the upper bound of the range of shopping items to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C_First

public static ShoppingItem findByG_C_First(long groupId,
                                           long categoryId,
                                           OrderByComparator orderByComparator)
                                    throws SystemException,
                                           NoSuchItemException
Finds the first shopping item in the ordered set where groupId = ? and categoryId = ?.

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:
groupId - the group id to search with
categoryId - the category id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

findByG_C_Last

public static ShoppingItem findByG_C_Last(long groupId,
                                          long categoryId,
                                          OrderByComparator orderByComparator)
                                   throws SystemException,
                                          NoSuchItemException
Finds the last shopping item in the ordered set where groupId = ? and categoryId = ?.

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:
groupId - the group id to search with
categoryId - the category id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

findByG_C_PrevAndNext

public static ShoppingItem[] findByG_C_PrevAndNext(long itemId,
                                                   long groupId,
                                                   long categoryId,
                                                   OrderByComparator orderByComparator)
                                            throws SystemException,
                                                   NoSuchItemException
Finds the shopping items before and after the current shopping item in the ordered set where groupId = ? and categoryId = ?.

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:
itemId - the primary key of the current shopping item
groupId - the group id to search with
categoryId - the category id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next shopping item
Throws:
NoSuchItemException - if a shopping item with the primary key could not be found
SystemException - if a system exception occurred

filterFindByG_C

public static List<ShoppingItem> filterFindByG_C(long groupId,
                                                 long categoryId)
                                          throws SystemException
Filters by the user's permissions and finds all the shopping items where groupId = ? and categoryId = ?.

Parameters:
groupId - the group id to search with
categoryId - the category id to search with
Returns:
the matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_C

public static List<ShoppingItem> filterFindByG_C(long groupId,
                                                 long categoryId,
                                                 int start,
                                                 int end)
                                          throws SystemException
Filters by the user's permissions and finds a range of all the shopping items where groupId = ? and categoryId = ?.

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:
groupId - the group id to search with
categoryId - the category id to search with
start - the lower bound of the range of shopping items to return
end - the upper bound of the range of shopping items to return (not inclusive)
Returns:
the range of matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_C

public static List<ShoppingItem> filterFindByG_C(long groupId,
                                                 long categoryId,
                                                 int start,
                                                 int end,
                                                 OrderByComparator orderByComparator)
                                          throws SystemException
Filters by the user's permissions and finds an ordered range of all the shopping items where groupId = ? and categoryId = ?.

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:
groupId - the group id to search with
categoryId - the category id to search with
start - the lower bound of the range of shopping items to return
end - the upper bound of the range of shopping items to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

findByC_S

public static ShoppingItem findByC_S(long companyId,
                                     String sku)
                              throws SystemException,
                                     NoSuchItemException
Finds the shopping item where companyId = ? and sku = ? or throws a NoSuchItemException if it could not be found.

Parameters:
companyId - the company id to search with
sku - the sku to search with
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByC_S

public static ShoppingItem fetchByC_S(long companyId,
                                      String sku)
                               throws SystemException
Finds the shopping item where companyId = ? and sku = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
sku - the sku to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_S

public static ShoppingItem fetchByC_S(long companyId,
                                      String sku,
                                      boolean retrieveFromCache)
                               throws SystemException
Finds the shopping item where companyId = ? and sku = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
sku - the sku to search with
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ShoppingItem> findAll()
                                  throws SystemException
Finds all the shopping items.

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

findAll

public static List<ShoppingItem> findAll(int start,
                                         int end)
                                  throws SystemException
Finds a range of all the shopping items.

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

findAll

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

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

removeBySmallImageId

public static void removeBySmallImageId(long smallImageId)
                                 throws SystemException,
                                        NoSuchItemException
Removes the shopping item where smallImageId = ? from the database.

Parameters:
smallImageId - the small image id to search with
Throws:
SystemException - if a system exception occurred
NoSuchItemException

removeByMediumImageId

public static void removeByMediumImageId(long mediumImageId)
                                  throws SystemException,
                                         NoSuchItemException
Removes the shopping item where mediumImageId = ? from the database.

Parameters:
mediumImageId - the medium image id to search with
Throws:
SystemException - if a system exception occurred
NoSuchItemException

removeByLargeImageId

public static void removeByLargeImageId(long largeImageId)
                                 throws SystemException,
                                        NoSuchItemException
Removes the shopping item where largeImageId = ? from the database.

Parameters:
largeImageId - the large image id to search with
Throws:
SystemException - if a system exception occurred
NoSuchItemException

removeByG_C

public static void removeByG_C(long groupId,
                               long categoryId)
                        throws SystemException
Removes all the shopping items where groupId = ? and categoryId = ? from the database.

Parameters:
groupId - the group id to search with
categoryId - the category id to search with
Throws:
SystemException - if a system exception occurred

removeByC_S

public static void removeByC_S(long companyId,
                               String sku)
                        throws SystemException,
                               NoSuchItemException
Removes the shopping item where companyId = ? and sku = ? from the database.

Parameters:
companyId - the company id to search with
sku - the sku to search with
Throws:
SystemException - if a system exception occurred
NoSuchItemException

removeAll

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

Throws:
SystemException - if a system exception occurred

countBySmallImageId

public static int countBySmallImageId(long smallImageId)
                               throws SystemException
Counts all the shopping items where smallImageId = ?.

Parameters:
smallImageId - the small image id to search with
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

countByMediumImageId

public static int countByMediumImageId(long mediumImageId)
                                throws SystemException
Counts all the shopping items where mediumImageId = ?.

Parameters:
mediumImageId - the medium image id to search with
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

countByLargeImageId

public static int countByLargeImageId(long largeImageId)
                               throws SystemException
Counts all the shopping items where largeImageId = ?.

Parameters:
largeImageId - the large image id to search with
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

countByG_C

public static int countByG_C(long groupId,
                             long categoryId)
                      throws SystemException
Counts all the shopping items where groupId = ? and categoryId = ?.

Parameters:
groupId - the group id to search with
categoryId - the category id to search with
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

filterCountByG_C

public static int filterCountByG_C(long groupId,
                                   long categoryId)
                            throws SystemException
Filters by the user's permissions and counts all the shopping items where groupId = ? and categoryId = ?.

Parameters:
groupId - the group id to search with
categoryId - the category id to search with
Returns:
the number of matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

countByC_S

public static int countByC_S(long companyId,
                             String sku)
                      throws SystemException
Counts all the shopping items where companyId = ? and sku = ?.

Parameters:
companyId - the company id to search with
sku - the sku to search with
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Counts all the shopping items.

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

getShoppingItemPrices

public static List<ShoppingItemPrice> getShoppingItemPrices(long pk)
                                                     throws SystemException
Gets all the shopping item prices associated with the shopping item.

Parameters:
pk - the primary key of the shopping item to get the associated shopping item prices for
Returns:
the shopping item prices associated with the shopping item
Throws:
SystemException - if a system exception occurred

getShoppingItemPrices

public static List<ShoppingItemPrice> getShoppingItemPrices(long pk,
                                                            int start,
                                                            int end)
                                                     throws SystemException
Gets a range of all the shopping item prices associated with the shopping item.

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:
pk - the primary key of the shopping item to get the associated shopping item prices for
start - the lower bound of the range of shopping items to return
end - the upper bound of the range of shopping items to return (not inclusive)
Returns:
the range of shopping item prices associated with the shopping item
Throws:
SystemException - if a system exception occurred

getShoppingItemPrices

public static List<ShoppingItemPrice> getShoppingItemPrices(long pk,
                                                            int start,
                                                            int end,
                                                            OrderByComparator orderByComparator)
                                                     throws SystemException
Gets an ordered range of all the shopping item prices associated with the shopping item.

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:
pk - the primary key of the shopping item to get the associated shopping item prices for
start - the lower bound of the range of shopping items to return
end - the upper bound of the range of shopping items to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of shopping item prices associated with the shopping item
Throws:
SystemException - if a system exception occurred

getShoppingItemPricesSize

public static int getShoppingItemPricesSize(long pk)
                                     throws SystemException
Gets the number of shopping item prices associated with the shopping item.

Parameters:
pk - the primary key of the shopping item to get the number of associated shopping item prices for
Returns:
the number of shopping item prices associated with the shopping item
Throws:
SystemException - if a system exception occurred

containsShoppingItemPrice

public static boolean containsShoppingItemPrice(long pk,
                                                long shoppingItemPricePK)
                                         throws SystemException
Determines whether the shopping item price is associated with the shopping item.

Parameters:
pk - the primary key of the shopping item
shoppingItemPricePK - the primary key of the shopping item price
Returns:
whether the shopping item price is associated with the shopping item
Throws:
SystemException - if a system exception occurred

containsShoppingItemPrices

public static boolean containsShoppingItemPrices(long pk)
                                          throws SystemException
Determines whether the shopping item has any shopping item prices associated with it.

Parameters:
pk - the primary key of the shopping item to check for associations with shopping item prices
Returns:
whether the shopping item has any shopping item prices associated with it
Throws:
SystemException - if a system exception occurred

getPersistence

public static ShoppingItemPersistence getPersistence()

setPersistence

public void setPersistence(ShoppingItemPersistence persistence)

Liferay 6.0.5