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