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 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 276 return getService().getIndexableActionableDynamicQuery(); 277 } 278 279 /** 280 * Returns the OSGi service identifier. 281 * 282 * @return the OSGi service identifier 283 */ 284 public static java.lang.String getOSGiServiceIdentifier() { 285 return getService().getOSGiServiceIdentifier(); 286 } 287 288 public static com.liferay.portal.model.PersistedModel getPersistedModel( 289 java.io.Serializable primaryKeyObj) 290 throws com.liferay.portal.kernel.exception.PortalException { 291 return getService().getPersistedModel(primaryKeyObj); 292 } 293 294 /** 295 * Returns a range of all the asset tag statistics instances associated with 296 * the asset entry matching the class name ID. 297 * 298 * <p> 299 * Useful when paginating results. Returns a maximum of <code>end - 300 * start</code> instances. <code>start</code> and <code>end</code> are not 301 * primary keys, they are indexes in the result set. Thus, <code>0</code> 302 * refers to the first result in the set. Setting both <code>start</code> 303 * and <code>end</code> to {@link 304 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 305 * result set. 306 * </p> 307 * 308 * @param classNameId the asset entry's class name ID 309 * @param start the lower bound of the range of results 310 * @param end the upper bound of the range of results (not inclusive) 311 * @return the range of asset tag statistics associated with the asset entry 312 matching the class name ID 313 */ 314 public static java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getTagStats( 315 long classNameId, int start, int end) { 316 return getService().getTagStats(classNameId, start, end); 317 } 318 319 /** 320 * Returns the asset tag statistics instance with the tag and asset entry 321 * matching the class name ID 322 * 323 * @param tagId the primary key of the tag 324 * @param classNameId the asset entry's class name ID 325 * @return Returns the asset tag statistics instance with the tag and asset 326 entry matching the class name ID 327 */ 328 public static com.liferay.portlet.asset.model.AssetTagStats getTagStats( 329 long tagId, long classNameId) { 330 return getService().getTagStats(tagId, classNameId); 331 } 332 333 /** 334 * Updates the asset tag stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 335 * 336 * @param assetTagStats the asset tag stats 337 * @return the asset tag stats that was updated 338 */ 339 public static com.liferay.portlet.asset.model.AssetTagStats updateAssetTagStats( 340 com.liferay.portlet.asset.model.AssetTagStats assetTagStats) { 341 return getService().updateAssetTagStats(assetTagStats); 342 } 343 344 /** 345 * Updates the asset tag statistics instance. 346 * 347 * @param tagId the primary key of the tag 348 * @param classNameId the asset entry's class name ID 349 * @return the updated asset tag statistics instance 350 */ 351 public static com.liferay.portlet.asset.model.AssetTagStats updateTagStats( 352 long tagId, long classNameId) 353 throws com.liferay.portal.kernel.exception.PortalException { 354 return getService().updateTagStats(tagId, classNameId); 355 } 356 357 public static AssetTagStatsLocalService getService() { 358 if (_service == null) { 359 _service = (AssetTagStatsLocalService)PortalBeanLocatorUtil.locate(AssetTagStatsLocalService.class.getName()); 360 361 ReferenceRegistry.registerReference(AssetTagStatsLocalServiceUtil.class, 362 "_service"); 363 } 364 365 return _service; 366 } 367 368 private static AssetTagStatsLocalService _service; 369 }