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) throws PortalException;
052    
053            /**
054            * Adds the shopping order to the database. Also notifies the appropriate model listeners.
055            *
056            * @param shoppingOrder the shopping order
057            * @return the shopping order that was added
058            */
059            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
060            public com.liferay.portlet.shopping.model.ShoppingOrder addShoppingOrder(
061                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
062    
063            public void completeOrder(java.lang.String number,
064                    java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
065                    double ppPaymentGross, java.lang.String ppReceiverEmail,
066                    java.lang.String ppPayerEmail, boolean updateInventory,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws PortalException;
069    
070            /**
071            * Creates a new shopping order with the primary key. Does not add the shopping order to the database.
072            *
073            * @param orderId the primary key for the new shopping order
074            * @return the new shopping order
075            */
076            public com.liferay.portlet.shopping.model.ShoppingOrder createShoppingOrder(
077                    long orderId);
078    
079            public void deleteOrder(
080                    com.liferay.portlet.shopping.model.ShoppingOrder order)
081                    throws PortalException;
082    
083            public void deleteOrder(long orderId) throws PortalException;
084    
085            public void deleteOrders(long groupId) throws PortalException;
086    
087            /**
088            * @throws PortalException
089            */
090            @Override
091            public com.liferay.portal.model.PersistedModel deletePersistedModel(
092                    com.liferay.portal.model.PersistedModel persistedModel)
093                    throws PortalException;
094    
095            /**
096            * Deletes the shopping order with the primary key from the database. Also notifies the appropriate model listeners.
097            *
098            * @param orderId the primary key of the shopping order
099            * @return the shopping order that was removed
100            * @throws PortalException if a shopping order with the primary key could not be found
101            */
102            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
103            public com.liferay.portlet.shopping.model.ShoppingOrder deleteShoppingOrder(
104                    long orderId) throws PortalException;
105    
106            /**
107            * Deletes the shopping order from the database. Also notifies the appropriate model listeners.
108            *
109            * @param shoppingOrder the shopping order
110            * @return the shopping order that was removed
111            */
112            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
113            public com.liferay.portlet.shopping.model.ShoppingOrder deleteShoppingOrder(
114                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
115    
116            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
117    
118            /**
119            * Performs a dynamic query on the database and returns the matching rows.
120            *
121            * @param dynamicQuery the dynamic query
122            * @return the matching rows
123            */
124            public <T> java.util.List<T> dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
126    
127            /**
128            * Performs a dynamic query on the database and returns a range of the matching rows.
129            *
130            * <p>
131            * 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.
132            * </p>
133            *
134            * @param dynamicQuery the dynamic query
135            * @param start the lower bound of the range of model instances
136            * @param end the upper bound of the range of model instances (not inclusive)
137            * @return the range of matching rows
138            */
139            public <T> java.util.List<T> dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end);
142    
143            /**
144            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
145            *
146            * <p>
147            * 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.
148            * </p>
149            *
150            * @param dynamicQuery the dynamic query
151            * @param start the lower bound of the range of model instances
152            * @param end the upper bound of the range of model instances (not inclusive)
153            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
154            * @return the ordered range of matching rows
155            */
156            public <T> java.util.List<T> dynamicQuery(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
158                    int end,
159                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
160    
161            /**
162            * Returns the number of rows matching the dynamic query.
163            *
164            * @param dynamicQuery the dynamic query
165            * @return the number of rows matching the dynamic query
166            */
167            public long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
169    
170            /**
171            * Returns the number of rows matching the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @param projection the projection to apply to the query
175            * @return the number of rows matching the dynamic query
176            */
177            public long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
179                    com.liferay.portal.kernel.dao.orm.Projection projection);
180    
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public com.liferay.portlet.shopping.model.ShoppingOrder fetchShoppingOrder(
183                    long orderId);
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
187    
188            /**
189            * Returns the Spring bean ID for this bean.
190            *
191            * @return the Spring bean ID for this bean
192            */
193            public java.lang.String getBeanIdentifier();
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public com.liferay.portlet.shopping.model.ShoppingOrder getLatestOrder(
197                    long userId, long groupId) throws PortalException;
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
201                    java.lang.String number) throws PortalException;
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
205                    long orderId) throws PortalException;
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public com.liferay.portlet.shopping.model.ShoppingOrder getPayPalTxnIdOrder(
209                    java.lang.String ppTxnId) throws PortalException;
210    
211            @Override
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public com.liferay.portal.model.PersistedModel getPersistedModel(
214                    java.io.Serializable primaryKeyObj) throws PortalException;
215    
216            /**
217            * Returns the shopping order with the primary key.
218            *
219            * @param orderId the primary key of the shopping order
220            * @return the shopping order
221            * @throws PortalException if a shopping order with the primary key could not be found
222            */
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portlet.shopping.model.ShoppingOrder getShoppingOrder(
225                    long orderId) throws PortalException;
226    
227            /**
228            * Returns a range of all the shopping orders.
229            *
230            * <p>
231            * 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.
232            * </p>
233            *
234            * @param start the lower bound of the range of shopping orders
235            * @param end the upper bound of the range of shopping orders (not inclusive)
236            * @return the range of shopping orders
237            */
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> getShoppingOrders(
240                    int start, int end);
241    
242            /**
243            * Returns the number of shopping orders.
244            *
245            * @return the number of shopping orders
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public int getShoppingOrdersCount();
249    
250            public com.liferay.portlet.shopping.model.ShoppingOrder saveLatestOrder(
251                    com.liferay.portlet.shopping.model.ShoppingCart cart)
252                    throws PortalException;
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> search(
256                    long groupId, long companyId, long userId, java.lang.String number,
257                    java.lang.String billingFirstName, java.lang.String billingLastName,
258                    java.lang.String billingEmailAddress,
259                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
260                    java.lang.String shippingEmailAddress,
261                    java.lang.String ppPaymentStatus, boolean andOperator, int start,
262                    int end);
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public int searchCount(long groupId, long companyId, long userId,
266                    java.lang.String number, java.lang.String billingFirstName,
267                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
268                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
269                    java.lang.String shippingEmailAddress,
270                    java.lang.String ppPaymentStatus, boolean andOperator);
271    
272            public void sendEmail(
273                    com.liferay.portlet.shopping.model.ShoppingOrder order,
274                    java.lang.String emailType,
275                    com.liferay.portal.service.ServiceContext serviceContext)
276                    throws PortalException;
277    
278            public void sendEmail(long orderId, java.lang.String emailType,
279                    com.liferay.portal.service.ServiceContext serviceContext)
280                    throws PortalException;
281    
282            /**
283            * Sets the Spring bean ID for this bean.
284            *
285            * @param beanIdentifier the Spring bean ID for this bean
286            */
287            public void setBeanIdentifier(java.lang.String beanIdentifier);
288    
289            public com.liferay.portlet.shopping.model.ShoppingOrder updateLatestOrder(
290                    long userId, long groupId, java.lang.String billingFirstName,
291                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
292                    java.lang.String billingCompany, java.lang.String billingStreet,
293                    java.lang.String billingCity, java.lang.String billingState,
294                    java.lang.String billingZip, java.lang.String billingCountry,
295                    java.lang.String billingPhone, boolean shipToBilling,
296                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
297                    java.lang.String shippingEmailAddress,
298                    java.lang.String shippingCompany, java.lang.String shippingStreet,
299                    java.lang.String shippingCity, java.lang.String shippingState,
300                    java.lang.String shippingZip, java.lang.String shippingCountry,
301                    java.lang.String shippingPhone, java.lang.String ccName,
302                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
303                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
304                    throws PortalException;
305    
306            public com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
307                    long orderId, java.lang.String billingFirstName,
308                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
309                    java.lang.String billingCompany, java.lang.String billingStreet,
310                    java.lang.String billingCity, java.lang.String billingState,
311                    java.lang.String billingZip, java.lang.String billingCountry,
312                    java.lang.String billingPhone, boolean shipToBilling,
313                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
314                    java.lang.String shippingEmailAddress,
315                    java.lang.String shippingCompany, java.lang.String shippingStreet,
316                    java.lang.String shippingCity, java.lang.String shippingState,
317                    java.lang.String shippingZip, java.lang.String shippingCountry,
318                    java.lang.String shippingPhone, java.lang.String ccName,
319                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
320                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
321                    throws PortalException;
322    
323            public com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
324                    long orderId, java.lang.String ppTxnId,
325                    java.lang.String ppPaymentStatus, double ppPaymentGross,
326                    java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
327                    throws PortalException;
328    
329            /**
330            * Updates the shopping order in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
331            *
332            * @param shoppingOrder the shopping order
333            * @return the shopping order that was updated
334            */
335            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
336            public com.liferay.portlet.shopping.model.ShoppingOrder updateShoppingOrder(
337                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
338    }