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.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.asset.model.AssetTagStats; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the asset tag stats service. This utility wraps {@link com.liferay.portlet.asset.service.persistence.impl.AssetTagStatsPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see AssetTagStatsPersistence 038 * @see com.liferay.portlet.asset.service.persistence.impl.AssetTagStatsPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class AssetTagStatsUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(AssetTagStats assetTagStats) { 060 getPersistence().clearCache(assetTagStats); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<AssetTagStats> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<AssetTagStats> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<AssetTagStats> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<AssetTagStats> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static AssetTagStats update(AssetTagStats assetTagStats) { 101 return getPersistence().update(assetTagStats); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static AssetTagStats update(AssetTagStats assetTagStats, 108 ServiceContext serviceContext) { 109 return getPersistence().update(assetTagStats, serviceContext); 110 } 111 112 /** 113 * Returns all the asset tag statses where tagId = ?. 114 * 115 * @param tagId the tag ID 116 * @return the matching asset tag statses 117 */ 118 public static List<AssetTagStats> findByTagId(long tagId) { 119 return getPersistence().findByTagId(tagId); 120 } 121 122 /** 123 * Returns a range of all the asset tag statses where tagId = ?. 124 * 125 * <p> 126 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 127 * </p> 128 * 129 * @param tagId the tag ID 130 * @param start the lower bound of the range of asset tag statses 131 * @param end the upper bound of the range of asset tag statses (not inclusive) 132 * @return the range of matching asset tag statses 133 */ 134 public static List<AssetTagStats> findByTagId(long tagId, int start, int end) { 135 return getPersistence().findByTagId(tagId, start, end); 136 } 137 138 /** 139 * Returns an ordered range of all the asset tag statses where tagId = ?. 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 143 * </p> 144 * 145 * @param tagId the tag ID 146 * @param start the lower bound of the range of asset tag statses 147 * @param end the upper bound of the range of asset tag statses (not inclusive) 148 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 149 * @return the ordered range of matching asset tag statses 150 */ 151 public static List<AssetTagStats> findByTagId(long tagId, int start, 152 int end, OrderByComparator<AssetTagStats> orderByComparator) { 153 return getPersistence().findByTagId(tagId, start, end, orderByComparator); 154 } 155 156 /** 157 * Returns an ordered range of all the asset tag statses where tagId = ?. 158 * 159 * <p> 160 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 161 * </p> 162 * 163 * @param tagId the tag ID 164 * @param start the lower bound of the range of asset tag statses 165 * @param end the upper bound of the range of asset tag statses (not inclusive) 166 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 167 * @param retrieveFromCache whether to retrieve from the finder cache 168 * @return the ordered range of matching asset tag statses 169 */ 170 public static List<AssetTagStats> findByTagId(long tagId, int start, 171 int end, OrderByComparator<AssetTagStats> orderByComparator, 172 boolean retrieveFromCache) { 173 return getPersistence() 174 .findByTagId(tagId, start, end, orderByComparator, 175 retrieveFromCache); 176 } 177 178 /** 179 * Returns the first asset tag stats in the ordered set where tagId = ?. 180 * 181 * @param tagId the tag ID 182 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 183 * @return the first matching asset tag stats 184 * @throws NoSuchTagStatsException if a matching asset tag stats could not be found 185 */ 186 public static AssetTagStats findByTagId_First(long tagId, 187 OrderByComparator<AssetTagStats> orderByComparator) 188 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 189 return getPersistence().findByTagId_First(tagId, orderByComparator); 190 } 191 192 /** 193 * Returns the first asset tag stats in the ordered set where tagId = ?. 194 * 195 * @param tagId the tag ID 196 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 197 * @return the first matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found 198 */ 199 public static AssetTagStats fetchByTagId_First(long tagId, 200 OrderByComparator<AssetTagStats> orderByComparator) { 201 return getPersistence().fetchByTagId_First(tagId, orderByComparator); 202 } 203 204 /** 205 * Returns the last asset tag stats in the ordered set where tagId = ?. 206 * 207 * @param tagId the tag ID 208 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 209 * @return the last matching asset tag stats 210 * @throws NoSuchTagStatsException if a matching asset tag stats could not be found 211 */ 212 public static AssetTagStats findByTagId_Last(long tagId, 213 OrderByComparator<AssetTagStats> orderByComparator) 214 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 215 return getPersistence().findByTagId_Last(tagId, orderByComparator); 216 } 217 218 /** 219 * Returns the last asset tag stats in the ordered set where tagId = ?. 220 * 221 * @param tagId the tag ID 222 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 223 * @return the last matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found 224 */ 225 public static AssetTagStats fetchByTagId_Last(long tagId, 226 OrderByComparator<AssetTagStats> orderByComparator) { 227 return getPersistence().fetchByTagId_Last(tagId, orderByComparator); 228 } 229 230 /** 231 * Returns the asset tag statses before and after the current asset tag stats in the ordered set where tagId = ?. 232 * 233 * @param tagStatsId the primary key of the current asset tag stats 234 * @param tagId the tag ID 235 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 236 * @return the previous, current, and next asset tag stats 237 * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found 238 */ 239 public static AssetTagStats[] findByTagId_PrevAndNext(long tagStatsId, 240 long tagId, OrderByComparator<AssetTagStats> orderByComparator) 241 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 242 return getPersistence() 243 .findByTagId_PrevAndNext(tagStatsId, tagId, orderByComparator); 244 } 245 246 /** 247 * Removes all the asset tag statses where tagId = ? from the database. 248 * 249 * @param tagId the tag ID 250 */ 251 public static void removeByTagId(long tagId) { 252 getPersistence().removeByTagId(tagId); 253 } 254 255 /** 256 * Returns the number of asset tag statses where tagId = ?. 257 * 258 * @param tagId the tag ID 259 * @return the number of matching asset tag statses 260 */ 261 public static int countByTagId(long tagId) { 262 return getPersistence().countByTagId(tagId); 263 } 264 265 /** 266 * Returns all the asset tag statses where classNameId = ?. 267 * 268 * @param classNameId the class name ID 269 * @return the matching asset tag statses 270 */ 271 public static List<AssetTagStats> findByClassNameId(long classNameId) { 272 return getPersistence().findByClassNameId(classNameId); 273 } 274 275 /** 276 * Returns a range of all the asset tag statses where classNameId = ?. 277 * 278 * <p> 279 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 280 * </p> 281 * 282 * @param classNameId the class name ID 283 * @param start the lower bound of the range of asset tag statses 284 * @param end the upper bound of the range of asset tag statses (not inclusive) 285 * @return the range of matching asset tag statses 286 */ 287 public static List<AssetTagStats> findByClassNameId(long classNameId, 288 int start, int end) { 289 return getPersistence().findByClassNameId(classNameId, start, end); 290 } 291 292 /** 293 * Returns an ordered range of all the asset tag statses where classNameId = ?. 294 * 295 * <p> 296 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 297 * </p> 298 * 299 * @param classNameId the class name ID 300 * @param start the lower bound of the range of asset tag statses 301 * @param end the upper bound of the range of asset tag statses (not inclusive) 302 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 303 * @return the ordered range of matching asset tag statses 304 */ 305 public static List<AssetTagStats> findByClassNameId(long classNameId, 306 int start, int end, OrderByComparator<AssetTagStats> orderByComparator) { 307 return getPersistence() 308 .findByClassNameId(classNameId, start, end, orderByComparator); 309 } 310 311 /** 312 * Returns an ordered range of all the asset tag statses where classNameId = ?. 313 * 314 * <p> 315 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 316 * </p> 317 * 318 * @param classNameId the class name ID 319 * @param start the lower bound of the range of asset tag statses 320 * @param end the upper bound of the range of asset tag statses (not inclusive) 321 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 322 * @param retrieveFromCache whether to retrieve from the finder cache 323 * @return the ordered range of matching asset tag statses 324 */ 325 public static List<AssetTagStats> findByClassNameId(long classNameId, 326 int start, int end, OrderByComparator<AssetTagStats> orderByComparator, 327 boolean retrieveFromCache) { 328 return getPersistence() 329 .findByClassNameId(classNameId, start, end, 330 orderByComparator, retrieveFromCache); 331 } 332 333 /** 334 * Returns the first asset tag stats in the ordered set where classNameId = ?. 335 * 336 * @param classNameId the class name ID 337 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 338 * @return the first matching asset tag stats 339 * @throws NoSuchTagStatsException if a matching asset tag stats could not be found 340 */ 341 public static AssetTagStats findByClassNameId_First(long classNameId, 342 OrderByComparator<AssetTagStats> orderByComparator) 343 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 344 return getPersistence() 345 .findByClassNameId_First(classNameId, orderByComparator); 346 } 347 348 /** 349 * Returns the first asset tag stats in the ordered set where classNameId = ?. 350 * 351 * @param classNameId the class name ID 352 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 353 * @return the first matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found 354 */ 355 public static AssetTagStats fetchByClassNameId_First(long classNameId, 356 OrderByComparator<AssetTagStats> orderByComparator) { 357 return getPersistence() 358 .fetchByClassNameId_First(classNameId, orderByComparator); 359 } 360 361 /** 362 * Returns the last asset tag stats in the ordered set where classNameId = ?. 363 * 364 * @param classNameId the class name ID 365 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 366 * @return the last matching asset tag stats 367 * @throws NoSuchTagStatsException if a matching asset tag stats could not be found 368 */ 369 public static AssetTagStats findByClassNameId_Last(long classNameId, 370 OrderByComparator<AssetTagStats> orderByComparator) 371 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 372 return getPersistence() 373 .findByClassNameId_Last(classNameId, orderByComparator); 374 } 375 376 /** 377 * Returns the last asset tag stats in the ordered set where classNameId = ?. 378 * 379 * @param classNameId the class name ID 380 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 381 * @return the last matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found 382 */ 383 public static AssetTagStats fetchByClassNameId_Last(long classNameId, 384 OrderByComparator<AssetTagStats> orderByComparator) { 385 return getPersistence() 386 .fetchByClassNameId_Last(classNameId, orderByComparator); 387 } 388 389 /** 390 * Returns the asset tag statses before and after the current asset tag stats in the ordered set where classNameId = ?. 391 * 392 * @param tagStatsId the primary key of the current asset tag stats 393 * @param classNameId the class name ID 394 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 395 * @return the previous, current, and next asset tag stats 396 * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found 397 */ 398 public static AssetTagStats[] findByClassNameId_PrevAndNext( 399 long tagStatsId, long classNameId, 400 OrderByComparator<AssetTagStats> orderByComparator) 401 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 402 return getPersistence() 403 .findByClassNameId_PrevAndNext(tagStatsId, classNameId, 404 orderByComparator); 405 } 406 407 /** 408 * Removes all the asset tag statses where classNameId = ? from the database. 409 * 410 * @param classNameId the class name ID 411 */ 412 public static void removeByClassNameId(long classNameId) { 413 getPersistence().removeByClassNameId(classNameId); 414 } 415 416 /** 417 * Returns the number of asset tag statses where classNameId = ?. 418 * 419 * @param classNameId the class name ID 420 * @return the number of matching asset tag statses 421 */ 422 public static int countByClassNameId(long classNameId) { 423 return getPersistence().countByClassNameId(classNameId); 424 } 425 426 /** 427 * Returns the asset tag stats where tagId = ? and classNameId = ? or throws a {@link NoSuchTagStatsException} if it could not be found. 428 * 429 * @param tagId the tag ID 430 * @param classNameId the class name ID 431 * @return the matching asset tag stats 432 * @throws NoSuchTagStatsException if a matching asset tag stats could not be found 433 */ 434 public static AssetTagStats findByT_C(long tagId, long classNameId) 435 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 436 return getPersistence().findByT_C(tagId, classNameId); 437 } 438 439 /** 440 * Returns the asset tag stats where tagId = ? and classNameId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 441 * 442 * @param tagId the tag ID 443 * @param classNameId the class name ID 444 * @return the matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found 445 */ 446 public static AssetTagStats fetchByT_C(long tagId, long classNameId) { 447 return getPersistence().fetchByT_C(tagId, classNameId); 448 } 449 450 /** 451 * Returns the asset tag stats where tagId = ? and classNameId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 452 * 453 * @param tagId the tag ID 454 * @param classNameId the class name ID 455 * @param retrieveFromCache whether to retrieve from the finder cache 456 * @return the matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found 457 */ 458 public static AssetTagStats fetchByT_C(long tagId, long classNameId, 459 boolean retrieveFromCache) { 460 return getPersistence().fetchByT_C(tagId, classNameId, retrieveFromCache); 461 } 462 463 /** 464 * Removes the asset tag stats where tagId = ? and classNameId = ? from the database. 465 * 466 * @param tagId the tag ID 467 * @param classNameId the class name ID 468 * @return the asset tag stats that was removed 469 */ 470 public static AssetTagStats removeByT_C(long tagId, long classNameId) 471 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 472 return getPersistence().removeByT_C(tagId, classNameId); 473 } 474 475 /** 476 * Returns the number of asset tag statses where tagId = ? and classNameId = ?. 477 * 478 * @param tagId the tag ID 479 * @param classNameId the class name ID 480 * @return the number of matching asset tag statses 481 */ 482 public static int countByT_C(long tagId, long classNameId) { 483 return getPersistence().countByT_C(tagId, classNameId); 484 } 485 486 /** 487 * Caches the asset tag stats in the entity cache if it is enabled. 488 * 489 * @param assetTagStats the asset tag stats 490 */ 491 public static void cacheResult(AssetTagStats assetTagStats) { 492 getPersistence().cacheResult(assetTagStats); 493 } 494 495 /** 496 * Caches the asset tag statses in the entity cache if it is enabled. 497 * 498 * @param assetTagStatses the asset tag statses 499 */ 500 public static void cacheResult(List<AssetTagStats> assetTagStatses) { 501 getPersistence().cacheResult(assetTagStatses); 502 } 503 504 /** 505 * Creates a new asset tag stats with the primary key. Does not add the asset tag stats to the database. 506 * 507 * @param tagStatsId the primary key for the new asset tag stats 508 * @return the new asset tag stats 509 */ 510 public static AssetTagStats create(long tagStatsId) { 511 return getPersistence().create(tagStatsId); 512 } 513 514 /** 515 * Removes the asset tag stats with the primary key from the database. Also notifies the appropriate model listeners. 516 * 517 * @param tagStatsId the primary key of the asset tag stats 518 * @return the asset tag stats that was removed 519 * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found 520 */ 521 public static AssetTagStats remove(long tagStatsId) 522 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 523 return getPersistence().remove(tagStatsId); 524 } 525 526 public static AssetTagStats updateImpl(AssetTagStats assetTagStats) { 527 return getPersistence().updateImpl(assetTagStats); 528 } 529 530 /** 531 * Returns the asset tag stats with the primary key or throws a {@link NoSuchTagStatsException} if it could not be found. 532 * 533 * @param tagStatsId the primary key of the asset tag stats 534 * @return the asset tag stats 535 * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found 536 */ 537 public static AssetTagStats findByPrimaryKey(long tagStatsId) 538 throws com.liferay.portlet.asset.exception.NoSuchTagStatsException { 539 return getPersistence().findByPrimaryKey(tagStatsId); 540 } 541 542 /** 543 * Returns the asset tag stats with the primary key or returns <code>null</code> if it could not be found. 544 * 545 * @param tagStatsId the primary key of the asset tag stats 546 * @return the asset tag stats, or <code>null</code> if a asset tag stats with the primary key could not be found 547 */ 548 public static AssetTagStats fetchByPrimaryKey(long tagStatsId) { 549 return getPersistence().fetchByPrimaryKey(tagStatsId); 550 } 551 552 public static java.util.Map<java.io.Serializable, AssetTagStats> fetchByPrimaryKeys( 553 java.util.Set<java.io.Serializable> primaryKeys) { 554 return getPersistence().fetchByPrimaryKeys(primaryKeys); 555 } 556 557 /** 558 * Returns all the asset tag statses. 559 * 560 * @return the asset tag statses 561 */ 562 public static List<AssetTagStats> findAll() { 563 return getPersistence().findAll(); 564 } 565 566 /** 567 * Returns a range of all the asset tag statses. 568 * 569 * <p> 570 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 571 * </p> 572 * 573 * @param start the lower bound of the range of asset tag statses 574 * @param end the upper bound of the range of asset tag statses (not inclusive) 575 * @return the range of asset tag statses 576 */ 577 public static List<AssetTagStats> findAll(int start, int end) { 578 return getPersistence().findAll(start, end); 579 } 580 581 /** 582 * Returns an ordered range of all the asset tag statses. 583 * 584 * <p> 585 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 586 * </p> 587 * 588 * @param start the lower bound of the range of asset tag statses 589 * @param end the upper bound of the range of asset tag statses (not inclusive) 590 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 591 * @return the ordered range of asset tag statses 592 */ 593 public static List<AssetTagStats> findAll(int start, int end, 594 OrderByComparator<AssetTagStats> orderByComparator) { 595 return getPersistence().findAll(start, end, orderByComparator); 596 } 597 598 /** 599 * Returns an ordered range of all the asset tag statses. 600 * 601 * <p> 602 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 603 * </p> 604 * 605 * @param start the lower bound of the range of asset tag statses 606 * @param end the upper bound of the range of asset tag statses (not inclusive) 607 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 608 * @param retrieveFromCache whether to retrieve from the finder cache 609 * @return the ordered range of asset tag statses 610 */ 611 public static List<AssetTagStats> findAll(int start, int end, 612 OrderByComparator<AssetTagStats> orderByComparator, 613 boolean retrieveFromCache) { 614 return getPersistence() 615 .findAll(start, end, orderByComparator, retrieveFromCache); 616 } 617 618 /** 619 * Removes all the asset tag statses from the database. 620 */ 621 public static void removeAll() { 622 getPersistence().removeAll(); 623 } 624 625 /** 626 * Returns the number of asset tag statses. 627 * 628 * @return the number of asset tag statses 629 */ 630 public static int countAll() { 631 return getPersistence().countAll(); 632 } 633 634 public static AssetTagStatsPersistence getPersistence() { 635 if (_persistence == null) { 636 _persistence = (AssetTagStatsPersistence)PortalBeanLocatorUtil.locate(AssetTagStatsPersistence.class.getName()); 637 638 ReferenceRegistry.registerReference(AssetTagStatsUtil.class, 639 "_persistence"); 640 } 641 642 return _persistence; 643 } 644 645 private static AssetTagStatsPersistence _persistence; 646 }