@ProviderType
public class ShoppingItemLocalServiceUtil
extends java.lang.Object
com.liferay.portlet.shopping.service.impl.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.ShoppingItemLocalService,
com.liferay.portlet.shopping.service.base.ShoppingItemLocalServiceBaseImpl,
com.liferay.portlet.shopping.service.impl.ShoppingItemLocalServiceImpl| Constructor and Description |
|---|
ShoppingItemLocalServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ShoppingItem |
addItem(long userId,
long groupId,
long categoryId,
java.lang.String sku,
java.lang.String name,
java.lang.String description,
java.lang.String properties,
java.lang.String fieldsQuantities,
boolean requiresShipping,
int stockQuantity,
boolean featured,
java.lang.Boolean sale,
boolean smallImage,
java.lang.String smallImageURL,
java.io.File smallImageFile,
boolean mediumImage,
java.lang.String mediumImageURL,
java.io.File mediumImageFile,
boolean largeImage,
java.lang.String largeImageURL,
java.io.File largeImageFile,
java.util.List<ShoppingItemField> itemFields,
java.util.List<ShoppingItemPrice> itemPrices,
ServiceContext serviceContext) |
static void |
addItemResources(long itemId,
boolean addGroupPermissions,
boolean addGuestPermissions) |
static void |
addItemResources(long itemId,
ModelPermissions modelPermissions) |
static void |
addItemResources(ShoppingItem item,
boolean addGroupPermissions,
boolean addGuestPermissions) |
static void |
addItemResources(ShoppingItem item,
ModelPermissions modelPermissions) |
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> java.util.List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> java.util.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> java.util.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 java.lang.String |
getBeanIdentifier()
Returns the Spring bean ID for this bean.
|
static int |
getCategoriesItemsCount(long groupId,
java.util.List<java.lang.Long> categoryIds) |
static java.util.List<ShoppingItem> |
getFeaturedItems(long groupId,
long categoryId,
int numOfItems) |
static ShoppingItem |
getItem(long itemId) |
static ShoppingItem |
getItem(long companyId,
java.lang.String sku) |
static ShoppingItem |
getItemByLargeImageId(long largeImageId) |
static ShoppingItem |
getItemByMediumImageId(long mediumImageId) |
static ShoppingItem |
getItemBySmallImageId(long smallImageId) |
static java.util.List<ShoppingItem> |
getItems(long groupId,
long categoryId) |
static java.util.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(java.io.Serializable primaryKeyObj) |
static java.util.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 java.util.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 java.util.List<ShoppingItem> |
search(long groupId,
long[] categoryIds,
java.lang.String keywords,
int start,
int end) |
static int |
searchCount(long groupId,
long[] categoryIds,
java.lang.String keywords) |
static void |
setBeanIdentifier(java.lang.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,
java.lang.String sku,
java.lang.String name,
java.lang.String description,
java.lang.String properties,
java.lang.String fieldsQuantities,
boolean requiresShipping,
int stockQuantity,
boolean featured,
java.lang.Boolean sale,
boolean smallImage,
java.lang.String smallImageURL,
java.io.File smallImageFile,
boolean mediumImage,
java.lang.String mediumImageURL,
java.io.File mediumImageFile,
boolean largeImage,
java.lang.String largeImageURL,
java.io.File largeImageFile,
java.util.List<ShoppingItemField> itemFields,
java.util.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.
|
public static ShoppingItem addItem(long userId, long groupId, long categoryId, java.lang.String sku, java.lang.String name, java.lang.String description, java.lang.String properties, java.lang.String fieldsQuantities, boolean requiresShipping, int stockQuantity, boolean featured, java.lang.Boolean sale, boolean smallImage, java.lang.String smallImageURL, java.io.File smallImageFile, boolean mediumImage, java.lang.String mediumImageURL, java.io.File mediumImageFile, boolean largeImage, java.lang.String largeImageURL, java.io.File largeImageFile, java.util.List<ShoppingItemField> itemFields, java.util.List<ShoppingItemPrice> itemPrices, ServiceContext serviceContext) throws PortalException
PortalExceptionpublic static void addItemResources(ShoppingItem item, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException
PortalExceptionpublic static void addItemResources(ShoppingItem item, ModelPermissions modelPermissions) throws PortalException
PortalExceptionpublic static void addItemResources(long itemId,
boolean addGroupPermissions,
boolean addGuestPermissions)
throws PortalException
PortalExceptionpublic static void addItemResources(long itemId,
ModelPermissions modelPermissions)
throws PortalException
PortalExceptionpublic static ShoppingItem addShoppingItem(ShoppingItem shoppingItem)
shoppingItem - the shopping itempublic static ShoppingItem createShoppingItem(long itemId)
itemId - the primary key for the new shopping itempublic static void deleteItem(ShoppingItem item) throws PortalException
PortalExceptionpublic static void deleteItem(long itemId)
throws PortalException
PortalExceptionpublic static void deleteItems(long groupId,
long categoryId)
throws PortalException
PortalExceptionpublic static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalExceptionpublic static ShoppingItem deleteShoppingItem(long itemId) throws PortalException
itemId - the primary key of the shopping itemPortalException - if a shopping item with the primary key could not be foundpublic static ShoppingItem deleteShoppingItem(ShoppingItem shoppingItem)
shoppingItem - the shopping itempublic static DynamicQuery dynamicQuery()
public static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery - the dynamic querypublic static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
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 com.liferay.portlet.shopping.model.impl.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.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)public static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
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 com.liferay.portlet.shopping.model.impl.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.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)orderByComparator - the comparator to order the results by (optionally null)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery - the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery - the dynamic queryprojection - the projection to apply to the querypublic static ShoppingItem fetchShoppingItem(long itemId)
public static ActionableDynamicQuery getActionableDynamicQuery()
public static java.lang.String getBeanIdentifier()
public static int getCategoriesItemsCount(long groupId,
java.util.List<java.lang.Long> categoryIds)
public static java.util.List<ShoppingItem> getFeaturedItems(long groupId, long categoryId, int numOfItems)
public static ShoppingItem getItem(long companyId, java.lang.String sku) throws PortalException
PortalExceptionpublic static ShoppingItem getItem(long itemId) throws PortalException
PortalExceptionpublic static ShoppingItem getItemByLargeImageId(long largeImageId) throws PortalException
PortalExceptionpublic static ShoppingItem getItemByMediumImageId(long mediumImageId) throws PortalException
PortalExceptionpublic static ShoppingItem getItemBySmallImageId(long smallImageId) throws PortalException
PortalExceptionpublic static java.util.List<ShoppingItem> getItems(long groupId, long categoryId)
public static java.util.List<ShoppingItem> getItems(long groupId, long categoryId, int start, int end, OrderByComparator<ShoppingItem> obc)
public static int getItemsCount(long groupId,
long categoryId)
public static ShoppingItem[] getItemsPrevAndNext(long itemId, OrderByComparator<ShoppingItem> obc) throws PortalException
PortalExceptionpublic static PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws PortalException
PortalExceptionpublic static java.util.List<ShoppingItem> getSaleItems(long groupId, long categoryId, int numOfItems)
public static ShoppingItem getShoppingItem(long itemId) throws PortalException
itemId - the primary key of the shopping itemPortalException - if a shopping item with the primary key could not be foundpublic static java.util.List<ShoppingItem> getShoppingItems(int start, int end)
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 com.liferay.portlet.shopping.model.impl.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.
start - the lower bound of the range of shopping itemsend - the upper bound of the range of shopping items (not inclusive)public static int getShoppingItemsCount()
public static java.util.List<ShoppingItem> search(long groupId, long[] categoryIds, java.lang.String keywords, int start, int end)
public static int searchCount(long groupId,
long[] categoryIds,
java.lang.String keywords)
public static void setBeanIdentifier(java.lang.String beanIdentifier)
beanIdentifier - the Spring bean ID for this beanpublic static ShoppingItem updateItem(long userId, long itemId, long groupId, long categoryId, java.lang.String sku, java.lang.String name, java.lang.String description, java.lang.String properties, java.lang.String fieldsQuantities, boolean requiresShipping, int stockQuantity, boolean featured, java.lang.Boolean sale, boolean smallImage, java.lang.String smallImageURL, java.io.File smallImageFile, boolean mediumImage, java.lang.String mediumImageURL, java.io.File mediumImageFile, boolean largeImage, java.lang.String largeImageURL, java.io.File largeImageFile, java.util.List<ShoppingItemField> itemFields, java.util.List<ShoppingItemPrice> itemPrices, ServiceContext serviceContext) throws PortalException
PortalExceptionpublic static ShoppingItem updateShoppingItem(ShoppingItem shoppingItem)
shoppingItem - the shopping itempublic static ShoppingItemLocalService getService()
@Deprecated public void setService(ShoppingItemLocalService service)