001 /** 002 * Copyright (c) 2000-2013 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.asset.model.AssetTag; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the asset tag service. This utility wraps {@link AssetTagPersistenceImpl} 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see AssetTagPersistence 037 * @see AssetTagPersistenceImpl 038 * @generated 039 */ 040 public class AssetTagUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(AssetTag assetTag) { 058 getPersistence().clearCache(assetTag); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<AssetTag> findWithDynamicQuery(DynamicQuery dynamicQuery) 073 throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<AssetTag> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 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<AssetTag> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 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, boolean) 099 */ 100 public static AssetTag update(AssetTag assetTag, boolean merge) 101 throws SystemException { 102 return getPersistence().update(assetTag, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static AssetTag update(AssetTag assetTag, boolean merge, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(assetTag, merge, serviceContext); 111 } 112 113 /** 114 * Caches the asset tag in the entity cache if it is enabled. 115 * 116 * @param assetTag the asset tag 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.asset.model.AssetTag assetTag) { 120 getPersistence().cacheResult(assetTag); 121 } 122 123 /** 124 * Caches the asset tags in the entity cache if it is enabled. 125 * 126 * @param assetTags the asset tags 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.asset.model.AssetTag> assetTags) { 130 getPersistence().cacheResult(assetTags); 131 } 132 133 /** 134 * Creates a new asset tag with the primary key. Does not add the asset tag to the database. 135 * 136 * @param tagId the primary key for the new asset tag 137 * @return the new asset tag 138 */ 139 public static com.liferay.portlet.asset.model.AssetTag create(long tagId) { 140 return getPersistence().create(tagId); 141 } 142 143 /** 144 * Removes the asset tag with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param tagId the primary key of the asset tag 147 * @return the asset tag that was removed 148 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portlet.asset.model.AssetTag remove(long tagId) 152 throws com.liferay.portal.kernel.exception.SystemException, 153 com.liferay.portlet.asset.NoSuchTagException { 154 return getPersistence().remove(tagId); 155 } 156 157 public static com.liferay.portlet.asset.model.AssetTag updateImpl( 158 com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge) 159 throws com.liferay.portal.kernel.exception.SystemException { 160 return getPersistence().updateImpl(assetTag, merge); 161 } 162 163 /** 164 * Returns the asset tag with the primary key or throws a {@link com.liferay.portlet.asset.NoSuchTagException} if it could not be found. 165 * 166 * @param tagId the primary key of the asset tag 167 * @return the asset tag 168 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 169 * @throws SystemException if a system exception occurred 170 */ 171 public static com.liferay.portlet.asset.model.AssetTag findByPrimaryKey( 172 long tagId) 173 throws com.liferay.portal.kernel.exception.SystemException, 174 com.liferay.portlet.asset.NoSuchTagException { 175 return getPersistence().findByPrimaryKey(tagId); 176 } 177 178 /** 179 * Returns the asset tag with the primary key or returns <code>null</code> if it could not be found. 180 * 181 * @param tagId the primary key of the asset tag 182 * @return the asset tag, or <code>null</code> if a asset tag with the primary key could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public static com.liferay.portlet.asset.model.AssetTag fetchByPrimaryKey( 186 long tagId) throws com.liferay.portal.kernel.exception.SystemException { 187 return getPersistence().fetchByPrimaryKey(tagId); 188 } 189 190 /** 191 * Returns all the asset tags where groupId = ?. 192 * 193 * @param groupId the group ID 194 * @return the matching asset tags 195 * @throws SystemException if a system exception occurred 196 */ 197 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 198 long groupId) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getPersistence().findByGroupId(groupId); 201 } 202 203 /** 204 * Returns a range of all the asset tags where groupId = ?. 205 * 206 * <p> 207 * 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. 208 * </p> 209 * 210 * @param groupId the group ID 211 * @param start the lower bound of the range of asset tags 212 * @param end the upper bound of the range of asset tags (not inclusive) 213 * @return the range of matching asset tags 214 * @throws SystemException if a system exception occurred 215 */ 216 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 217 long groupId, int start, int end) 218 throws com.liferay.portal.kernel.exception.SystemException { 219 return getPersistence().findByGroupId(groupId, start, end); 220 } 221 222 /** 223 * Returns an ordered range of all the asset tags where groupId = ?. 224 * 225 * <p> 226 * 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. 227 * </p> 228 * 229 * @param groupId the group ID 230 * @param start the lower bound of the range of asset tags 231 * @param end the upper bound of the range of asset tags (not inclusive) 232 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 233 * @return the ordered range of matching asset tags 234 * @throws SystemException if a system exception occurred 235 */ 236 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 237 long groupId, int start, int end, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.kernel.exception.SystemException { 240 return getPersistence() 241 .findByGroupId(groupId, start, end, orderByComparator); 242 } 243 244 /** 245 * Returns the first asset tag in the ordered set where groupId = ?. 246 * 247 * @param groupId the group ID 248 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 249 * @return the first matching asset tag 250 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 251 * @throws SystemException if a system exception occurred 252 */ 253 public static com.liferay.portlet.asset.model.AssetTag findByGroupId_First( 254 long groupId, 255 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 256 throws com.liferay.portal.kernel.exception.SystemException, 257 com.liferay.portlet.asset.NoSuchTagException { 258 return getPersistence().findByGroupId_First(groupId, orderByComparator); 259 } 260 261 /** 262 * Returns the first asset tag in the ordered set where groupId = ?. 263 * 264 * @param groupId the group ID 265 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 266 * @return the first matching asset tag, or <code>null</code> if a matching asset tag could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public static com.liferay.portlet.asset.model.AssetTag fetchByGroupId_First( 270 long groupId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.kernel.exception.SystemException { 273 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 274 } 275 276 /** 277 * Returns the last asset tag in the ordered set where groupId = ?. 278 * 279 * @param groupId the group ID 280 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 281 * @return the last matching asset tag 282 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 283 * @throws SystemException if a system exception occurred 284 */ 285 public static com.liferay.portlet.asset.model.AssetTag findByGroupId_Last( 286 long groupId, 287 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 288 throws com.liferay.portal.kernel.exception.SystemException, 289 com.liferay.portlet.asset.NoSuchTagException { 290 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 291 } 292 293 /** 294 * Returns the last asset tag in the ordered set where groupId = ?. 295 * 296 * @param groupId the group ID 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the last matching asset tag, or <code>null</code> if a matching asset tag could not be found 299 * @throws SystemException if a system exception occurred 300 */ 301 public static com.liferay.portlet.asset.model.AssetTag fetchByGroupId_Last( 302 long groupId, 303 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 304 throws com.liferay.portal.kernel.exception.SystemException { 305 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 306 } 307 308 /** 309 * Returns the asset tags before and after the current asset tag in the ordered set where groupId = ?. 310 * 311 * @param tagId the primary key of the current asset tag 312 * @param groupId the group ID 313 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 314 * @return the previous, current, and next asset tag 315 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 316 * @throws SystemException if a system exception occurred 317 */ 318 public static com.liferay.portlet.asset.model.AssetTag[] findByGroupId_PrevAndNext( 319 long tagId, long groupId, 320 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 321 throws com.liferay.portal.kernel.exception.SystemException, 322 com.liferay.portlet.asset.NoSuchTagException { 323 return getPersistence() 324 .findByGroupId_PrevAndNext(tagId, groupId, orderByComparator); 325 } 326 327 /** 328 * Returns all the asset tags that the user has permission to view where groupId = ?. 329 * 330 * @param groupId the group ID 331 * @return the matching asset tags that the user has permission to view 332 * @throws SystemException if a system exception occurred 333 */ 334 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 335 long groupId) 336 throws com.liferay.portal.kernel.exception.SystemException { 337 return getPersistence().filterFindByGroupId(groupId); 338 } 339 340 /** 341 * Returns a range of all the asset tags that the user has permission to view where groupId = ?. 342 * 343 * <p> 344 * 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. 345 * </p> 346 * 347 * @param groupId the group ID 348 * @param start the lower bound of the range of asset tags 349 * @param end the upper bound of the range of asset tags (not inclusive) 350 * @return the range of matching asset tags that the user has permission to view 351 * @throws SystemException if a system exception occurred 352 */ 353 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 354 long groupId, int start, int end) 355 throws com.liferay.portal.kernel.exception.SystemException { 356 return getPersistence().filterFindByGroupId(groupId, start, end); 357 } 358 359 /** 360 * Returns an ordered range of all the asset tags that the user has permissions to view where groupId = ?. 361 * 362 * <p> 363 * 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. 364 * </p> 365 * 366 * @param groupId the group ID 367 * @param start the lower bound of the range of asset tags 368 * @param end the upper bound of the range of asset tags (not inclusive) 369 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 370 * @return the ordered range of matching asset tags that the user has permission to view 371 * @throws SystemException if a system exception occurred 372 */ 373 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 374 long groupId, int start, int end, 375 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return getPersistence() 378 .filterFindByGroupId(groupId, start, end, orderByComparator); 379 } 380 381 /** 382 * Returns the asset tags before and after the current asset tag in the ordered set of asset tags that the user has permission to view where groupId = ?. 383 * 384 * @param tagId the primary key of the current asset tag 385 * @param groupId the group ID 386 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 387 * @return the previous, current, and next asset tag 388 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 389 * @throws SystemException if a system exception occurred 390 */ 391 public static com.liferay.portlet.asset.model.AssetTag[] filterFindByGroupId_PrevAndNext( 392 long tagId, long groupId, 393 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 394 throws com.liferay.portal.kernel.exception.SystemException, 395 com.liferay.portlet.asset.NoSuchTagException { 396 return getPersistence() 397 .filterFindByGroupId_PrevAndNext(tagId, groupId, 398 orderByComparator); 399 } 400 401 /** 402 * Returns the asset tag where groupId = ? and name = ? or throws a {@link com.liferay.portlet.asset.NoSuchTagException} if it could not be found. 403 * 404 * @param groupId the group ID 405 * @param name the name 406 * @return the matching asset tag 407 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 408 * @throws SystemException if a system exception occurred 409 */ 410 public static com.liferay.portlet.asset.model.AssetTag findByG_N( 411 long groupId, java.lang.String name) 412 throws com.liferay.portal.kernel.exception.SystemException, 413 com.liferay.portlet.asset.NoSuchTagException { 414 return getPersistence().findByG_N(groupId, name); 415 } 416 417 /** 418 * Returns the asset tag where groupId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 419 * 420 * @param groupId the group ID 421 * @param name the name 422 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 423 * @throws SystemException if a system exception occurred 424 */ 425 public static com.liferay.portlet.asset.model.AssetTag fetchByG_N( 426 long groupId, java.lang.String name) 427 throws com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence().fetchByG_N(groupId, name); 429 } 430 431 /** 432 * Returns the asset tag where groupId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 433 * 434 * @param groupId the group ID 435 * @param name the name 436 * @param retrieveFromCache whether to use the finder cache 437 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 438 * @throws SystemException if a system exception occurred 439 */ 440 public static com.liferay.portlet.asset.model.AssetTag fetchByG_N( 441 long groupId, java.lang.String name, boolean retrieveFromCache) 442 throws com.liferay.portal.kernel.exception.SystemException { 443 return getPersistence().fetchByG_N(groupId, name, retrieveFromCache); 444 } 445 446 /** 447 * Returns all the asset tags. 448 * 449 * @return the asset tags 450 * @throws SystemException if a system exception occurred 451 */ 452 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll() 453 throws com.liferay.portal.kernel.exception.SystemException { 454 return getPersistence().findAll(); 455 } 456 457 /** 458 * Returns a range of all the asset tags. 459 * 460 * <p> 461 * 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. 462 * </p> 463 * 464 * @param start the lower bound of the range of asset tags 465 * @param end the upper bound of the range of asset tags (not inclusive) 466 * @return the range of asset tags 467 * @throws SystemException if a system exception occurred 468 */ 469 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 470 int start, int end) 471 throws com.liferay.portal.kernel.exception.SystemException { 472 return getPersistence().findAll(start, end); 473 } 474 475 /** 476 * Returns an ordered range of all the asset tags. 477 * 478 * <p> 479 * 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. 480 * </p> 481 * 482 * @param start the lower bound of the range of asset tags 483 * @param end the upper bound of the range of asset tags (not inclusive) 484 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 485 * @return the ordered range of asset tags 486 * @throws SystemException if a system exception occurred 487 */ 488 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 489 int start, int end, 490 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 491 throws com.liferay.portal.kernel.exception.SystemException { 492 return getPersistence().findAll(start, end, orderByComparator); 493 } 494 495 /** 496 * Removes all the asset tags where groupId = ? from the database. 497 * 498 * @param groupId the group ID 499 * @throws SystemException if a system exception occurred 500 */ 501 public static void removeByGroupId(long groupId) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 getPersistence().removeByGroupId(groupId); 504 } 505 506 /** 507 * Removes the asset tag where groupId = ? and name = ? from the database. 508 * 509 * @param groupId the group ID 510 * @param name the name 511 * @return the asset tag that was removed 512 * @throws SystemException if a system exception occurred 513 */ 514 public static com.liferay.portlet.asset.model.AssetTag removeByG_N( 515 long groupId, java.lang.String name) 516 throws com.liferay.portal.kernel.exception.SystemException, 517 com.liferay.portlet.asset.NoSuchTagException { 518 return getPersistence().removeByG_N(groupId, name); 519 } 520 521 /** 522 * Removes all the asset tags from the database. 523 * 524 * @throws SystemException if a system exception occurred 525 */ 526 public static void removeAll() 527 throws com.liferay.portal.kernel.exception.SystemException { 528 getPersistence().removeAll(); 529 } 530 531 /** 532 * Returns the number of asset tags where groupId = ?. 533 * 534 * @param groupId the group ID 535 * @return the number of matching asset tags 536 * @throws SystemException if a system exception occurred 537 */ 538 public static int countByGroupId(long groupId) 539 throws com.liferay.portal.kernel.exception.SystemException { 540 return getPersistence().countByGroupId(groupId); 541 } 542 543 /** 544 * Returns the number of asset tags that the user has permission to view where groupId = ?. 545 * 546 * @param groupId the group ID 547 * @return the number of matching asset tags that the user has permission to view 548 * @throws SystemException if a system exception occurred 549 */ 550 public static int filterCountByGroupId(long groupId) 551 throws com.liferay.portal.kernel.exception.SystemException { 552 return getPersistence().filterCountByGroupId(groupId); 553 } 554 555 /** 556 * Returns the number of asset tags where groupId = ? and name = ?. 557 * 558 * @param groupId the group ID 559 * @param name the name 560 * @return the number of matching asset tags 561 * @throws SystemException if a system exception occurred 562 */ 563 public static int countByG_N(long groupId, java.lang.String name) 564 throws com.liferay.portal.kernel.exception.SystemException { 565 return getPersistence().countByG_N(groupId, name); 566 } 567 568 /** 569 * Returns the number of asset tags. 570 * 571 * @return the number of asset tags 572 * @throws SystemException if a system exception occurred 573 */ 574 public static int countAll() 575 throws com.liferay.portal.kernel.exception.SystemException { 576 return getPersistence().countAll(); 577 } 578 579 /** 580 * Returns all the asset entries associated with the asset tag. 581 * 582 * @param pk the primary key of the asset tag 583 * @return the asset entries associated with the asset tag 584 * @throws SystemException if a system exception occurred 585 */ 586 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 587 long pk) throws com.liferay.portal.kernel.exception.SystemException { 588 return getPersistence().getAssetEntries(pk); 589 } 590 591 /** 592 * Returns a range of all the asset entries associated with the asset tag. 593 * 594 * <p> 595 * 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. 596 * </p> 597 * 598 * @param pk the primary key of the asset tag 599 * @param start the lower bound of the range of asset tags 600 * @param end the upper bound of the range of asset tags (not inclusive) 601 * @return the range of asset entries associated with the asset tag 602 * @throws SystemException if a system exception occurred 603 */ 604 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 605 long pk, int start, int end) 606 throws com.liferay.portal.kernel.exception.SystemException { 607 return getPersistence().getAssetEntries(pk, start, end); 608 } 609 610 /** 611 * Returns an ordered range of all the asset entries associated with the asset tag. 612 * 613 * <p> 614 * 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. 615 * </p> 616 * 617 * @param pk the primary key of the asset tag 618 * @param start the lower bound of the range of asset tags 619 * @param end the upper bound of the range of asset tags (not inclusive) 620 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 621 * @return the ordered range of asset entries associated with the asset tag 622 * @throws SystemException if a system exception occurred 623 */ 624 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 625 long pk, int start, int end, 626 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 627 throws com.liferay.portal.kernel.exception.SystemException { 628 return getPersistence() 629 .getAssetEntries(pk, start, end, orderByComparator); 630 } 631 632 /** 633 * Returns the number of asset entries associated with the asset tag. 634 * 635 * @param pk the primary key of the asset tag 636 * @return the number of asset entries associated with the asset tag 637 * @throws SystemException if a system exception occurred 638 */ 639 public static int getAssetEntriesSize(long pk) 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().getAssetEntriesSize(pk); 642 } 643 644 /** 645 * Returns <code>true</code> if the asset entry is associated with the asset tag. 646 * 647 * @param pk the primary key of the asset tag 648 * @param assetEntryPK the primary key of the asset entry 649 * @return <code>true</code> if the asset entry is associated with the asset tag; <code>false</code> otherwise 650 * @throws SystemException if a system exception occurred 651 */ 652 public static boolean containsAssetEntry(long pk, long assetEntryPK) 653 throws com.liferay.portal.kernel.exception.SystemException { 654 return getPersistence().containsAssetEntry(pk, assetEntryPK); 655 } 656 657 /** 658 * Returns <code>true</code> if the asset tag has any asset entries associated with it. 659 * 660 * @param pk the primary key of the asset tag to check for associations with asset entries 661 * @return <code>true</code> if the asset tag has any asset entries associated with it; <code>false</code> otherwise 662 * @throws SystemException if a system exception occurred 663 */ 664 public static boolean containsAssetEntries(long pk) 665 throws com.liferay.portal.kernel.exception.SystemException { 666 return getPersistence().containsAssetEntries(pk); 667 } 668 669 /** 670 * Adds an association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 671 * 672 * @param pk the primary key of the asset tag 673 * @param assetEntryPK the primary key of the asset entry 674 * @throws SystemException if a system exception occurred 675 */ 676 public static void addAssetEntry(long pk, long assetEntryPK) 677 throws com.liferay.portal.kernel.exception.SystemException { 678 getPersistence().addAssetEntry(pk, assetEntryPK); 679 } 680 681 /** 682 * Adds an association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 683 * 684 * @param pk the primary key of the asset tag 685 * @param assetEntry the asset entry 686 * @throws SystemException if a system exception occurred 687 */ 688 public static void addAssetEntry(long pk, 689 com.liferay.portlet.asset.model.AssetEntry assetEntry) 690 throws com.liferay.portal.kernel.exception.SystemException { 691 getPersistence().addAssetEntry(pk, assetEntry); 692 } 693 694 /** 695 * Adds an association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 696 * 697 * @param pk the primary key of the asset tag 698 * @param assetEntryPKs the primary keys of the asset entries 699 * @throws SystemException if a system exception occurred 700 */ 701 public static void addAssetEntries(long pk, long[] assetEntryPKs) 702 throws com.liferay.portal.kernel.exception.SystemException { 703 getPersistence().addAssetEntries(pk, assetEntryPKs); 704 } 705 706 /** 707 * Adds an association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 708 * 709 * @param pk the primary key of the asset tag 710 * @param assetEntries the asset entries 711 * @throws SystemException if a system exception occurred 712 */ 713 public static void addAssetEntries(long pk, 714 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 715 throws com.liferay.portal.kernel.exception.SystemException { 716 getPersistence().addAssetEntries(pk, assetEntries); 717 } 718 719 /** 720 * Clears all associations between the asset tag and its asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 721 * 722 * @param pk the primary key of the asset tag to clear the associated asset entries from 723 * @throws SystemException if a system exception occurred 724 */ 725 public static void clearAssetEntries(long pk) 726 throws com.liferay.portal.kernel.exception.SystemException { 727 getPersistence().clearAssetEntries(pk); 728 } 729 730 /** 731 * Removes the association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 732 * 733 * @param pk the primary key of the asset tag 734 * @param assetEntryPK the primary key of the asset entry 735 * @throws SystemException if a system exception occurred 736 */ 737 public static void removeAssetEntry(long pk, long assetEntryPK) 738 throws com.liferay.portal.kernel.exception.SystemException { 739 getPersistence().removeAssetEntry(pk, assetEntryPK); 740 } 741 742 /** 743 * Removes the association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 744 * 745 * @param pk the primary key of the asset tag 746 * @param assetEntry the asset entry 747 * @throws SystemException if a system exception occurred 748 */ 749 public static void removeAssetEntry(long pk, 750 com.liferay.portlet.asset.model.AssetEntry assetEntry) 751 throws com.liferay.portal.kernel.exception.SystemException { 752 getPersistence().removeAssetEntry(pk, assetEntry); 753 } 754 755 /** 756 * Removes the association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 757 * 758 * @param pk the primary key of the asset tag 759 * @param assetEntryPKs the primary keys of the asset entries 760 * @throws SystemException if a system exception occurred 761 */ 762 public static void removeAssetEntries(long pk, long[] assetEntryPKs) 763 throws com.liferay.portal.kernel.exception.SystemException { 764 getPersistence().removeAssetEntries(pk, assetEntryPKs); 765 } 766 767 /** 768 * Removes the association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 769 * 770 * @param pk the primary key of the asset tag 771 * @param assetEntries the asset entries 772 * @throws SystemException if a system exception occurred 773 */ 774 public static void removeAssetEntries(long pk, 775 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 776 throws com.liferay.portal.kernel.exception.SystemException { 777 getPersistence().removeAssetEntries(pk, assetEntries); 778 } 779 780 /** 781 * Sets the asset entries associated with the asset tag, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 782 * 783 * @param pk the primary key of the asset tag 784 * @param assetEntryPKs the primary keys of the asset entries to be associated with the asset tag 785 * @throws SystemException if a system exception occurred 786 */ 787 public static void setAssetEntries(long pk, long[] assetEntryPKs) 788 throws com.liferay.portal.kernel.exception.SystemException { 789 getPersistence().setAssetEntries(pk, assetEntryPKs); 790 } 791 792 /** 793 * Sets the asset entries associated with the asset tag, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 794 * 795 * @param pk the primary key of the asset tag 796 * @param assetEntries the asset entries to be associated with the asset tag 797 * @throws SystemException if a system exception occurred 798 */ 799 public static void setAssetEntries(long pk, 800 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 801 throws com.liferay.portal.kernel.exception.SystemException { 802 getPersistence().setAssetEntries(pk, assetEntries); 803 } 804 805 public static AssetTagPersistence getPersistence() { 806 if (_persistence == null) { 807 _persistence = (AssetTagPersistence)PortalBeanLocatorUtil.locate(AssetTagPersistence.class.getName()); 808 809 ReferenceRegistry.registerReference(AssetTagUtil.class, 810 "_persistence"); 811 } 812 813 return _persistence; 814 } 815 816 /** 817 * @deprecated 818 */ 819 public void setPersistence(AssetTagPersistence persistence) { 820 } 821 822 private static AssetTagPersistence _persistence; 823 }