Liferay 7.0-ce-m3

com.liferay.portlet.shopping.service
Interface ShoppingItemLocalService

All Superinterfaces:
BaseLocalService, PersistedModelLocalService
All Known Implementing Classes:
ShoppingItemLocalServiceBaseImpl, ShoppingItemLocalServiceImpl, ShoppingItemLocalServiceWrapper

@ProviderType
@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface ShoppingItemLocalService
extends BaseLocalService, PersistedModelLocalService

Provides the local service interface for ShoppingItem. 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:
ShoppingItemLocalServiceUtil, ShoppingItemLocalServiceBaseImpl, ShoppingItemLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Method Summary
 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)
           
 void addItemResources(long itemId, boolean addGroupPermissions, boolean addGuestPermissions)
           
 void addItemResources(long itemId, String[] groupPermissions, String[] guestPermissions)
           
 void addItemResources(ShoppingItem item, boolean addGroupPermissions, boolean addGuestPermissions)
           
 void addItemResources(ShoppingItem item, String[] groupPermissions, String[] guestPermissions)
           
 ShoppingItem addShoppingItem(ShoppingItem shoppingItem)
          Adds the shopping item to the database.
 ShoppingItem createShoppingItem(long itemId)
          Creates a new shopping item with the primary key.
 void deleteItem(long itemId)
           
 void deleteItem(ShoppingItem item)
           
 void deleteItems(long groupId, long categoryId)
           
 PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
 ShoppingItem deleteShoppingItem(long itemId)
          Deletes the shopping item with the primary key from the database.
 ShoppingItem deleteShoppingItem(ShoppingItem shoppingItem)
          Deletes the shopping item from the database.
 DynamicQuery dynamicQuery()
           
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
<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.
<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.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows matching the dynamic query.
 long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows matching the dynamic query.
 ShoppingItem fetchShoppingItem(long itemId)
           
 ActionableDynamicQuery getActionableDynamicQuery()
           
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 int getCategoriesItemsCount(long groupId, List<Long> categoryIds)
           
 List<ShoppingItem> getFeaturedItems(long groupId, long categoryId, int numOfItems)
           
 ShoppingItem getItem(long itemId)
           
 ShoppingItem getItem(long companyId, String sku)
           
 ShoppingItem getItemByLargeImageId(long largeImageId)
           
 ShoppingItem getItemByMediumImageId(long mediumImageId)
           
 ShoppingItem getItemBySmallImageId(long smallImageId)
           
 List<ShoppingItem> getItems(long groupId, long categoryId)
           
 List<ShoppingItem> getItems(long groupId, long categoryId, int start, int end, OrderByComparator<ShoppingItem> obc)
           
 int getItemsCount(long groupId, long categoryId)
           
 ShoppingItem[] getItemsPrevAndNext(long itemId, OrderByComparator<ShoppingItem> obc)
           
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 List<ShoppingItem> getSaleItems(long groupId, long categoryId, int numOfItems)
           
 ShoppingItem getShoppingItem(long itemId)
          Returns the shopping item with the primary key.
 List<ShoppingItem> getShoppingItems(int start, int end)
          Returns a range of all the shopping items.
 int getShoppingItemsCount()
          Returns the number of shopping items.
 List<ShoppingItem> search(long groupId, long[] categoryIds, String keywords, int start, int end)
           
 int searchCount(long groupId, long[] categoryIds, String keywords)
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 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)
           
 ShoppingItem updateShoppingItem(ShoppingItem shoppingItem)
          Updates the shopping item in the database or adds it if it does not yet exist.
 

Method Detail

addItem

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

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

addItemResources

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

addItemResources

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

addItemResources

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

addShoppingItem

@Indexable(type=REINDEX)
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

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

void deleteItem(ShoppingItem item)
                throws PortalException
Throws:
PortalException

deleteItem

void deleteItem(long itemId)
                throws PortalException
Throws:
PortalException

deleteItems

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

deletePersistedModel

PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                    throws PortalException
Specified by:
deletePersistedModel in interface PersistedModelLocalService
Throws:
PortalException

deleteShoppingItem

@Indexable(type=DELETE)
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

@Indexable(type=DELETE)
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

DynamicQuery dynamicQuery()

dynamicQuery

<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

<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

<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

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

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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem fetchShoppingItem(long itemId)

getActionableDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ActionableDynamicQuery getActionableDynamicQuery()

getBeanIdentifier

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

Returns:
the Spring bean ID for this bean

getCategoriesItemsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCategoriesItemsCount(long groupId,
                                                                     List<Long> categoryIds)

getFeaturedItems

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<ShoppingItem> getFeaturedItems(long groupId,
                                                                             long categoryId,
                                                                             int numOfItems)

getItem

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem getItem(long companyId,
                                                              String sku)
                     throws PortalException
Throws:
PortalException

getItem

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem getItem(long itemId)
                     throws PortalException
Throws:
PortalException

getItemByLargeImageId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem getItemByLargeImageId(long largeImageId)
                                   throws PortalException
Throws:
PortalException

getItemByMediumImageId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem getItemByMediumImageId(long mediumImageId)
                                    throws PortalException
Throws:
PortalException

getItemBySmallImageId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem getItemBySmallImageId(long smallImageId)
                                   throws PortalException
Throws:
PortalException

getItems

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<ShoppingItem> getItems(long groupId,
                                                                     long categoryId)

getItems

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<ShoppingItem> getItems(long groupId,
                                                                     long categoryId,
                                                                     int start,
                                                                     int end,
                                                                     OrderByComparator<ShoppingItem> obc)

getItemsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getItemsCount(long groupId,
                                                           long categoryId)

getItemsPrevAndNext

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingItem[] getItemsPrevAndNext(long itemId,
                                                                            OrderByComparator<ShoppingItem> obc)
                                   throws PortalException
Throws:
PortalException

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException

getSaleItems

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<ShoppingItem> getSaleItems(long groupId,
                                                                         long categoryId,
                                                                         int numOfItems)

getShoppingItem

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getShoppingItemsCount()
Returns the number of shopping items.

Returns:
the number of shopping items

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<ShoppingItem> search(long groupId,
                                                                   long[] categoryIds,
                                                                   String keywords,
                                                                   int start,
                                                                   int end)

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long groupId,
                                                         long[] categoryIds,
                                                         String keywords)

setBeanIdentifier

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

Parameters:
beanIdentifier - the Spring bean ID for this bean

updateItem

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

@Indexable(type=REINDEX)
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

Liferay 7.0-ce-m3