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