Liferay 6.0.5

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

All Superinterfaces:
BasePersistence<ShoppingOrderItem>
All Known Implementing Classes:
ShoppingOrderItemPersistenceImpl

public interface ShoppingOrderItemPersistence
extends BasePersistence<ShoppingOrderItem>

The persistence interface for the shopping order item service.

Never modify or reference this interface directly. Always use ShoppingOrderItemUtil to access the shopping order item persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface.

Caching information and settings can be found in portal.properties

See Also:
ShoppingOrderItemPersistenceImpl, ShoppingOrderItemUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Method Summary
 void cacheResult(List<ShoppingOrderItem> shoppingOrderItems)
          Caches the shopping order items in the entity cache if it is enabled.
 void cacheResult(ShoppingOrderItem shoppingOrderItem)
          Caches the shopping order item in the entity cache if it is enabled.
 int countAll()
          Counts all the shopping order items.
 int countByOrderId(long orderId)
          Counts all the shopping order items where orderId = ?.
 ShoppingOrderItem create(long orderItemId)
          Creates a new shopping order item with the primary key.
 ShoppingOrderItem fetchByPrimaryKey(long orderItemId)
          Finds the shopping order item with the primary key or returns null if it could not be found.
 List<ShoppingOrderItem> findAll()
          Finds all the shopping order items.
 List<ShoppingOrderItem> findAll(int start, int end)
          Finds a range of all the shopping order items.
 List<ShoppingOrderItem> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the shopping order items.
 ShoppingOrderItem findByOrderId_First(long orderId, OrderByComparator orderByComparator)
          Finds the first shopping order item in the ordered set where orderId = ?.
 ShoppingOrderItem findByOrderId_Last(long orderId, OrderByComparator orderByComparator)
          Finds the last shopping order item in the ordered set where orderId = ?.
 ShoppingOrderItem[] findByOrderId_PrevAndNext(long orderItemId, long orderId, OrderByComparator orderByComparator)
          Finds the shopping order items before and after the current shopping order item in the ordered set where orderId = ?.
 List<ShoppingOrderItem> findByOrderId(long orderId)
          Finds all the shopping order items where orderId = ?.
 List<ShoppingOrderItem> findByOrderId(long orderId, int start, int end)
          Finds a range of all the shopping order items where orderId = ?.
 List<ShoppingOrderItem> findByOrderId(long orderId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the shopping order items where orderId = ?.
 ShoppingOrderItem findByPrimaryKey(long orderItemId)
          Finds the shopping order item with the primary key or throws a NoSuchOrderItemException if it could not be found.
 ShoppingOrderItem remove(long orderItemId)
          Removes the shopping order item with the primary key from the database.
 void removeAll()
          Removes all the shopping order items from the database.
 void removeByOrderId(long orderId)
          Removes all the shopping order items where orderId = ? from the database.
 ShoppingOrderItem updateImpl(ShoppingOrderItem shoppingOrderItem, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(ShoppingOrderItem shoppingOrderItem)
Caches the shopping order item in the entity cache if it is enabled.

Parameters:
shoppingOrderItem - the shopping order item to cache

cacheResult

void cacheResult(List<ShoppingOrderItem> shoppingOrderItems)
Caches the shopping order items in the entity cache if it is enabled.

Parameters:
shoppingOrderItems - the shopping order items to cache

create

ShoppingOrderItem create(long orderItemId)
Creates a new shopping order item with the primary key. Does not add the shopping order item to the database.

Parameters:
orderItemId - the primary key for the new shopping order item
Returns:
the new shopping order item

remove

ShoppingOrderItem remove(long orderItemId)
                         throws SystemException,
                                NoSuchOrderItemException
Removes the shopping order item with the primary key from the database. Also notifies the appropriate model listeners.

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

updateImpl

ShoppingOrderItem updateImpl(ShoppingOrderItem shoppingOrderItem,
                             boolean merge)
                             throws SystemException
Throws:
SystemException

findByPrimaryKey

ShoppingOrderItem findByPrimaryKey(long orderItemId)
                                   throws SystemException,
                                          NoSuchOrderItemException
Finds the shopping order item with the primary key or throws a NoSuchOrderItemException if it could not be found.

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

fetchByPrimaryKey

ShoppingOrderItem fetchByPrimaryKey(long orderItemId)
                                    throws SystemException
Finds the shopping order item with the primary key or returns null if it could not be found.

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

findByOrderId

List<ShoppingOrderItem> findByOrderId(long orderId)
                                      throws SystemException
Finds all the shopping order items where orderId = ?.

Parameters:
orderId - the order id to search with
Returns:
the matching shopping order items
Throws:
SystemException - if a system exception occurred

findByOrderId

List<ShoppingOrderItem> findByOrderId(long orderId,
                                      int start,
                                      int end)
                                      throws SystemException
Finds a range of all the shopping order items where orderId = ?.

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

findByOrderId

List<ShoppingOrderItem> findByOrderId(long orderId,
                                      int start,
                                      int end,
                                      OrderByComparator orderByComparator)
                                      throws SystemException
Finds an ordered range of all the shopping order items where orderId = ?.

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

findByOrderId_First

ShoppingOrderItem findByOrderId_First(long orderId,
                                      OrderByComparator orderByComparator)
                                      throws SystemException,
                                             NoSuchOrderItemException
Finds the first shopping order item in the ordered set where orderId = ?.

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

findByOrderId_Last

ShoppingOrderItem findByOrderId_Last(long orderId,
                                     OrderByComparator orderByComparator)
                                     throws SystemException,
                                            NoSuchOrderItemException
Finds the last shopping order item in the ordered set where orderId = ?.

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

findByOrderId_PrevAndNext

ShoppingOrderItem[] findByOrderId_PrevAndNext(long orderItemId,
                                              long orderId,
                                              OrderByComparator orderByComparator)
                                              throws SystemException,
                                                     NoSuchOrderItemException
Finds the shopping order items before and after the current shopping order item in the ordered set where orderId = ?.

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

findAll

List<ShoppingOrderItem> findAll()
                                throws SystemException
Finds all the shopping order items.

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

findAll

List<ShoppingOrderItem> findAll(int start,
                                int end)
                                throws SystemException
Finds a range of all the shopping order 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 order items to return
end - the upper bound of the range of shopping order items to return (not inclusive)
Returns:
the range of shopping order items
Throws:
SystemException - if a system exception occurred

findAll

List<ShoppingOrderItem> findAll(int start,
                                int end,
                                OrderByComparator orderByComparator)
                                throws SystemException
Finds an ordered range of all the shopping order 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 order items to return
end - the upper bound of the range of shopping order items to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of shopping order items
Throws:
SystemException - if a system exception occurred

removeByOrderId

void removeByOrderId(long orderId)
                     throws SystemException
Removes all the shopping order items where orderId = ? from the database.

Parameters:
orderId - the order id to search with
Throws:
SystemException - if a system exception occurred

removeAll

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

Throws:
SystemException - if a system exception occurred

countByOrderId

int countByOrderId(long orderId)
                   throws SystemException
Counts all the shopping order items where orderId = ?.

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

countAll

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

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

Liferay 6.0.5