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 ShoppingOrderItem. This utility wraps 024 * {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderItemLocalServiceImpl} 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 ShoppingOrderItemLocalService 032 * @see com.liferay.portlet.shopping.service.base.ShoppingOrderItemLocalServiceBaseImpl 033 * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderItemLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class ShoppingOrderItemLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderItemLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the shopping order item to the database. Also notifies the appropriate model listeners. 046 * 047 * @param shoppingOrderItem the shopping order item 048 * @return the shopping order item that was added 049 */ 050 public static com.liferay.portlet.shopping.model.ShoppingOrderItem addShoppingOrderItem( 051 com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) { 052 return getService().addShoppingOrderItem(shoppingOrderItem); 053 } 054 055 /** 056 * Creates a new shopping order item with the primary key. Does not add the shopping order item to the database. 057 * 058 * @param orderItemId the primary key for the new shopping order item 059 * @return the new shopping order item 060 */ 061 public static com.liferay.portlet.shopping.model.ShoppingOrderItem createShoppingOrderItem( 062 long orderItemId) { 063 return getService().createShoppingOrderItem(orderItemId); 064 } 065 066 /** 067 * @throws PortalException 068 */ 069 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 070 com.liferay.portal.model.PersistedModel persistedModel) 071 throws com.liferay.portal.kernel.exception.PortalException { 072 return getService().deletePersistedModel(persistedModel); 073 } 074 075 /** 076 * Deletes the shopping order item with the primary key from the database. Also notifies the appropriate model listeners. 077 * 078 * @param orderItemId the primary key of the shopping order item 079 * @return the shopping order item that was removed 080 * @throws PortalException if a shopping order item with the primary key could not be found 081 */ 082 public static com.liferay.portlet.shopping.model.ShoppingOrderItem deleteShoppingOrderItem( 083 long orderItemId) 084 throws com.liferay.portal.kernel.exception.PortalException { 085 return getService().deleteShoppingOrderItem(orderItemId); 086 } 087 088 /** 089 * Deletes the shopping order item from the database. Also notifies the appropriate model listeners. 090 * 091 * @param shoppingOrderItem the shopping order item 092 * @return the shopping order item that was removed 093 */ 094 public static com.liferay.portlet.shopping.model.ShoppingOrderItem deleteShoppingOrderItem( 095 com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) { 096 return getService().deleteShoppingOrderItem(shoppingOrderItem); 097 } 098 099 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 100 return getService().dynamicQuery(); 101 } 102 103 /** 104 * Performs a dynamic query on the database and returns the matching rows. 105 * 106 * @param dynamicQuery the dynamic query 107 * @return the matching rows 108 */ 109 public static <T> java.util.List<T> dynamicQuery( 110 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 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.ShoppingOrderItemModelImpl}. 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 */ 126 public static <T> java.util.List<T> dynamicQuery( 127 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 128 int end) { 129 return getService().dynamicQuery(dynamicQuery, start, end); 130 } 131 132 /** 133 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 134 * 135 * <p> 136 * 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.ShoppingOrderItemModelImpl}. 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. 137 * </p> 138 * 139 * @param dynamicQuery the dynamic query 140 * @param start the lower bound of the range of model instances 141 * @param end the upper bound of the range of model instances (not inclusive) 142 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 143 * @return the ordered range of matching rows 144 */ 145 public static <T> java.util.List<T> dynamicQuery( 146 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 147 int end, 148 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 149 return getService() 150 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 151 } 152 153 /** 154 * Returns the number of rows matching the dynamic query. 155 * 156 * @param dynamicQuery the dynamic query 157 * @return the number of rows matching the dynamic query 158 */ 159 public static long dynamicQueryCount( 160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 161 return getService().dynamicQueryCount(dynamicQuery); 162 } 163 164 /** 165 * Returns the number of rows matching the dynamic query. 166 * 167 * @param dynamicQuery the dynamic query 168 * @param projection the projection to apply to the query 169 * @return the number of rows matching the dynamic query 170 */ 171 public static long dynamicQueryCount( 172 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 173 com.liferay.portal.kernel.dao.orm.Projection projection) { 174 return getService().dynamicQueryCount(dynamicQuery, projection); 175 } 176 177 public static com.liferay.portlet.shopping.model.ShoppingOrderItem fetchShoppingOrderItem( 178 long orderItemId) { 179 return getService().fetchShoppingOrderItem(orderItemId); 180 } 181 182 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 183 return getService().getActionableDynamicQuery(); 184 } 185 186 /** 187 * Returns the Spring bean ID for this bean. 188 * 189 * @return the Spring bean ID for this bean 190 */ 191 public static java.lang.String getBeanIdentifier() { 192 return getService().getBeanIdentifier(); 193 } 194 195 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> getOrderItems( 196 long orderId) { 197 return getService().getOrderItems(orderId); 198 } 199 200 public static com.liferay.portal.model.PersistedModel getPersistedModel( 201 java.io.Serializable primaryKeyObj) 202 throws com.liferay.portal.kernel.exception.PortalException { 203 return getService().getPersistedModel(primaryKeyObj); 204 } 205 206 /** 207 * Returns the shopping order item with the primary key. 208 * 209 * @param orderItemId the primary key of the shopping order item 210 * @return the shopping order item 211 * @throws PortalException if a shopping order item with the primary key could not be found 212 */ 213 public static com.liferay.portlet.shopping.model.ShoppingOrderItem getShoppingOrderItem( 214 long orderItemId) 215 throws com.liferay.portal.kernel.exception.PortalException { 216 return getService().getShoppingOrderItem(orderItemId); 217 } 218 219 /** 220 * Returns a range of all the shopping order items. 221 * 222 * <p> 223 * 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.ShoppingOrderItemModelImpl}. 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. 224 * </p> 225 * 226 * @param start the lower bound of the range of shopping order items 227 * @param end the upper bound of the range of shopping order items (not inclusive) 228 * @return the range of shopping order items 229 */ 230 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> getShoppingOrderItems( 231 int start, int end) { 232 return getService().getShoppingOrderItems(start, end); 233 } 234 235 /** 236 * Returns the number of shopping order items. 237 * 238 * @return the number of shopping order items 239 */ 240 public static int getShoppingOrderItemsCount() { 241 return getService().getShoppingOrderItemsCount(); 242 } 243 244 /** 245 * Sets the Spring bean ID for this bean. 246 * 247 * @param beanIdentifier the Spring bean ID for this bean 248 */ 249 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 250 getService().setBeanIdentifier(beanIdentifier); 251 } 252 253 /** 254 * Updates the shopping order item in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 255 * 256 * @param shoppingOrderItem the shopping order item 257 * @return the shopping order item that was updated 258 */ 259 public static com.liferay.portlet.shopping.model.ShoppingOrderItem updateShoppingOrderItem( 260 com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) { 261 return getService().updateShoppingOrderItem(shoppingOrderItem); 262 } 263 264 public static ShoppingOrderItemLocalService getService() { 265 if (_service == null) { 266 _service = (ShoppingOrderItemLocalService)PortalBeanLocatorUtil.locate(ShoppingOrderItemLocalService.class.getName()); 267 268 ReferenceRegistry.registerReference(ShoppingOrderItemLocalServiceUtil.class, 269 "_service"); 270 } 271 272 return _service; 273 } 274 275 /** 276 * @deprecated As of 6.2.0 277 */ 278 @Deprecated 279 public void setService(ShoppingOrderItemLocalService service) { 280 } 281 282 private static ShoppingOrderItemLocalService _service; 283 }