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.ratings.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 RatingsEntry. This utility wraps 024 * {@link com.liferay.portlet.ratings.service.impl.RatingsEntryLocalServiceImpl} 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 RatingsEntryLocalService 032 * @see com.liferay.portlet.ratings.service.base.RatingsEntryLocalServiceBaseImpl 033 * @see com.liferay.portlet.ratings.service.impl.RatingsEntryLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class RatingsEntryLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.ratings.service.impl.RatingsEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the ratings entry to the database. Also notifies the appropriate model listeners. 046 * 047 * @param ratingsEntry the ratings entry 048 * @return the ratings entry that was added 049 */ 050 public static com.liferay.portlet.ratings.model.RatingsEntry addRatingsEntry( 051 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) { 052 return getService().addRatingsEntry(ratingsEntry); 053 } 054 055 /** 056 * Creates a new ratings entry with the primary key. Does not add the ratings entry to the database. 057 * 058 * @param entryId the primary key for the new ratings entry 059 * @return the new ratings entry 060 */ 061 public static com.liferay.portlet.ratings.model.RatingsEntry createRatingsEntry( 062 long entryId) { 063 return getService().createRatingsEntry(entryId); 064 } 065 066 public static void deleteEntry(long userId, java.lang.String className, 067 long classPK) 068 throws com.liferay.portal.kernel.exception.PortalException { 069 getService().deleteEntry(userId, className, classPK); 070 } 071 072 /** 073 * @throws PortalException 074 */ 075 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 076 com.liferay.portal.model.PersistedModel persistedModel) 077 throws com.liferay.portal.kernel.exception.PortalException { 078 return getService().deletePersistedModel(persistedModel); 079 } 080 081 /** 082 * Deletes the ratings entry with the primary key from the database. Also notifies the appropriate model listeners. 083 * 084 * @param entryId the primary key of the ratings entry 085 * @return the ratings entry that was removed 086 * @throws PortalException if a ratings entry with the primary key could not be found 087 */ 088 public static com.liferay.portlet.ratings.model.RatingsEntry deleteRatingsEntry( 089 long entryId) 090 throws com.liferay.portal.kernel.exception.PortalException { 091 return getService().deleteRatingsEntry(entryId); 092 } 093 094 /** 095 * Deletes the ratings entry from the database. Also notifies the appropriate model listeners. 096 * 097 * @param ratingsEntry the ratings entry 098 * @return the ratings entry that was removed 099 */ 100 public static com.liferay.portlet.ratings.model.RatingsEntry deleteRatingsEntry( 101 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) { 102 return getService().deleteRatingsEntry(ratingsEntry); 103 } 104 105 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 106 return getService().dynamicQuery(); 107 } 108 109 /** 110 * Performs a dynamic query on the database and returns the matching rows. 111 * 112 * @param dynamicQuery the dynamic query 113 * @return the matching rows 114 */ 115 public static <T> java.util.List<T> dynamicQuery( 116 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 117 return getService().dynamicQuery(dynamicQuery); 118 } 119 120 /** 121 * Performs a dynamic query on the database and returns a range of the matching rows. 122 * 123 * <p> 124 * 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.ratings.model.impl.RatingsEntryModelImpl}. 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. 125 * </p> 126 * 127 * @param dynamicQuery the dynamic query 128 * @param start the lower bound of the range of model instances 129 * @param end the upper bound of the range of model instances (not inclusive) 130 * @return the range of matching rows 131 */ 132 public static <T> java.util.List<T> dynamicQuery( 133 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 134 int end) { 135 return getService().dynamicQuery(dynamicQuery, start, end); 136 } 137 138 /** 139 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 140 * 141 * <p> 142 * 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.ratings.model.impl.RatingsEntryModelImpl}. 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. 143 * </p> 144 * 145 * @param dynamicQuery the dynamic query 146 * @param start the lower bound of the range of model instances 147 * @param end the upper bound of the range of model instances (not inclusive) 148 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 149 * @return the ordered range of matching rows 150 */ 151 public static <T> java.util.List<T> dynamicQuery( 152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 153 int end, 154 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 155 return getService() 156 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 157 } 158 159 /** 160 * Returns the number of rows matching the dynamic query. 161 * 162 * @param dynamicQuery the dynamic query 163 * @return the number of rows matching the dynamic query 164 */ 165 public static long dynamicQueryCount( 166 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 167 return getService().dynamicQueryCount(dynamicQuery); 168 } 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 static long dynamicQueryCount( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 179 com.liferay.portal.kernel.dao.orm.Projection projection) { 180 return getService().dynamicQueryCount(dynamicQuery, projection); 181 } 182 183 public static com.liferay.portlet.ratings.model.RatingsEntry fetchEntry( 184 long userId, java.lang.String className, long classPK) { 185 return getService().fetchEntry(userId, className, classPK); 186 } 187 188 public static com.liferay.portlet.ratings.model.RatingsEntry fetchRatingsEntry( 189 long entryId) { 190 return getService().fetchRatingsEntry(entryId); 191 } 192 193 /** 194 * Returns the ratings entry with the matching UUID and company. 195 * 196 * @param uuid the ratings entry's UUID 197 * @param companyId the primary key of the company 198 * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 199 */ 200 public static com.liferay.portlet.ratings.model.RatingsEntry fetchRatingsEntryByUuidAndCompanyId( 201 java.lang.String uuid, long companyId) { 202 return getService().fetchRatingsEntryByUuidAndCompanyId(uuid, companyId); 203 } 204 205 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 206 return getService().getActionableDynamicQuery(); 207 } 208 209 /** 210 * Returns the Spring bean ID for this bean. 211 * 212 * @return the Spring bean ID for this bean 213 */ 214 public static java.lang.String getBeanIdentifier() { 215 return getService().getBeanIdentifier(); 216 } 217 218 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> getEntries( 219 java.lang.String className, long classPK) { 220 return getService().getEntries(className, classPK); 221 } 222 223 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> getEntries( 224 java.lang.String className, long classPK, double score) { 225 return getService().getEntries(className, classPK, score); 226 } 227 228 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> getEntries( 229 long userId, java.lang.String className, 230 java.util.List<java.lang.Long> classPKs) { 231 return getService().getEntries(userId, className, classPKs); 232 } 233 234 public static int getEntriesCount(java.lang.String className, long classPK, 235 double score) { 236 return getService().getEntriesCount(className, classPK, score); 237 } 238 239 public static com.liferay.portlet.ratings.model.RatingsEntry getEntry( 240 long userId, java.lang.String className, long classPK) 241 throws com.liferay.portal.kernel.exception.PortalException { 242 return getService().getEntry(userId, className, classPK); 243 } 244 245 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 246 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) { 247 return getService().getExportActionableDynamicQuery(portletDataContext); 248 } 249 250 public static com.liferay.portal.model.PersistedModel getPersistedModel( 251 java.io.Serializable primaryKeyObj) 252 throws com.liferay.portal.kernel.exception.PortalException { 253 return getService().getPersistedModel(primaryKeyObj); 254 } 255 256 /** 257 * Returns a range of all the ratings entries. 258 * 259 * <p> 260 * 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.ratings.model.impl.RatingsEntryModelImpl}. 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. 261 * </p> 262 * 263 * @param start the lower bound of the range of ratings entries 264 * @param end the upper bound of the range of ratings entries (not inclusive) 265 * @return the range of ratings entries 266 */ 267 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> getRatingsEntries( 268 int start, int end) { 269 return getService().getRatingsEntries(start, end); 270 } 271 272 /** 273 * Returns the number of ratings entries. 274 * 275 * @return the number of ratings entries 276 */ 277 public static int getRatingsEntriesCount() { 278 return getService().getRatingsEntriesCount(); 279 } 280 281 /** 282 * Returns the ratings entry with the primary key. 283 * 284 * @param entryId the primary key of the ratings entry 285 * @return the ratings entry 286 * @throws PortalException if a ratings entry with the primary key could not be found 287 */ 288 public static com.liferay.portlet.ratings.model.RatingsEntry getRatingsEntry( 289 long entryId) 290 throws com.liferay.portal.kernel.exception.PortalException { 291 return getService().getRatingsEntry(entryId); 292 } 293 294 /** 295 * Returns the ratings entry with the matching UUID and company. 296 * 297 * @param uuid the ratings entry's UUID 298 * @param companyId the primary key of the company 299 * @return the matching ratings entry 300 * @throws PortalException if a matching ratings entry could not be found 301 */ 302 public static com.liferay.portlet.ratings.model.RatingsEntry getRatingsEntryByUuidAndCompanyId( 303 java.lang.String uuid, long companyId) 304 throws com.liferay.portal.kernel.exception.PortalException { 305 return getService().getRatingsEntryByUuidAndCompanyId(uuid, companyId); 306 } 307 308 /** 309 * Sets the Spring bean ID for this bean. 310 * 311 * @param beanIdentifier the Spring bean ID for this bean 312 */ 313 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 314 getService().setBeanIdentifier(beanIdentifier); 315 } 316 317 public static com.liferay.portlet.ratings.model.RatingsEntry updateEntry( 318 long userId, java.lang.String className, long classPK, double score, 319 com.liferay.portal.service.ServiceContext serviceContext) 320 throws com.liferay.portal.kernel.exception.PortalException { 321 return getService() 322 .updateEntry(userId, className, classPK, score, 323 serviceContext); 324 } 325 326 /** 327 * Updates the ratings entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 328 * 329 * @param ratingsEntry the ratings entry 330 * @return the ratings entry that was updated 331 */ 332 public static com.liferay.portlet.ratings.model.RatingsEntry updateRatingsEntry( 333 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) { 334 return getService().updateRatingsEntry(ratingsEntry); 335 } 336 337 public static RatingsEntryLocalService getService() { 338 if (_service == null) { 339 _service = (RatingsEntryLocalService)PortalBeanLocatorUtil.locate(RatingsEntryLocalService.class.getName()); 340 341 ReferenceRegistry.registerReference(RatingsEntryLocalServiceUtil.class, 342 "_service"); 343 } 344 345 return _service; 346 } 347 348 /** 349 * @deprecated As of 6.2.0 350 */ 351 @Deprecated 352 public void setService(RatingsEntryLocalService service) { 353 } 354 355 private static RatingsEntryLocalService _service; 356 }