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.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for ShoppingOrder. This utility wraps
024     * {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ShoppingOrderLocalService
032     * @see com.liferay.portlet.shopping.service.base.ShoppingOrderLocalServiceBaseImpl
033     * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ShoppingOrderLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.shopping.model.ShoppingOrder addLatestOrder(
044                    long userId, long groupId)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService().addLatestOrder(userId, groupId);
047            }
048    
049            /**
050            * Adds the shopping order to the database. Also notifies the appropriate model listeners.
051            *
052            * @param shoppingOrder the shopping order
053            * @return the shopping order that was added
054            */
055            public static com.liferay.portlet.shopping.model.ShoppingOrder addShoppingOrder(
056                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder) {
057                    return getService().addShoppingOrder(shoppingOrder);
058            }
059    
060            public static void completeOrder(java.lang.String number,
061                    java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
062                    double ppPaymentGross, java.lang.String ppReceiverEmail,
063                    java.lang.String ppPayerEmail, boolean updateInventory,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException {
066                    getService()
067                            .completeOrder(number, ppTxnId, ppPaymentStatus, ppPaymentGross,
068                            ppReceiverEmail, ppPayerEmail, updateInventory, serviceContext);
069            }
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 static com.liferay.portlet.shopping.model.ShoppingOrder createShoppingOrder(
078                    long orderId) {
079                    return getService().createShoppingOrder(orderId);
080            }
081    
082            public static void deleteOrder(
083                    com.liferay.portlet.shopping.model.ShoppingOrder order)
084                    throws com.liferay.portal.kernel.exception.PortalException {
085                    getService().deleteOrder(order);
086            }
087    
088            public static void deleteOrder(long orderId)
089                    throws com.liferay.portal.kernel.exception.PortalException {
090                    getService().deleteOrder(orderId);
091            }
092    
093            public static void deleteOrders(long groupId)
094                    throws com.liferay.portal.kernel.exception.PortalException {
095                    getService().deleteOrders(groupId);
096            }
097    
098            /**
099            * @throws PortalException
100            */
101            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
102                    com.liferay.portal.model.PersistedModel persistedModel)
103                    throws com.liferay.portal.kernel.exception.PortalException {
104                    return getService().deletePersistedModel(persistedModel);
105            }
106    
107            /**
108            * Deletes the shopping order with the primary key from the database. Also notifies the appropriate model listeners.
109            *
110            * @param orderId the primary key of the shopping order
111            * @return the shopping order that was removed
112            * @throws PortalException if a shopping order with the primary key could not be found
113            */
114            public static com.liferay.portlet.shopping.model.ShoppingOrder deleteShoppingOrder(
115                    long orderId)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    return getService().deleteShoppingOrder(orderId);
118            }
119    
120            /**
121            * Deletes the shopping order from the database. Also notifies the appropriate model listeners.
122            *
123            * @param shoppingOrder the shopping order
124            * @return the shopping order that was removed
125            */
126            public static com.liferay.portlet.shopping.model.ShoppingOrder deleteShoppingOrder(
127                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder) {
128                    return getService().deleteShoppingOrder(shoppingOrder);
129            }
130    
131            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
132                    return getService().dynamicQuery();
133            }
134    
135            /**
136            * Performs a dynamic query on the database and returns the matching rows.
137            *
138            * @param dynamicQuery the dynamic query
139            * @return the matching rows
140            */
141            public static <T> java.util.List<T> dynamicQuery(
142                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
143                    return getService().dynamicQuery(dynamicQuery);
144            }
145    
146            /**
147            * Performs a dynamic query on the database and returns a range of the matching rows.
148            *
149            * <p>
150            * 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.
151            * </p>
152            *
153            * @param dynamicQuery the dynamic query
154            * @param start the lower bound of the range of model instances
155            * @param end the upper bound of the range of model instances (not inclusive)
156            * @return the range of matching rows
157            */
158            public static <T> java.util.List<T> dynamicQuery(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
160                    int end) {
161                    return getService().dynamicQuery(dynamicQuery, start, end);
162            }
163    
164            /**
165            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
166            *
167            * <p>
168            * 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.
169            * </p>
170            *
171            * @param dynamicQuery the dynamic query
172            * @param start the lower bound of the range of model instances
173            * @param end the upper bound of the range of model instances (not inclusive)
174            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
175            * @return the ordered range of matching rows
176            */
177            public static <T> java.util.List<T> dynamicQuery(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
179                    int end,
180                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
181                    return getService()
182                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
183            }
184    
185            /**
186            * Returns the number of rows matching the dynamic query.
187            *
188            * @param dynamicQuery the dynamic query
189            * @return the number of rows matching the dynamic query
190            */
191            public static long dynamicQueryCount(
192                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
193                    return getService().dynamicQueryCount(dynamicQuery);
194            }
195    
196            /**
197            * Returns the number of rows matching the dynamic query.
198            *
199            * @param dynamicQuery the dynamic query
200            * @param projection the projection to apply to the query
201            * @return the number of rows matching the dynamic query
202            */
203            public static long dynamicQueryCount(
204                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
205                    com.liferay.portal.kernel.dao.orm.Projection projection) {
206                    return getService().dynamicQueryCount(dynamicQuery, projection);
207            }
208    
209            public static com.liferay.portlet.shopping.model.ShoppingOrder fetchShoppingOrder(
210                    long orderId) {
211                    return getService().fetchShoppingOrder(orderId);
212            }
213    
214            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
215                    return getService().getActionableDynamicQuery();
216            }
217    
218            /**
219            * Returns the Spring bean ID for this bean.
220            *
221            * @return the Spring bean ID for this bean
222            */
223            public static java.lang.String getBeanIdentifier() {
224                    return getService().getBeanIdentifier();
225            }
226    
227            public static com.liferay.portlet.shopping.model.ShoppingOrder getLatestOrder(
228                    long userId, long groupId)
229                    throws com.liferay.portal.kernel.exception.PortalException {
230                    return getService().getLatestOrder(userId, groupId);
231            }
232    
233            public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
234                    java.lang.String number)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    return getService().getOrder(number);
237            }
238    
239            public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
240                    long orderId)
241                    throws com.liferay.portal.kernel.exception.PortalException {
242                    return getService().getOrder(orderId);
243            }
244    
245            public static com.liferay.portlet.shopping.model.ShoppingOrder getPayPalTxnIdOrder(
246                    java.lang.String ppTxnId)
247                    throws com.liferay.portal.kernel.exception.PortalException {
248                    return getService().getPayPalTxnIdOrder(ppTxnId);
249            }
250    
251            public static com.liferay.portal.model.PersistedModel getPersistedModel(
252                    java.io.Serializable primaryKeyObj)
253                    throws com.liferay.portal.kernel.exception.PortalException {
254                    return getService().getPersistedModel(primaryKeyObj);
255            }
256    
257            /**
258            * Returns the shopping order with the primary key.
259            *
260            * @param orderId the primary key of the shopping order
261            * @return the shopping order
262            * @throws PortalException if a shopping order with the primary key could not be found
263            */
264            public static com.liferay.portlet.shopping.model.ShoppingOrder getShoppingOrder(
265                    long orderId)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    return getService().getShoppingOrder(orderId);
268            }
269    
270            /**
271            * Returns a range of all the shopping orders.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param start the lower bound of the range of shopping orders
278            * @param end the upper bound of the range of shopping orders (not inclusive)
279            * @return the range of shopping orders
280            */
281            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> getShoppingOrders(
282                    int start, int end) {
283                    return getService().getShoppingOrders(start, end);
284            }
285    
286            /**
287            * Returns the number of shopping orders.
288            *
289            * @return the number of shopping orders
290            */
291            public static int getShoppingOrdersCount() {
292                    return getService().getShoppingOrdersCount();
293            }
294    
295            public static com.liferay.portlet.shopping.model.ShoppingOrder saveLatestOrder(
296                    com.liferay.portlet.shopping.model.ShoppingCart cart)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return getService().saveLatestOrder(cart);
299            }
300    
301            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> search(
302                    long groupId, long companyId, long userId, java.lang.String number,
303                    java.lang.String billingFirstName, java.lang.String billingLastName,
304                    java.lang.String billingEmailAddress,
305                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
306                    java.lang.String shippingEmailAddress,
307                    java.lang.String ppPaymentStatus, boolean andOperator, int start,
308                    int end) {
309                    return getService()
310                                       .search(groupId, companyId, userId, number,
311                            billingFirstName, billingLastName, billingEmailAddress,
312                            shippingFirstName, shippingLastName, shippingEmailAddress,
313                            ppPaymentStatus, andOperator, start, end);
314            }
315    
316            public static int searchCount(long groupId, long companyId, long userId,
317                    java.lang.String number, java.lang.String billingFirstName,
318                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
319                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
320                    java.lang.String shippingEmailAddress,
321                    java.lang.String ppPaymentStatus, boolean andOperator) {
322                    return getService()
323                                       .searchCount(groupId, companyId, userId, number,
324                            billingFirstName, billingLastName, billingEmailAddress,
325                            shippingFirstName, shippingLastName, shippingEmailAddress,
326                            ppPaymentStatus, andOperator);
327            }
328    
329            public static void sendEmail(
330                    com.liferay.portlet.shopping.model.ShoppingOrder order,
331                    java.lang.String emailType,
332                    com.liferay.portal.service.ServiceContext serviceContext)
333                    throws com.liferay.portal.kernel.exception.PortalException {
334                    getService().sendEmail(order, emailType, serviceContext);
335            }
336    
337            public static void sendEmail(long orderId, java.lang.String emailType,
338                    com.liferay.portal.service.ServiceContext serviceContext)
339                    throws com.liferay.portal.kernel.exception.PortalException {
340                    getService().sendEmail(orderId, emailType, serviceContext);
341            }
342    
343            /**
344            * Sets the Spring bean ID for this bean.
345            *
346            * @param beanIdentifier the Spring bean ID for this bean
347            */
348            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
349                    getService().setBeanIdentifier(beanIdentifier);
350            }
351    
352            public static com.liferay.portlet.shopping.model.ShoppingOrder updateLatestOrder(
353                    long userId, long groupId, java.lang.String billingFirstName,
354                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
355                    java.lang.String billingCompany, java.lang.String billingStreet,
356                    java.lang.String billingCity, java.lang.String billingState,
357                    java.lang.String billingZip, java.lang.String billingCountry,
358                    java.lang.String billingPhone, boolean shipToBilling,
359                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
360                    java.lang.String shippingEmailAddress,
361                    java.lang.String shippingCompany, java.lang.String shippingStreet,
362                    java.lang.String shippingCity, java.lang.String shippingState,
363                    java.lang.String shippingZip, java.lang.String shippingCountry,
364                    java.lang.String shippingPhone, java.lang.String ccName,
365                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
366                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
367                    throws com.liferay.portal.kernel.exception.PortalException {
368                    return getService()
369                                       .updateLatestOrder(userId, groupId, billingFirstName,
370                            billingLastName, billingEmailAddress, billingCompany,
371                            billingStreet, billingCity, billingState, billingZip,
372                            billingCountry, billingPhone, shipToBilling, shippingFirstName,
373                            shippingLastName, shippingEmailAddress, shippingCompany,
374                            shippingStreet, shippingCity, shippingState, shippingZip,
375                            shippingCountry, shippingPhone, ccName, ccType, ccNumber,
376                            ccExpMonth, ccExpYear, ccVerNumber, comments);
377            }
378    
379            public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
380                    long orderId, java.lang.String billingFirstName,
381                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
382                    java.lang.String billingCompany, java.lang.String billingStreet,
383                    java.lang.String billingCity, java.lang.String billingState,
384                    java.lang.String billingZip, java.lang.String billingCountry,
385                    java.lang.String billingPhone, boolean shipToBilling,
386                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
387                    java.lang.String shippingEmailAddress,
388                    java.lang.String shippingCompany, java.lang.String shippingStreet,
389                    java.lang.String shippingCity, java.lang.String shippingState,
390                    java.lang.String shippingZip, java.lang.String shippingCountry,
391                    java.lang.String shippingPhone, java.lang.String ccName,
392                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
393                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
394                    throws com.liferay.portal.kernel.exception.PortalException {
395                    return getService()
396                                       .updateOrder(orderId, billingFirstName, billingLastName,
397                            billingEmailAddress, billingCompany, billingStreet, billingCity,
398                            billingState, billingZip, billingCountry, billingPhone,
399                            shipToBilling, shippingFirstName, shippingLastName,
400                            shippingEmailAddress, shippingCompany, shippingStreet,
401                            shippingCity, shippingState, shippingZip, shippingCountry,
402                            shippingPhone, ccName, ccType, ccNumber, ccExpMonth, ccExpYear,
403                            ccVerNumber, comments);
404            }
405    
406            public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
407                    long orderId, java.lang.String ppTxnId,
408                    java.lang.String ppPaymentStatus, double ppPaymentGross,
409                    java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
410                    throws com.liferay.portal.kernel.exception.PortalException {
411                    return getService()
412                                       .updateOrder(orderId, ppTxnId, ppPaymentStatus,
413                            ppPaymentGross, ppReceiverEmail, ppPayerEmail);
414            }
415    
416            /**
417            * Updates the shopping order in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
418            *
419            * @param shoppingOrder the shopping order
420            * @return the shopping order that was updated
421            */
422            public static com.liferay.portlet.shopping.model.ShoppingOrder updateShoppingOrder(
423                    com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder) {
424                    return getService().updateShoppingOrder(shoppingOrder);
425            }
426    
427            public static ShoppingOrderLocalService getService() {
428                    if (_service == null) {
429                            _service = (ShoppingOrderLocalService)PortalBeanLocatorUtil.locate(ShoppingOrderLocalService.class.getName());
430    
431                            ReferenceRegistry.registerReference(ShoppingOrderLocalServiceUtil.class,
432                                    "_service");
433                    }
434    
435                    return _service;
436            }
437    
438            /**
439             * @deprecated As of 6.2.0
440             */
441            @Deprecated
442            public void setService(ShoppingOrderLocalService service) {
443            }
444    
445            private static ShoppingOrderLocalService _service;
446    }