Liferay 6.2-ce-ga5

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

java.lang.Object
  extended by com.liferay.portal.service.persistence.impl.BasePersistenceImpl<ShoppingItem>
      extended by com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistenceImpl
All Implemented Interfaces:
SessionFactory, BasePersistence<ShoppingItem>, ShoppingItemPersistence

public class ShoppingItemPersistenceImpl
extends BasePersistenceImpl<ShoppingItem>
implements ShoppingItemPersistence

The persistence implementation for the shopping item service.

Caching information and settings can be found in portal.properties

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

Field Summary
static String FINDER_CLASS_NAME_ENTITY
           
static String FINDER_CLASS_NAME_LIST_WITH_PAGINATION
           
static String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
           
static FinderPath FINDER_PATH_COUNT_ALL
           
static FinderPath FINDER_PATH_COUNT_BY_C_S
           
static FinderPath FINDER_PATH_COUNT_BY_G_C
           
static FinderPath FINDER_PATH_COUNT_BY_LARGEIMAGEID
           
static FinderPath FINDER_PATH_COUNT_BY_MEDIUMIMAGEID
           
static FinderPath FINDER_PATH_COUNT_BY_SMALLIMAGEID
           
static FinderPath FINDER_PATH_FETCH_BY_C_S
           
static FinderPath FINDER_PATH_FETCH_BY_LARGEIMAGEID
           
static FinderPath FINDER_PATH_FETCH_BY_MEDIUMIMAGEID
           
static FinderPath FINDER_PATH_FETCH_BY_SMALLIMAGEID
           
static FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL
           
static FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_C
           
static FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
           
static FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C
           
 
Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl
COUNT_COLUMN_NAME, FINDER_ARGS_EMPTY, listeners, ORDER_BY_ASC, ORDER_BY_ASC_HAS_NEXT, ORDER_BY_CLAUSE, ORDER_BY_DESC, ORDER_BY_DESC_HAS_NEXT, WHERE_AND, WHERE_GREATER_THAN, WHERE_GREATER_THAN_HAS_NEXT, WHERE_LESSER_THAN, WHERE_LESSER_THAN_HAS_NEXT, WHERE_OR
 
Constructor Summary
ShoppingItemPersistenceImpl()
           
 
Method Summary
 void afterPropertiesSet()
          Initializes the shopping item persistence.
 void cacheResult(List<ShoppingItem> shoppingItems)
          Caches the shopping items in the entity cache if it is enabled.
 void cacheResult(ShoppingItem shoppingItem)
          Caches the shopping item in the entity cache if it is enabled.
protected  void cacheUniqueFindersCache(ShoppingItem shoppingItem)
           
 void clearCache()
          Clears the cache for all shopping items.
 void clearCache(List<ShoppingItem> shoppingItems)
          Clears the cache for a List instances of this model.
 void clearCache(ShoppingItem shoppingItem)
          Clears the cache for the shopping item.
protected  void clearUniqueFindersCache(ShoppingItem shoppingItem)
           
 int countAll()
          Returns the number of shopping items.
 int countByC_S(long companyId, String sku)
          Returns the number of shopping items where companyId = ? and sku = ?.
 int countByG_C(long groupId, long categoryId)
          Returns the number of shopping items where groupId = ? and categoryId = ?.
 int countByLargeImageId(long largeImageId)
          Returns the number of shopping items where largeImageId = ?.
 int countByMediumImageId(long mediumImageId)
          Returns the number of shopping items where mediumImageId = ?.
 int countBySmallImageId(long smallImageId)
          Returns the number of shopping items where smallImageId = ?.
 ShoppingItem create(long itemId)
          Creates a new shopping item with the primary key.
 void destroy()
           
 ShoppingItem fetchByC_S(long companyId, String sku)
          Returns the shopping item where companyId = ? and sku = ? or returns null if it could not be found.
 ShoppingItem fetchByC_S(long companyId, String sku, boolean retrieveFromCache)
          Returns the shopping item where companyId = ? and sku = ? or returns null if it could not be found, optionally using the finder cache.
 ShoppingItem fetchByG_C_First(long groupId, long categoryId, OrderByComparator orderByComparator)
          Returns the first shopping item in the ordered set where groupId = ? and categoryId = ?.
 ShoppingItem fetchByG_C_Last(long groupId, long categoryId, OrderByComparator orderByComparator)
          Returns the last shopping item in the ordered set where groupId = ? and categoryId = ?.
 ShoppingItem fetchByLargeImageId(long largeImageId)
          Returns the shopping item where largeImageId = ? or returns null if it could not be found.
 ShoppingItem fetchByLargeImageId(long largeImageId, boolean retrieveFromCache)
          Returns the shopping item where largeImageId = ? or returns null if it could not be found, optionally using the finder cache.
 ShoppingItem fetchByMediumImageId(long mediumImageId)
          Returns the shopping item where mediumImageId = ? or returns null if it could not be found.
 ShoppingItem fetchByMediumImageId(long mediumImageId, boolean retrieveFromCache)
          Returns the shopping item where mediumImageId = ? or returns null if it could not be found, optionally using the finder cache.
 ShoppingItem fetchByPrimaryKey(long itemId)
          Returns the shopping item with the primary key or returns null if it could not be found.
 ShoppingItem fetchByPrimaryKey(Serializable primaryKey)
          Returns the shopping item with the primary key or returns null if it could not be found.
 ShoppingItem fetchBySmallImageId(long smallImageId)
          Returns the shopping item where smallImageId = ? or returns null if it could not be found.
 ShoppingItem fetchBySmallImageId(long smallImageId, boolean retrieveFromCache)
          Returns the shopping item where smallImageId = ? or returns null if it could not be found, optionally using the finder cache.
 int filterCountByG_C(long groupId, long categoryId)
          Returns the number of shopping items that the user has permission to view where groupId = ? and categoryId = ?.
 ShoppingItem[] filterFindByG_C_PrevAndNext(long itemId, long groupId, long categoryId, OrderByComparator orderByComparator)
          Returns the shopping items before and after the current shopping item in the ordered set of shopping items that the user has permission to view where groupId = ? and categoryId = ?.
 List<ShoppingItem> filterFindByG_C(long groupId, long categoryId)
          Returns all the shopping items that the user has permission to view where groupId = ? and categoryId = ?.
 List<ShoppingItem> filterFindByG_C(long groupId, long categoryId, int start, int end)
          Returns a range of all the shopping items that the user has permission to view where groupId = ? and categoryId = ?.
 List<ShoppingItem> filterFindByG_C(long groupId, long categoryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping items that the user has permissions to view where groupId = ? and categoryId = ?.
protected  ShoppingItem filterGetByG_C_PrevAndNext(Session session, ShoppingItem shoppingItem, long groupId, long categoryId, OrderByComparator orderByComparator, boolean previous)
           
 List<ShoppingItem> findAll()
          Returns all the shopping items.
 List<ShoppingItem> findAll(int start, int end)
          Returns a range of all the shopping items.
 List<ShoppingItem> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping items.
 ShoppingItem findByC_S(long companyId, String sku)
          Returns the shopping item where companyId = ? and sku = ? or throws a NoSuchItemException if it could not be found.
 ShoppingItem findByG_C_First(long groupId, long categoryId, OrderByComparator orderByComparator)
          Returns the first shopping item in the ordered set where groupId = ? and categoryId = ?.
 ShoppingItem findByG_C_Last(long groupId, long categoryId, OrderByComparator orderByComparator)
          Returns the last shopping item in the ordered set where groupId = ? and categoryId = ?.
 ShoppingItem[] findByG_C_PrevAndNext(long itemId, long groupId, long categoryId, OrderByComparator orderByComparator)
          Returns the shopping items before and after the current shopping item in the ordered set where groupId = ? and categoryId = ?.
 List<ShoppingItem> findByG_C(long groupId, long categoryId)
          Returns all the shopping items where groupId = ? and categoryId = ?.
 List<ShoppingItem> findByG_C(long groupId, long categoryId, int start, int end)
          Returns a range of all the shopping items where groupId = ? and categoryId = ?.
 List<ShoppingItem> findByG_C(long groupId, long categoryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping items where groupId = ? and categoryId = ?.
 ShoppingItem findByLargeImageId(long largeImageId)
          Returns the shopping item where largeImageId = ? or throws a NoSuchItemException if it could not be found.
 ShoppingItem findByMediumImageId(long mediumImageId)
          Returns the shopping item where mediumImageId = ? or throws a NoSuchItemException if it could not be found.
 ShoppingItem findByPrimaryKey(long itemId)
          Returns the shopping item with the primary key or throws a NoSuchItemException if it could not be found.
 ShoppingItem findByPrimaryKey(Serializable primaryKey)
          Returns the shopping item with the primary key or throws a NoSuchModelException if it could not be found.
 ShoppingItem findBySmallImageId(long smallImageId)
          Returns the shopping item where smallImageId = ? or throws a NoSuchItemException if it could not be found.
protected  Set<String> getBadColumnNames()
           
protected  ShoppingItem getByG_C_PrevAndNext(Session session, ShoppingItem shoppingItem, long groupId, long categoryId, OrderByComparator orderByComparator, boolean previous)
           
 ShoppingItem remove(long itemId)
          Removes the shopping item with the primary key from the database.
 ShoppingItem remove(Serializable primaryKey)
          Removes the shopping item with the primary key from the database.
 void removeAll()
          Removes all the shopping items from the database.
 ShoppingItem removeByC_S(long companyId, String sku)
          Removes the shopping item where companyId = ? and sku = ? from the database.
 void removeByG_C(long groupId, long categoryId)
          Removes all the shopping items where groupId = ? and categoryId = ? from the database.
 ShoppingItem removeByLargeImageId(long largeImageId)
          Removes the shopping item where largeImageId = ? from the database.
 ShoppingItem removeByMediumImageId(long mediumImageId)
          Removes the shopping item where mediumImageId = ? from the database.
 ShoppingItem removeBySmallImageId(long smallImageId)
          Removes the shopping item where smallImageId = ? from the database.
protected  ShoppingItem removeImpl(ShoppingItem shoppingItem)
          Removes the model instance from the database.
protected  ShoppingItem toUnwrappedModel(ShoppingItem shoppingItem)
           
 ShoppingItem updateImpl(ShoppingItem shoppingItem)
          Updates the model instance in the database or adds it if it does not yet exist.
 
Methods inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl
appendOrderByComparator, appendOrderByComparator, closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getClassLoader, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openNewSession, openSession, processException, registerListener, remove, removeConjunction, setDataSource, setModelClass, setSessionFactory, unregisterListener, update, update, update, update, updateImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update, update, update
 

Field Detail

FINDER_CLASS_NAME_ENTITY

public static final String FINDER_CLASS_NAME_ENTITY

FINDER_CLASS_NAME_LIST_WITH_PAGINATION

public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION

FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION

public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION

FINDER_PATH_WITH_PAGINATION_FIND_ALL

public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL

FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL

public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL

FINDER_PATH_COUNT_ALL

public static final FinderPath FINDER_PATH_COUNT_ALL

FINDER_PATH_FETCH_BY_SMALLIMAGEID

public static final FinderPath FINDER_PATH_FETCH_BY_SMALLIMAGEID

FINDER_PATH_COUNT_BY_SMALLIMAGEID

public static final FinderPath FINDER_PATH_COUNT_BY_SMALLIMAGEID

FINDER_PATH_FETCH_BY_MEDIUMIMAGEID

public static final FinderPath FINDER_PATH_FETCH_BY_MEDIUMIMAGEID

FINDER_PATH_COUNT_BY_MEDIUMIMAGEID

public static final FinderPath FINDER_PATH_COUNT_BY_MEDIUMIMAGEID

FINDER_PATH_FETCH_BY_LARGEIMAGEID

public static final FinderPath FINDER_PATH_FETCH_BY_LARGEIMAGEID

FINDER_PATH_COUNT_BY_LARGEIMAGEID

public static final FinderPath FINDER_PATH_COUNT_BY_LARGEIMAGEID

FINDER_PATH_WITH_PAGINATION_FIND_BY_G_C

public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_C

FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C

public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C

FINDER_PATH_COUNT_BY_G_C

public static final FinderPath FINDER_PATH_COUNT_BY_G_C

FINDER_PATH_FETCH_BY_C_S

public static final FinderPath FINDER_PATH_FETCH_BY_C_S

FINDER_PATH_COUNT_BY_C_S

public static final FinderPath FINDER_PATH_COUNT_BY_C_S
Constructor Detail

ShoppingItemPersistenceImpl

public ShoppingItemPersistenceImpl()
Method Detail

findBySmallImageId

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

Specified by:
findBySmallImageId in interface ShoppingItemPersistence
Parameters:
smallImageId - the small image ID
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchBySmallImageId

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

Specified by:
fetchBySmallImageId in interface ShoppingItemPersistence
Parameters:
smallImageId - the small image ID
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 ShoppingItem fetchBySmallImageId(long smallImageId,
                                        boolean retrieveFromCache)
                                 throws SystemException
Returns the shopping item where smallImageId = ? or returns null if it could not be found, optionally using the finder cache.

Specified by:
fetchBySmallImageId in interface ShoppingItemPersistence
Parameters:
smallImageId - the small image ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

removeBySmallImageId

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

Specified by:
removeBySmallImageId in interface ShoppingItemPersistence
Parameters:
smallImageId - the small image ID
Returns:
the shopping item that was removed
Throws:
SystemException - if a system exception occurred
NoSuchItemException

countBySmallImageId

public int countBySmallImageId(long smallImageId)
                        throws SystemException
Returns the number of shopping items where smallImageId = ?.

Specified by:
countBySmallImageId in interface ShoppingItemPersistence
Parameters:
smallImageId - the small image ID
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

findByMediumImageId

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

Specified by:
findByMediumImageId in interface ShoppingItemPersistence
Parameters:
mediumImageId - the medium image ID
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByMediumImageId

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

Specified by:
fetchByMediumImageId in interface ShoppingItemPersistence
Parameters:
mediumImageId - the medium image ID
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 ShoppingItem fetchByMediumImageId(long mediumImageId,
                                         boolean retrieveFromCache)
                                  throws SystemException
Returns the shopping item where mediumImageId = ? or returns null if it could not be found, optionally using the finder cache.

Specified by:
fetchByMediumImageId in interface ShoppingItemPersistence
Parameters:
mediumImageId - the medium image ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

removeByMediumImageId

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

Specified by:
removeByMediumImageId in interface ShoppingItemPersistence
Parameters:
mediumImageId - the medium image ID
Returns:
the shopping item that was removed
Throws:
SystemException - if a system exception occurred
NoSuchItemException

countByMediumImageId

public int countByMediumImageId(long mediumImageId)
                         throws SystemException
Returns the number of shopping items where mediumImageId = ?.

Specified by:
countByMediumImageId in interface ShoppingItemPersistence
Parameters:
mediumImageId - the medium image ID
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

findByLargeImageId

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

Specified by:
findByLargeImageId in interface ShoppingItemPersistence
Parameters:
largeImageId - the large image ID
Returns:
the matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByLargeImageId

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

Specified by:
fetchByLargeImageId in interface ShoppingItemPersistence
Parameters:
largeImageId - the large image ID
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 ShoppingItem fetchByLargeImageId(long largeImageId,
                                        boolean retrieveFromCache)
                                 throws SystemException
Returns the shopping item where largeImageId = ? or returns null if it could not be found, optionally using the finder cache.

Specified by:
fetchByLargeImageId in interface ShoppingItemPersistence
Parameters:
largeImageId - the large image ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

removeByLargeImageId

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

Specified by:
removeByLargeImageId in interface ShoppingItemPersistence
Parameters:
largeImageId - the large image ID
Returns:
the shopping item that was removed
Throws:
SystemException - if a system exception occurred
NoSuchItemException

countByLargeImageId

public int countByLargeImageId(long largeImageId)
                        throws SystemException
Returns the number of shopping items where largeImageId = ?.

Specified by:
countByLargeImageId in interface ShoppingItemPersistence
Parameters:
largeImageId - the large image ID
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C

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

Specified by:
findByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
Returns:
the matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C

public List<ShoppingItem> findByG_C(long groupId,
                                    long categoryId,
                                    int start,
                                    int end)
                             throws SystemException
Returns 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. 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 ShoppingItemModelImpl. 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.

Specified by:
findByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
start - the lower bound of the range of shopping items
end - the upper bound of the range of shopping items (not inclusive)
Returns:
the range of matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C

public List<ShoppingItem> findByG_C(long groupId,
                                    long categoryId,
                                    int start,
                                    int end,
                                    OrderByComparator orderByComparator)
                             throws SystemException
Returns 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. 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 ShoppingItemModelImpl. 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.

Specified by:
findByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
start - the lower bound of the range of shopping items
end - the upper bound of the range of shopping items (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping items
Throws:
SystemException - if a system exception occurred

findByG_C_First

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

Specified by:
findByG_C_First in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByG_C_First

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

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

findByG_C_Last

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

Specified by:
findByG_C_Last in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching shopping item
Throws:
NoSuchItemException - if a matching shopping item could not be found
SystemException - if a system exception occurred

fetchByG_C_Last

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

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

findByG_C_PrevAndNext

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

Specified by:
findByG_C_PrevAndNext in interface ShoppingItemPersistence
Parameters:
itemId - the primary key of the current shopping item
groupId - the group ID
categoryId - the category ID
orderByComparator - the comparator to order the set by (optionally null)
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

getByG_C_PrevAndNext

protected ShoppingItem getByG_C_PrevAndNext(Session session,
                                            ShoppingItem shoppingItem,
                                            long groupId,
                                            long categoryId,
                                            OrderByComparator orderByComparator,
                                            boolean previous)

filterFindByG_C

public List<ShoppingItem> filterFindByG_C(long groupId,
                                          long categoryId)
                                   throws SystemException
Returns all the shopping items that the user has permission to view where groupId = ? and categoryId = ?.

Specified by:
filterFindByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
Returns:
the matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_C

public List<ShoppingItem> filterFindByG_C(long groupId,
                                          long categoryId,
                                          int start,
                                          int end)
                                   throws SystemException
Returns a range of all the shopping items that the user has permission to view 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. 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 ShoppingItemModelImpl. 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.

Specified by:
filterFindByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
start - the lower bound of the range of shopping items
end - the upper bound of the range of shopping items (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 List<ShoppingItem> filterFindByG_C(long groupId,
                                          long categoryId,
                                          int start,
                                          int end,
                                          OrderByComparator orderByComparator)
                                   throws SystemException
Returns an ordered range of all the shopping items that the user has permissions to view 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. 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 ShoppingItemModelImpl. 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.

Specified by:
filterFindByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
start - the lower bound of the range of shopping items
end - the upper bound of the range of shopping items (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByG_C_PrevAndNext

public ShoppingItem[] filterFindByG_C_PrevAndNext(long itemId,
                                                  long groupId,
                                                  long categoryId,
                                                  OrderByComparator orderByComparator)
                                           throws NoSuchItemException,
                                                  SystemException
Returns the shopping items before and after the current shopping item in the ordered set of shopping items that the user has permission to view where groupId = ? and categoryId = ?.

Specified by:
filterFindByG_C_PrevAndNext in interface ShoppingItemPersistence
Parameters:
itemId - the primary key of the current shopping item
groupId - the group ID
categoryId - the category ID
orderByComparator - the comparator to order the set by (optionally null)
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

filterGetByG_C_PrevAndNext

protected ShoppingItem filterGetByG_C_PrevAndNext(Session session,
                                                  ShoppingItem shoppingItem,
                                                  long groupId,
                                                  long categoryId,
                                                  OrderByComparator orderByComparator,
                                                  boolean previous)

removeByG_C

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

Specified by:
removeByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
Throws:
SystemException - if a system exception occurred

countByG_C

public int countByG_C(long groupId,
                      long categoryId)
               throws SystemException
Returns the number of shopping items where groupId = ? and categoryId = ?.

Specified by:
countByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

filterCountByG_C

public int filterCountByG_C(long groupId,
                            long categoryId)
                     throws SystemException
Returns the number of shopping items that the user has permission to view where groupId = ? and categoryId = ?.

Specified by:
filterCountByG_C in interface ShoppingItemPersistence
Parameters:
groupId - the group ID
categoryId - the category ID
Returns:
the number of matching shopping items that the user has permission to view
Throws:
SystemException - if a system exception occurred

findByC_S

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

Specified by:
findByC_S in interface ShoppingItemPersistence
Parameters:
companyId - the company ID
sku - the sku
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 ShoppingItem fetchByC_S(long companyId,
                               String sku)
                        throws SystemException
Returns the shopping item where companyId = ? and sku = ? or returns null if it could not be found. Uses the finder cache.

Specified by:
fetchByC_S in interface ShoppingItemPersistence
Parameters:
companyId - the company ID
sku - the sku
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 ShoppingItem fetchByC_S(long companyId,
                               String sku,
                               boolean retrieveFromCache)
                        throws SystemException
Returns the shopping item where companyId = ? and sku = ? or returns null if it could not be found, optionally using the finder cache.

Specified by:
fetchByC_S in interface ShoppingItemPersistence
Parameters:
companyId - the company ID
sku - the sku
retrieveFromCache - whether to use the finder cache
Returns:
the matching shopping item, or null if a matching shopping item could not be found
Throws:
SystemException - if a system exception occurred

removeByC_S

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

Specified by:
removeByC_S in interface ShoppingItemPersistence
Parameters:
companyId - the company ID
sku - the sku
Returns:
the shopping item that was removed
Throws:
SystemException - if a system exception occurred
NoSuchItemException

countByC_S

public int countByC_S(long companyId,
                      String sku)
               throws SystemException
Returns the number of shopping items where companyId = ? and sku = ?.

Specified by:
countByC_S in interface ShoppingItemPersistence
Parameters:
companyId - the company ID
sku - the sku
Returns:
the number of matching shopping items
Throws:
SystemException - if a system exception occurred

cacheResult

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

Specified by:
cacheResult in interface ShoppingItemPersistence
Parameters:
shoppingItem - the shopping item

cacheResult

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

Specified by:
cacheResult in interface ShoppingItemPersistence
Parameters:
shoppingItems - the shopping items

clearCache

public void clearCache()
Clears the cache for all shopping items.

The EntityCache and FinderCache are both cleared by this method.

Specified by:
clearCache in interface BasePersistence<ShoppingItem>
Overrides:
clearCache in class BasePersistenceImpl<ShoppingItem>

clearCache

public void clearCache(ShoppingItem shoppingItem)
Clears the cache for the shopping item.

The EntityCache and FinderCache are both cleared by this method.

Specified by:
clearCache in interface BasePersistence<ShoppingItem>
Overrides:
clearCache in class BasePersistenceImpl<ShoppingItem>
Parameters:
shoppingItem - the instance of this model to clear the cache for

clearCache

public void clearCache(List<ShoppingItem> shoppingItems)
Description copied from interface: BasePersistence
Clears the cache for a List instances of this model.

The EntityCache and FinderCache are both cleared by this method.

Specified by:
clearCache in interface BasePersistence<ShoppingItem>
Overrides:
clearCache in class BasePersistenceImpl<ShoppingItem>
Parameters:
shoppingItems - the List instances of this model to clear the cache for

cacheUniqueFindersCache

protected void cacheUniqueFindersCache(ShoppingItem shoppingItem)

clearUniqueFindersCache

protected void clearUniqueFindersCache(ShoppingItem shoppingItem)

create

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

Specified by:
create in interface ShoppingItemPersistence
Parameters:
itemId - the primary key for the new shopping item
Returns:
the new shopping item

remove

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

Specified by:
remove in interface ShoppingItemPersistence
Parameters:
itemId - the primary key of the shopping item
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

remove

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

Specified by:
remove in interface BasePersistence<ShoppingItem>
Overrides:
remove in class BasePersistenceImpl<ShoppingItem>
Parameters:
primaryKey - the primary key of the shopping item
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

removeImpl

protected ShoppingItem removeImpl(ShoppingItem shoppingItem)
                           throws SystemException
Description copied from class: BasePersistenceImpl
Removes the model instance from the database. BasePersistenceImpl.update(BaseModel, boolean) depends on this method to implement the remove operation; it only notifies the model listeners.

Overrides:
removeImpl in class BasePersistenceImpl<ShoppingItem>
Parameters:
shoppingItem - the model instance to remove
Returns:
the model instance that was removed
Throws:
SystemException - if a system exception occurred

updateImpl

public ShoppingItem updateImpl(ShoppingItem shoppingItem)
                        throws SystemException
Description copied from class: BasePersistenceImpl
Updates the model instance in the database or adds it if it does not yet exist. BasePersistenceImpl.remove(BaseModel) depends on this method to implement the update operation; it only notifies the model listeners.

Specified by:
updateImpl in interface ShoppingItemPersistence
Overrides:
updateImpl in class BasePersistenceImpl<ShoppingItem>
Parameters:
shoppingItem - the model instance to update
Returns:
the model instance that was updated
Throws:
SystemException - if a system exception occurred

toUnwrappedModel

protected ShoppingItem toUnwrappedModel(ShoppingItem shoppingItem)

findByPrimaryKey

public ShoppingItem findByPrimaryKey(Serializable primaryKey)
                              throws NoSuchItemException,
                                     SystemException
Returns the shopping item with the primary key or throws a NoSuchModelException if it could not be found.

Specified by:
findByPrimaryKey in interface BasePersistence<ShoppingItem>
Overrides:
findByPrimaryKey in class BasePersistenceImpl<ShoppingItem>
Parameters:
primaryKey - the primary key of the shopping item
Returns:
the shopping item
Throws:
NoSuchItemException - if a shopping item with the primary key could not be found
SystemException - if a system exception occurred

findByPrimaryKey

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

Specified by:
findByPrimaryKey in interface ShoppingItemPersistence
Parameters:
itemId - the primary key of the shopping item
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 ShoppingItem fetchByPrimaryKey(Serializable primaryKey)
                               throws SystemException
Returns the shopping item with the primary key or returns null if it could not be found.

Specified by:
fetchByPrimaryKey in interface BasePersistence<ShoppingItem>
Overrides:
fetchByPrimaryKey in class BasePersistenceImpl<ShoppingItem>
Parameters:
primaryKey - the primary key of the shopping item
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

fetchByPrimaryKey

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

Specified by:
fetchByPrimaryKey in interface ShoppingItemPersistence
Parameters:
itemId - the primary key of the shopping item
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

findAll

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

Specified by:
findAll in interface ShoppingItemPersistence
Returns:
the shopping items
Throws:
SystemException - if a system exception occurred

findAll

public List<ShoppingItem> findAll(int start,
                                  int end)
                           throws SystemException
Returns 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. 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 ShoppingItemModelImpl. 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.

Specified by:
findAll in interface ShoppingItemPersistence
Parameters:
start - the lower bound of the range of shopping items
end - the upper bound of the range of shopping items (not inclusive)
Returns:
the range of shopping items
Throws:
SystemException - if a system exception occurred

findAll

public List<ShoppingItem> findAll(int start,
                                  int end,
                                  OrderByComparator orderByComparator)
                           throws SystemException
Returns 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. 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 ShoppingItemModelImpl. 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.

Specified by:
findAll in interface ShoppingItemPersistence
Parameters:
start - the lower bound of the range of shopping items
end - the upper bound of the range of shopping items (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of shopping items
Throws:
SystemException - if a system exception occurred

removeAll

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

Specified by:
removeAll in interface ShoppingItemPersistence
Throws:
SystemException - if a system exception occurred

countAll

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

Specified by:
countAll in interface ShoppingItemPersistence
Returns:
the number of shopping items
Throws:
SystemException - if a system exception occurred

getBadColumnNames

protected Set<String> getBadColumnNames()
Overrides:
getBadColumnNames in class BasePersistenceImpl<ShoppingItem>

afterPropertiesSet

public void afterPropertiesSet()
Initializes the shopping item persistence.


destroy

public void destroy()

Liferay 6.2-ce-ga5