Liferay 7.0-ce-m6

com.liferay.portlet.shopping.service
Class ShoppingItemLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.shopping.service.ShoppingItemLocalServiceUtil

@ProviderType
public class ShoppingItemLocalServiceUtil
extends Object

Provides the local service utility for ShoppingItem. This utility wraps ShoppingItemLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.

See Also:
ShoppingItemLocalService, ShoppingItemLocalServiceBaseImpl, ShoppingItemLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
ShoppingItemLocalServiceUtil()
           
 
Method Summary
static ShoppingItem addItem(long userId, long groupId, long categoryId, String sku, String name, String description, String properties, String fieldsQuantities, boolean requiresShipping, int stockQuantity, boolean featured, Boolean sale, boolean smallImage, String smallImageURL, File smallImageFile, boolean mediumImage, String mediumImageURL, File mediumImageFile, boolean largeImage, String largeImageURL, File largeImageFile, List<ShoppingItemField> itemFields, List<ShoppingItemPrice> itemPrices, ServiceContext serviceContext)
           
static void addItemResources(long itemId, boolean addGroupPermissions, boolean addGuestPermissions)
           
static void addItemResources(long itemId, String[] groupPermissions, String[] guestPermissions)
           
static void addItemResources(ShoppingItem item, boolean addGroupPermissions, boolean addGuestPermissions)
           
static void addItemResources(ShoppingItem item, String[] groupPermissions, String[] guestPermissions)
           
static ShoppingItem addShoppingItem(ShoppingItem shoppingItem)
          Adds the shopping item to the database.
static ShoppingItem createShoppingItem(long itemId)
          Creates a new shopping item with the primary key.
static void deleteItem(long itemId)
           
static void deleteItem(ShoppingItem item)
           
static void deleteItems(long groupId, long categoryId)
           
static PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
static ShoppingItem deleteShoppingItem(long itemId)
          Deletes the shopping item with the primary key from the database.
static ShoppingItem deleteShoppingItem(ShoppingItem shoppingItem)
          Deletes the shopping item from the database.
static DynamicQuery dynamicQuery()
           
static
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
static long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows matching the dynamic query.
static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows matching the dynamic query.
static ShoppingItem fetchShoppingItem(long itemId)
           
static ActionableDynamicQuery getActionableDynamicQuery()
           
static String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
static int getCategoriesItemsCount(long groupId, List<Long> categoryIds)
           
static List<ShoppingItem> getFeaturedItems(long groupId, long categoryId, int numOfItems)
           
static ShoppingItem getItem(long itemId)
           
static ShoppingItem getItem(long companyId, String sku)
           
static ShoppingItem getItemByLargeImageId(long largeImageId)
           
static ShoppingItem getItemByMediumImageId(long mediumImageId)
           
static ShoppingItem getItemBySmallImageId(long smallImageId)
           
static List<ShoppingItem> getItems(long groupId, long categoryId)
           
static List<ShoppingItem> getItems(long groupId, long categoryId, int start, int end, OrderByComparator<ShoppingItem> obc)
           
static int getItemsCount(long groupId, long categoryId)
           
static ShoppingItem[] getItemsPrevAndNext(long itemId, OrderByComparator<ShoppingItem> obc)
           
static PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
static List<ShoppingItem> getSaleItems(long groupId, long categoryId, int numOfItems)
           
static ShoppingItemLocalService getService()
           
static ShoppingItem getShoppingItem(long itemId)
          Returns the shopping item with the primary key.
static List<ShoppingItem> getShoppingItems(int start, int end)
          Returns a range of all the shopping items.
static int getShoppingItemsCount()
          Returns the number of shopping items.
static List<ShoppingItem> search(long groupId, long[] categoryIds, String keywords, int start, int end)
           
static int searchCount(long groupId, long[] categoryIds, String keywords)
           
static void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setService(ShoppingItemLocalService service)
          Deprecated. As of 6.2.0
static ShoppingItem updateItem(long userId, long itemId, long groupId, long categoryId, String sku, String name, String description, String properties, String fieldsQuantities, boolean requiresShipping, int stockQuantity, boolean featured, Boolean sale, boolean smallImage, String smallImageURL, File smallImageFile, boolean mediumImage, String mediumImageURL, File mediumImageFile, boolean largeImage, String largeImageURL, File largeImageFile, List<ShoppingItemField> itemFields, List<ShoppingItemPrice> itemPrices, ServiceContext serviceContext)
           
static ShoppingItem updateShoppingItem(ShoppingItem shoppingItem)
          Updates the shopping item in the database or adds it if it does not yet exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingItemLocalServiceUtil

public ShoppingItemLocalServiceUtil()
Method Detail

addItem

public static ShoppingItem addItem(long userId,
                                   long groupId,
                                   long categoryId,
                                   String sku,
                                   String name,
                                   String description,
                                   String properties,
                                   String fieldsQuantities,
                                   boolean requiresShipping,
                                   int stockQuantity,
                                   boolean featured,
                                   Boolean sale,
                                   boolean smallImage,
                                   String smallImageURL,
                                   File smallImageFile,
                                   boolean mediumImage,
                                   String mediumImageURL,
                                   File mediumImageFile,
                                   boolean largeImage,
                                   String largeImageURL,
                                   File largeImageFile,
                                   List<ShoppingItemField> itemFields,
                                   List<ShoppingItemPrice> itemPrices,
                                   ServiceContext serviceContext)
                            throws PortalException
Throws:
PortalException

addItemResources

public static void addItemResources(ShoppingItem item,
                                    boolean addGroupPermissions,
                                    boolean addGuestPermissions)
                             throws PortalException
Throws:
PortalException

addItemResources

public static void addItemResources(ShoppingItem item,
                                    String[] groupPermissions,
                                    String[] guestPermissions)
                             throws PortalException
Throws:
PortalException

addItemResources

public static void addItemResources(long itemId,
                                    boolean addGroupPermissions,
                                    boolean addGuestPermissions)
                             throws PortalException
Throws:
PortalException

addItemResources

public static void addItemResources(long itemId,
                                    String[] groupPermissions,
                                    String[] guestPermissions)
                             throws PortalException
Throws:
PortalException

addShoppingItem

public static ShoppingItem addShoppingItem(ShoppingItem shoppingItem)
Adds the shopping item to the database. Also notifies the appropriate model listeners.

Parameters:
shoppingItem - the shopping item
Returns:
the shopping item that was added

createShoppingItem

public static ShoppingItem createShoppingItem(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

deleteItem

public static void deleteItem(ShoppingItem item)
                       throws PortalException
Throws:
PortalException

deleteItem

public static void deleteItem(long itemId)
                       throws PortalException
Throws:
PortalException

deleteItems

public static void deleteItems(long groupId,
                               long categoryId)
                        throws PortalException
Throws:
PortalException

deletePersistedModel

public static PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                           throws PortalException
Throws:
PortalException

deleteShoppingItem

public static ShoppingItem deleteShoppingItem(long itemId)
                                       throws PortalException
Deletes 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
Returns:
the shopping item that was removed
Throws:
PortalException - if a shopping item with the primary key could not be found

deleteShoppingItem

public static ShoppingItem deleteShoppingItem(ShoppingItem shoppingItem)
Deletes the shopping item from the database. Also notifies the appropriate model listeners.

Parameters:
shoppingItem - the shopping item
Returns:
the shopping item that was removed

dynamicQuery

public static DynamicQuery dynamicQuery()

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery,
                                       int start,
                                       int end)
Performs a dynamic query on the database and returns a range of the matching rows.

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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
Returns:
the range of matching rows

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery,
                                       int start,
                                       int end,
                                       OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.

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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows matching the dynamic query

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery,
                                     Projection projection)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows matching the dynamic query

fetchShoppingItem

public static ShoppingItem fetchShoppingItem(long itemId)

getActionableDynamicQuery

public static ActionableDynamicQuery getActionableDynamicQuery()

getBeanIdentifier

public static String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

getCategoriesItemsCount

public static int getCategoriesItemsCount(long groupId,
                                          List<Long> categoryIds)

getFeaturedItems

public static List<ShoppingItem> getFeaturedItems(long groupId,
                                                  long categoryId,
                                                  int numOfItems)

getItem

public static ShoppingItem getItem(long companyId,
                                   String sku)
                            throws PortalException
Throws:
PortalException

getItem

public static ShoppingItem getItem(long itemId)
                            throws PortalException
Throws:
PortalException

getItemByLargeImageId

public static ShoppingItem getItemByLargeImageId(long largeImageId)
                                          throws PortalException
Throws:
PortalException

getItemByMediumImageId

public static ShoppingItem getItemByMediumImageId(long mediumImageId)
                                           throws PortalException
Throws:
PortalException

getItemBySmallImageId

public static ShoppingItem getItemBySmallImageId(long smallImageId)
                                          throws PortalException
Throws:
PortalException

getItems

public static List<ShoppingItem> getItems(long groupId,
                                          long categoryId)

getItems

public static List<ShoppingItem> getItems(long groupId,
                                          long categoryId,
                                          int start,
                                          int end,
                                          OrderByComparator<ShoppingItem> obc)

getItemsCount

public static int getItemsCount(long groupId,
                                long categoryId)

getItemsPrevAndNext

public static ShoppingItem[] getItemsPrevAndNext(long itemId,
                                                 OrderByComparator<ShoppingItem> obc)
                                          throws PortalException
Throws:
PortalException

getPersistedModel

public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                        throws PortalException
Throws:
PortalException

getSaleItems

public static List<ShoppingItem> getSaleItems(long groupId,
                                              long categoryId,
                                              int numOfItems)

getShoppingItem

public static ShoppingItem getShoppingItem(long itemId)
                                    throws PortalException
Returns the shopping item with the primary key.

Parameters:
itemId - the primary key of the shopping item
Returns:
the shopping item
Throws:
PortalException - if a shopping item with the primary key could not be found

getShoppingItems

public static List<ShoppingItem> getShoppingItems(int start,
                                                  int end)
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.

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

getShoppingItemsCount

public static int getShoppingItemsCount()
Returns the number of shopping items.

Returns:
the number of shopping items

search

public static List<ShoppingItem> search(long groupId,
                                        long[] categoryIds,
                                        String keywords,
                                        int start,
                                        int end)

searchCount

public static int searchCount(long groupId,
                              long[] categoryIds,
                              String keywords)

setBeanIdentifier

public static void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

updateItem

public static ShoppingItem updateItem(long userId,
                                      long itemId,
                                      long groupId,
                                      long categoryId,
                                      String sku,
                                      String name,
                                      String description,
                                      String properties,
                                      String fieldsQuantities,
                                      boolean requiresShipping,
                                      int stockQuantity,
                                      boolean featured,
                                      Boolean sale,
                                      boolean smallImage,
                                      String smallImageURL,
                                      File smallImageFile,
                                      boolean mediumImage,
                                      String mediumImageURL,
                                      File mediumImageFile,
                                      boolean largeImage,
                                      String largeImageURL,
                                      File largeImageFile,
                                      List<ShoppingItemField> itemFields,
                                      List<ShoppingItemPrice> itemPrices,
                                      ServiceContext serviceContext)
                               throws PortalException
Throws:
PortalException

updateShoppingItem

public static ShoppingItem updateShoppingItem(ShoppingItem shoppingItem)
Updates the shopping item in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
shoppingItem - the shopping item
Returns:
the shopping item that was updated

getService

public static ShoppingItemLocalService getService()

setService

@Deprecated
public void setService(ShoppingItemLocalService service)
Deprecated. As of 6.2.0


Liferay 7.0-ce-m6