Liferay 6.1.2-ce-ga3

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

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

public class ShoppingOrderItemUtil
extends Object

The persistence utility for the shopping order item service. This utility wraps ShoppingOrderItemPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
ShoppingOrderItemPersistence, ShoppingOrderItemPersistenceImpl

Constructor Summary
ShoppingOrderItemUtil()
           
 
Method Summary
static void cacheResult(List<ShoppingOrderItem> shoppingOrderItems)
          Caches the shopping order items in the entity cache if it is enabled.
static void cacheResult(ShoppingOrderItem shoppingOrderItem)
          Caches the shopping order item in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ShoppingOrderItem shoppingOrderItem)
           
static int countAll()
          Returns the number of shopping order items.
static int countByOrderId(long orderId)
          Returns the number of shopping order items where orderId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ShoppingOrderItem create(long orderItemId)
          Creates a new shopping order item with the primary key.
static ShoppingOrderItem fetchByOrderId_First(long orderId, OrderByComparator orderByComparator)
          Returns the first shopping order item in the ordered set where orderId = ?.
static ShoppingOrderItem fetchByOrderId_Last(long orderId, OrderByComparator orderByComparator)
          Returns the last shopping order item in the ordered set where orderId = ?.
static ShoppingOrderItem fetchByPrimaryKey(long orderItemId)
          Returns the shopping order item with the primary key or returns null if it could not be found.
static List<ShoppingOrderItem> findAll()
          Returns all the shopping order items.
static List<ShoppingOrderItem> findAll(int start, int end)
          Returns a range of all the shopping order items.
static List<ShoppingOrderItem> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping order items.
static ShoppingOrderItem findByOrderId_First(long orderId, OrderByComparator orderByComparator)
          Returns the first shopping order item in the ordered set where orderId = ?.
static ShoppingOrderItem findByOrderId_Last(long orderId, OrderByComparator orderByComparator)
          Returns the last shopping order item in the ordered set where orderId = ?.
static ShoppingOrderItem[] findByOrderId_PrevAndNext(long orderItemId, long orderId, OrderByComparator orderByComparator)
          Returns the shopping order items before and after the current shopping order item in the ordered set where orderId = ?.
static List<ShoppingOrderItem> findByOrderId(long orderId)
          Returns all the shopping order items where orderId = ?.
static List<ShoppingOrderItem> findByOrderId(long orderId, int start, int end)
          Returns a range of all the shopping order items where orderId = ?.
static List<ShoppingOrderItem> findByOrderId(long orderId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the shopping order items where orderId = ?.
static ShoppingOrderItem findByPrimaryKey(long orderItemId)
          Returns the shopping order item with the primary key or throws a NoSuchOrderItemException if it could not be found.
static List<ShoppingOrderItem> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ShoppingOrderItem> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ShoppingOrderItem> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ShoppingOrderItemPersistence getPersistence()
           
static ShoppingOrderItem remove(long orderItemId)
          Removes the shopping order item with the primary key from the database.
static void removeAll()
          Removes all the shopping order items from the database.
static void removeByOrderId(long orderId)
          Removes all the shopping order items where orderId = ? from the database.
 void setPersistence(ShoppingOrderItemPersistence persistence)
          Deprecated.  
static ShoppingOrderItem update(ShoppingOrderItem shoppingOrderItem, boolean merge)
           
static ShoppingOrderItem update(ShoppingOrderItem shoppingOrderItem, boolean merge, ServiceContext serviceContext)
           
static ShoppingOrderItem updateImpl(ShoppingOrderItem shoppingOrderItem, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingOrderItemUtil

public ShoppingOrderItemUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

cacheResult

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

Parameters:
shoppingOrderItem - the shopping order item

cacheResult

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

Parameters:
shoppingOrderItems - the shopping order items

create

public static 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

public static 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
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

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

findByPrimaryKey

public static ShoppingOrderItem findByPrimaryKey(long orderItemId)
                                          throws SystemException,
                                                 NoSuchOrderItemException
Returns 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
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

public static ShoppingOrderItem fetchByPrimaryKey(long orderItemId)
                                           throws SystemException
Returns 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
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

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

Parameters:
orderId - the order ID
Returns:
the matching shopping order items
Throws:
SystemException - if a system exception occurred

findByOrderId

public static List<ShoppingOrderItem> findByOrderId(long orderId,
                                                    int start,
                                                    int end)
                                             throws SystemException
Returns 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
start - the lower bound of the range of shopping order items
end - the upper bound of the range of shopping order items (not inclusive)
Returns:
the range of matching shopping order items
Throws:
SystemException - if a system exception occurred

findByOrderId

public static List<ShoppingOrderItem> findByOrderId(long orderId,
                                                    int start,
                                                    int end,
                                                    OrderByComparator orderByComparator)
                                             throws SystemException
Returns 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
start - the lower bound of the range of shopping order items
end - the upper bound of the range of shopping order items (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching shopping order items
Throws:
SystemException - if a system exception occurred

findByOrderId_First

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

Parameters:
orderId - the order ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByOrderId_First

public static ShoppingOrderItem fetchByOrderId_First(long orderId,
                                                     OrderByComparator orderByComparator)
                                              throws SystemException
Returns the first shopping order item in the ordered set where orderId = ?.

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

findByOrderId_Last

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

Parameters:
orderId - the order ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByOrderId_Last

public static ShoppingOrderItem fetchByOrderId_Last(long orderId,
                                                    OrderByComparator orderByComparator)
                                             throws SystemException
Returns the last shopping order item in the ordered set where orderId = ?.

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

findByOrderId_PrevAndNext

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

Parameters:
orderItemId - the primary key of the current shopping order item
orderId - the order ID
orderByComparator - the comparator to order the set by (optionally null)
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

public static List<ShoppingOrderItem> findAll()
                                       throws SystemException
Returns all the shopping order items.

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

findAll

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

findAll

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

removeByOrderId

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

Parameters:
orderId - the order ID
Throws:
SystemException - if a system exception occurred

removeAll

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

Throws:
SystemException - if a system exception occurred

countByOrderId

public static int countByOrderId(long orderId)
                          throws SystemException
Returns the number of shopping order items where orderId = ?.

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

countAll

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

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

getPersistence

public static ShoppingOrderItemPersistence getPersistence()

setPersistence

public void setPersistence(ShoppingOrderItemPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3