001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for ShoppingOrder. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see ShoppingOrderLocalServiceUtil
036     * @see com.liferay.portlet.shopping.service.base.ShoppingOrderLocalServiceBaseImpl
037     * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface ShoppingOrderLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link ShoppingOrderLocalServiceUtil} to access the shopping order local service. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public com.liferay.portlet.shopping.model.ShoppingOrder addLatestOrder(
051                    long userId, long groupId)
052                    throws com.liferay.portal.kernel.exception.PortalException;
053    
054            /**
055            * Adds the shopping order to the database. Also notifies the appropriate model listeners.
056            *
057            * @param shoppingOrder the shopping order
058            * @return the shopping order that was added
059            */
060            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
061            public com.liferay.portlet.shopping.model.ShoppingOrder addShoppingOrder(
062                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
063    
064            public void completeOrder(java.lang.String number,
065                    java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
066                    double ppPaymentGross, java.lang.String ppReceiverEmail,
067                    java.lang.String ppPayerEmail, boolean updateInventory,
068                    com.liferay.portal.service.ServiceContext serviceContext)
069                    throws com.liferay.portal.kernel.exception.PortalException;
070    
071            /**
072            * Creates a new shopping order with the primary key. Does not add the shopping order to the database.
073            *
074            * @param orderId the primary key for the new shopping order
075            * @return the new shopping order
076            */
077            public com.liferay.portlet.shopping.model.ShoppingOrder createShoppingOrder(
078                    long orderId);
079    
080            public void deleteOrder(
081                    com.liferay.portlet.shopping.model.ShoppingOrder order)
082                    throws com.liferay.portal.kernel.exception.PortalException;
083    
084            public void deleteOrder(long orderId)
085                    throws com.liferay.portal.kernel.exception.PortalException;
086    
087            public void deleteOrders(long groupId)
088                    throws com.liferay.portal.kernel.exception.PortalException;
089    
090            /**
091            * @throws PortalException
092            */
093            @Override
094            public com.liferay.portal.model.PersistedModel deletePersistedModel(
095                    com.liferay.portal.model.PersistedModel persistedModel)
096                    throws com.liferay.portal.kernel.exception.PortalException;
097    
098            /**
099            * Deletes the shopping order with the primary key from the database. Also notifies the appropriate model listeners.
100            *
101            * @param orderId the primary key of the shopping order
102            * @return the shopping order that was removed
103            * @throws PortalException if a shopping order with the primary key could not be found
104            */
105            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
106            public com.liferay.portlet.shopping.model.ShoppingOrder deleteShoppingOrder(
107                    long orderId)
108                    throws com.liferay.portal.kernel.exception.PortalException;
109    
110            /**
111            * Deletes the shopping order from the database. Also notifies the appropriate model listeners.
112            *
113            * @param shoppingOrder the shopping order
114            * @return the shopping order that was removed
115            */
116            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
117            public com.liferay.portlet.shopping.model.ShoppingOrder deleteShoppingOrder(
118                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
119    
120            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
121    
122            /**
123            * Performs a dynamic query on the database and returns the matching rows.
124            *
125            * @param dynamicQuery the dynamic query
126            * @return the matching rows
127            */
128            public <T> java.util.List<T> dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
130    
131            /**
132            * Performs a dynamic query on the database and returns a range of the matching rows.
133            *
134            * <p>
135            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingOrderModelImpl}. If both <code>orderByComparator</code> 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.
136            * </p>
137            *
138            * @param dynamicQuery the dynamic query
139            * @param start the lower bound of the range of model instances
140            * @param end the upper bound of the range of model instances (not inclusive)
141            * @return the range of matching rows
142            */
143            public <T> java.util.List<T> dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145                    int end);
146    
147            /**
148            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
149            *
150            * <p>
151            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingOrderModelImpl}. If both <code>orderByComparator</code> 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.
152            * </p>
153            *
154            * @param dynamicQuery the dynamic query
155            * @param start the lower bound of the range of model instances
156            * @param end the upper bound of the range of model instances (not inclusive)
157            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
158            * @return the ordered range of matching rows
159            */
160            public <T> java.util.List<T> dynamicQuery(
161                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
162                    int end,
163                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
164    
165            /**
166            * Returns the number of rows matching the dynamic query.
167            *
168            * @param dynamicQuery the dynamic query
169            * @return the number of rows matching the dynamic query
170            */
171            public long dynamicQueryCount(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
173    
174            /**
175            * Returns the number of rows matching the dynamic query.
176            *
177            * @param dynamicQuery the dynamic query
178            * @param projection the projection to apply to the query
179            * @return the number of rows matching the dynamic query
180            */
181            public long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
183                    com.liferay.portal.kernel.dao.orm.Projection projection);
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portlet.shopping.model.ShoppingOrder fetchShoppingOrder(
187                    long orderId);
188    
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
191    
192            /**
193            * Returns the Spring bean ID for this bean.
194            *
195            * @return the Spring bean ID for this bean
196            */
197            public java.lang.String getBeanIdentifier();
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public com.liferay.portlet.shopping.model.ShoppingOrder getLatestOrder(
201                    long userId, long groupId)
202                    throws com.liferay.portal.kernel.exception.PortalException;
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
206                    java.lang.String number)
207                    throws com.liferay.portal.kernel.exception.PortalException;
208    
209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
211                    long orderId)
212                    throws com.liferay.portal.kernel.exception.PortalException;
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.shopping.model.ShoppingOrder getPayPalTxnIdOrder(
216                    java.lang.String ppTxnId)
217                    throws com.liferay.portal.kernel.exception.PortalException;
218    
219            @Override
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portal.model.PersistedModel getPersistedModel(
222                    java.io.Serializable primaryKeyObj)
223                    throws com.liferay.portal.kernel.exception.PortalException;
224    
225            /**
226            * Returns the shopping order with the primary key.
227            *
228            * @param orderId the primary key of the shopping order
229            * @return the shopping order
230            * @throws PortalException if a shopping order with the primary key could not be found
231            */
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portlet.shopping.model.ShoppingOrder getShoppingOrder(
234                    long orderId)
235                    throws com.liferay.portal.kernel.exception.PortalException;
236    
237            /**
238            * Returns a range of all the shopping orders.
239            *
240            * <p>
241            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingOrderModelImpl}. If both <code>orderByComparator</code> 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.
242            * </p>
243            *
244            * @param start the lower bound of the range of shopping orders
245            * @param end the upper bound of the range of shopping orders (not inclusive)
246            * @return the range of shopping orders
247            */
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> getShoppingOrders(
250                    int start, int end);
251    
252            /**
253            * Returns the number of shopping orders.
254            *
255            * @return the number of shopping orders
256            */
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public int getShoppingOrdersCount();
259    
260            public com.liferay.portlet.shopping.model.ShoppingOrder saveLatestOrder(
261                    com.liferay.portlet.shopping.model.ShoppingCart cart)
262                    throws com.liferay.portal.kernel.exception.PortalException;
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> search(
266                    long groupId, long companyId, long userId, java.lang.String number,
267                    java.lang.String billingFirstName, java.lang.String billingLastName,
268                    java.lang.String billingEmailAddress,
269                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
270                    java.lang.String shippingEmailAddress,
271                    java.lang.String ppPaymentStatus, boolean andOperator, int start,
272                    int end);
273    
274            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275            public int searchCount(long groupId, long companyId, long userId,
276                    java.lang.String number, java.lang.String billingFirstName,
277                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
278                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
279                    java.lang.String shippingEmailAddress,
280                    java.lang.String ppPaymentStatus, boolean andOperator);
281    
282            public void sendEmail(
283                    com.liferay.portlet.shopping.model.ShoppingOrder order,
284                    java.lang.String emailType,
285                    com.liferay.portal.service.ServiceContext serviceContext)
286                    throws com.liferay.portal.kernel.exception.PortalException;
287    
288            public void sendEmail(long orderId, java.lang.String emailType,
289                    com.liferay.portal.service.ServiceContext serviceContext)
290                    throws com.liferay.portal.kernel.exception.PortalException;
291    
292            /**
293            * Sets the Spring bean ID for this bean.
294            *
295            * @param beanIdentifier the Spring bean ID for this bean
296            */
297            public void setBeanIdentifier(java.lang.String beanIdentifier);
298    
299            public com.liferay.portlet.shopping.model.ShoppingOrder updateLatestOrder(
300                    long userId, long groupId, java.lang.String billingFirstName,
301                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
302                    java.lang.String billingCompany, java.lang.String billingStreet,
303                    java.lang.String billingCity, java.lang.String billingState,
304                    java.lang.String billingZip, java.lang.String billingCountry,
305                    java.lang.String billingPhone, boolean shipToBilling,
306                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
307                    java.lang.String shippingEmailAddress,
308                    java.lang.String shippingCompany, java.lang.String shippingStreet,
309                    java.lang.String shippingCity, java.lang.String shippingState,
310                    java.lang.String shippingZip, java.lang.String shippingCountry,
311                    java.lang.String shippingPhone, java.lang.String ccName,
312                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
313                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
314                    throws com.liferay.portal.kernel.exception.PortalException;
315    
316            public com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
317                    long orderId, java.lang.String billingFirstName,
318                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
319                    java.lang.String billingCompany, java.lang.String billingStreet,
320                    java.lang.String billingCity, java.lang.String billingState,
321                    java.lang.String billingZip, java.lang.String billingCountry,
322                    java.lang.String billingPhone, boolean shipToBilling,
323                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
324                    java.lang.String shippingEmailAddress,
325                    java.lang.String shippingCompany, java.lang.String shippingStreet,
326                    java.lang.String shippingCity, java.lang.String shippingState,
327                    java.lang.String shippingZip, java.lang.String shippingCountry,
328                    java.lang.String shippingPhone, java.lang.String ccName,
329                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
330                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
331                    throws com.liferay.portal.kernel.exception.PortalException;
332    
333            public com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
334                    long orderId, java.lang.String ppTxnId,
335                    java.lang.String ppPaymentStatus, double ppPaymentGross,
336                    java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
337                    throws com.liferay.portal.kernel.exception.PortalException;
338    
339            /**
340            * Updates the shopping order in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
341            *
342            * @param shoppingOrder the shopping order
343            * @return the shopping order that was updated
344            */
345            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
346            public com.liferay.portlet.shopping.model.ShoppingOrder updateShoppingOrder(
347                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
348    }