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.asset.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 AssetTagStats. This utility wraps 024 * {@link com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl} 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 AssetTagStatsLocalService 032 * @see com.liferay.portlet.asset.service.base.AssetTagStatsLocalServiceBaseImpl 033 * @see com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class AssetTagStatsLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the asset tag stats to the database. Also notifies the appropriate model listeners. 046 * 047 * @param assetTagStats the asset tag stats 048 * @return the asset tag stats that was added 049 */ 050 public static com.liferay.portlet.asset.model.AssetTagStats addAssetTagStats( 051 com.liferay.portlet.asset.model.AssetTagStats assetTagStats) { 052 return getService().addAssetTagStats(assetTagStats); 053 } 054 055 /** 056 * Adds an asset tag statistics instance. 057 * 058 * @param tagId the primary key of the tag 059 * @param classNameId the asset entry's class name ID 060 * @return the asset tag statistics instance 061 */ 062 public static com.liferay.portlet.asset.model.AssetTagStats addTagStats( 063 long tagId, long classNameId) { 064 return getService().addTagStats(tagId, classNameId); 065 } 066 067 /** 068 * Creates a new asset tag stats with the primary key. Does not add the asset tag stats to the database. 069 * 070 * @param tagStatsId the primary key for the new asset tag stats 071 * @return the new asset tag stats 072 */ 073 public static com.liferay.portlet.asset.model.AssetTagStats createAssetTagStats( 074 long tagStatsId) { 075 return getService().createAssetTagStats(tagStatsId); 076 } 077 078 /** 079 * Deletes the asset tag stats from the database. Also notifies the appropriate model listeners. 080 * 081 * @param assetTagStats the asset tag stats 082 * @return the asset tag stats that was removed 083 */ 084 public static com.liferay.portlet.asset.model.AssetTagStats deleteAssetTagStats( 085 com.liferay.portlet.asset.model.AssetTagStats assetTagStats) { 086 return getService().deleteAssetTagStats(assetTagStats); 087 } 088 089 /** 090 * Deletes the asset tag stats with the primary key from the database. Also notifies the appropriate model listeners. 091 * 092 * @param tagStatsId the primary key of the asset tag stats 093 * @return the asset tag stats that was removed 094 * @throws PortalException if a asset tag stats with the primary key could not be found 095 */ 096 public static com.liferay.portlet.asset.model.AssetTagStats deleteAssetTagStats( 097 long tagStatsId) 098 throws com.liferay.portal.kernel.exception.PortalException { 099 return getService().deleteAssetTagStats(tagStatsId); 100 } 101 102 /** 103 * @throws PortalException 104 */ 105 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 106 com.liferay.portal.model.PersistedModel persistedModel) 107 throws com.liferay.portal.kernel.exception.PortalException { 108 return getService().deletePersistedModel(persistedModel); 109 } 110 111 /** 112 * Deletes the asset tag statistics instance. 113 * 114 * @param tagStats the asset tag statistics instance 115 */ 116 public static void deleteTagStats( 117 com.liferay.portlet.asset.model.AssetTagStats tagStats) { 118 getService().deleteTagStats(tagStats); 119 } 120 121 /** 122 * Deletes the asset tag statistics instance matching the tag statistics ID. 123 * 124 * @param tagStatsId the primary key of the asset tag statistics instance 125 */ 126 public static void deleteTagStats(long tagStatsId) 127 throws com.liferay.portal.kernel.exception.PortalException { 128 getService().deleteTagStats(tagStatsId); 129 } 130 131 /** 132 * Deletes all asset tag statistics instances associated with the asset 133 * entry matching the class name ID. 134 * 135 * @param classNameId the asset entry's class name ID 136 */ 137 public static void deleteTagStatsByClassNameId(long classNameId) { 138 getService().deleteTagStatsByClassNameId(classNameId); 139 } 140 141 /** 142 * Deletes all asset tag statistics instances associated with the tag. 143 * 144 * @param tagId the primary key of the tag 145 */ 146 public static void deleteTagStatsByTagId(long tagId) { 147 getService().deleteTagStatsByTagId(tagId); 148 } 149 150 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 151 return getService().dynamicQuery(); 152 } 153 154 /** 155 * Performs a dynamic query on the database and returns the matching rows. 156 * 157 * @param dynamicQuery the dynamic query 158 * @return the matching rows 159 */ 160 public static <T> java.util.List<T> dynamicQuery( 161 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 162 return getService().dynamicQuery(dynamicQuery); 163 } 164 165 /** 166 * Performs a dynamic query on the database and returns a range of the matching rows. 167 * 168 * <p> 169 * 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.asset.model.impl.AssetTagStatsModelImpl}. 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. 170 * </p> 171 * 172 * @param dynamicQuery the dynamic query 173 * @param start the lower bound of the range of model instances 174 * @param end the upper bound of the range of model instances (not inclusive) 175 * @return the 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 return getService().dynamicQuery(dynamicQuery, start, end); 181 } 182 183 /** 184 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 185 * 186 * <p> 187 * 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.asset.model.impl.AssetTagStatsModelImpl}. 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. 188 * </p> 189 * 190 * @param dynamicQuery the dynamic query 191 * @param start the lower bound of the range of model instances 192 * @param end the upper bound of the range of model instances (not inclusive) 193 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 194 * @return the ordered range of matching rows 195 */ 196 public static <T> java.util.List<T> dynamicQuery( 197 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 198 int end, 199 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 200 return getService() 201 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 202 } 203 204 /** 205 * Returns the number of rows matching the dynamic query. 206 * 207 * @param dynamicQuery the dynamic query 208 * @return the number of rows matching the dynamic query 209 */ 210 public static long dynamicQueryCount( 211 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 212 return getService().dynamicQueryCount(dynamicQuery); 213 } 214 215 /** 216 * Returns the number of rows matching the dynamic query. 217 * 218 * @param dynamicQuery the dynamic query 219 * @param projection the projection to apply to the query 220 * @return the number of rows matching the dynamic query 221 */ 222 public static long dynamicQueryCount( 223 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 224 com.liferay.portal.kernel.dao.orm.Projection projection) { 225 return getService().dynamicQueryCount(dynamicQuery, projection); 226 } 227 228 public static com.liferay.portlet.asset.model.AssetTagStats fetchAssetTagStats( 229 long tagStatsId) { 230 return getService().fetchAssetTagStats(tagStatsId); 231 } 232 233 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 234 return getService().getActionableDynamicQuery(); 235 } 236 237 /** 238 * Returns the asset tag stats with the primary key. 239 * 240 * @param tagStatsId the primary key of the asset tag stats 241 * @return the asset tag stats 242 * @throws PortalException if a asset tag stats with the primary key could not be found 243 */ 244 public static com.liferay.portlet.asset.model.AssetTagStats getAssetTagStats( 245 long tagStatsId) 246 throws com.liferay.portal.kernel.exception.PortalException { 247 return getService().getAssetTagStats(tagStatsId); 248 } 249 250 /** 251 * Returns a range of all the asset tag statses. 252 * 253 * <p> 254 * 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.asset.model.impl.AssetTagStatsModelImpl}. 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. 255 * </p> 256 * 257 * @param start the lower bound of the range of asset tag statses 258 * @param end the upper bound of the range of asset tag statses (not inclusive) 259 * @return the range of asset tag statses 260 */ 261 public static java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getAssetTagStatses( 262 int start, int end) { 263 return getService().getAssetTagStatses(start, end); 264 } 265 266 /** 267 * Returns the number of asset tag statses. 268 * 269 * @return the number of asset tag statses 270 */ 271 public static int getAssetTagStatsesCount() { 272 return getService().getAssetTagStatsesCount(); 273 } 274 275 /** 276 * Returns the OSGi service identifier. 277 * 278 * @return the OSGi service identifier 279 */ 280 public static java.lang.String getOSGiServiceIdentifier() { 281 return getService().getOSGiServiceIdentifier(); 282 } 283 284 public static com.liferay.portal.model.PersistedModel getPersistedModel( 285 java.io.Serializable primaryKeyObj) 286 throws com.liferay.portal.kernel.exception.PortalException { 287 return getService().getPersistedModel(primaryKeyObj); 288 } 289 290 /** 291 * Returns a range of all the asset tag statistics instances associated with 292 * the asset entry matching the class name ID. 293 * 294 * <p> 295 * Useful when paginating results. Returns a maximum of <code>end - 296 * start</code> instances. <code>start</code> and <code>end</code> are not 297 * primary keys, they are indexes in the result set. Thus, <code>0</code> 298 * refers to the first result in the set. Setting both <code>start</code> 299 * and <code>end</code> to {@link 300 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 301 * result set. 302 * </p> 303 * 304 * @param classNameId the asset entry's class name ID 305 * @param start the lower bound of the range of results 306 * @param end the upper bound of the range of results (not inclusive) 307 * @return the range of asset tag statistics associated with the asset entry 308 matching the class name ID 309 */ 310 public static java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getTagStats( 311 long classNameId, int start, int end) { 312 return getService().getTagStats(classNameId, start, end); 313 } 314 315 /** 316 * Returns the asset tag statistics instance with the tag and asset entry 317 * matching the class name ID 318 * 319 * @param tagId the primary key of the tag 320 * @param classNameId the asset entry's class name ID 321 * @return Returns the asset tag statistics instance with the tag and asset 322 entry matching the class name ID 323 */ 324 public static com.liferay.portlet.asset.model.AssetTagStats getTagStats( 325 long tagId, long classNameId) { 326 return getService().getTagStats(tagId, classNameId); 327 } 328 329 /** 330 * Updates the asset tag stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 331 * 332 * @param assetTagStats the asset tag stats 333 * @return the asset tag stats that was updated 334 */ 335 public static com.liferay.portlet.asset.model.AssetTagStats updateAssetTagStats( 336 com.liferay.portlet.asset.model.AssetTagStats assetTagStats) { 337 return getService().updateAssetTagStats(assetTagStats); 338 } 339 340 /** 341 * Updates the asset tag statistics instance. 342 * 343 * @param tagId the primary key of the tag 344 * @param classNameId the asset entry's class name ID 345 * @return the updated asset tag statistics instance 346 */ 347 public static com.liferay.portlet.asset.model.AssetTagStats updateTagStats( 348 long tagId, long classNameId) 349 throws com.liferay.portal.kernel.exception.PortalException { 350 return getService().updateTagStats(tagId, classNameId); 351 } 352 353 public static AssetTagStatsLocalService getService() { 354 if (_service == null) { 355 _service = (AssetTagStatsLocalService)PortalBeanLocatorUtil.locate(AssetTagStatsLocalService.class.getName()); 356 357 ReferenceRegistry.registerReference(AssetTagStatsLocalServiceUtil.class, 358 "_service"); 359 } 360 361 return _service; 362 } 363 364 /** 365 * @deprecated As of 6.2.0 366 */ 367 @Deprecated 368 public void setService(AssetTagStatsLocalService service) { 369 } 370 371 private static AssetTagStatsLocalService _service; 372 }