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, 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 * <p> 248 * 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. 249 * </p> 250 * 251 * @param groupId the group ID 252 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 253 * @return the first matching asset tag 254 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 255 * @throws SystemException if a system exception occurred 256 */ 257 public static com.liferay.portlet.asset.model.AssetTag findByGroupId_First( 258 long groupId, 259 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 260 throws com.liferay.portal.kernel.exception.SystemException, 261 com.liferay.portlet.asset.NoSuchTagException { 262 return getPersistence().findByGroupId_First(groupId, orderByComparator); 263 } 264 265 /** 266 * Returns the last asset tag in the ordered set where groupId = ?. 267 * 268 * <p> 269 * 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. 270 * </p> 271 * 272 * @param groupId the group ID 273 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 274 * @return the last matching asset tag 275 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 276 * @throws SystemException if a system exception occurred 277 */ 278 public static com.liferay.portlet.asset.model.AssetTag findByGroupId_Last( 279 long groupId, 280 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 281 throws com.liferay.portal.kernel.exception.SystemException, 282 com.liferay.portlet.asset.NoSuchTagException { 283 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 284 } 285 286 /** 287 * Returns the asset tags before and after the current asset tag in the ordered set where groupId = ?. 288 * 289 * <p> 290 * 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. 291 * </p> 292 * 293 * @param tagId the primary key of the current asset tag 294 * @param groupId the group ID 295 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 296 * @return the previous, current, and next asset tag 297 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 298 * @throws SystemException if a system exception occurred 299 */ 300 public static com.liferay.portlet.asset.model.AssetTag[] findByGroupId_PrevAndNext( 301 long tagId, long groupId, 302 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 303 throws com.liferay.portal.kernel.exception.SystemException, 304 com.liferay.portlet.asset.NoSuchTagException { 305 return getPersistence() 306 .findByGroupId_PrevAndNext(tagId, groupId, orderByComparator); 307 } 308 309 /** 310 * Returns all the asset tags that the user has permission to view where groupId = ?. 311 * 312 * @param groupId the group ID 313 * @return the matching asset tags that the user has permission to view 314 * @throws SystemException if a system exception occurred 315 */ 316 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 317 long groupId) 318 throws com.liferay.portal.kernel.exception.SystemException { 319 return getPersistence().filterFindByGroupId(groupId); 320 } 321 322 /** 323 * Returns a range of all the asset tags that the user has permission to view where groupId = ?. 324 * 325 * <p> 326 * 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. 327 * </p> 328 * 329 * @param groupId the group ID 330 * @param start the lower bound of the range of asset tags 331 * @param end the upper bound of the range of asset tags (not inclusive) 332 * @return the range of matching asset tags that the user has permission to view 333 * @throws SystemException if a system exception occurred 334 */ 335 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 336 long groupId, int start, int end) 337 throws com.liferay.portal.kernel.exception.SystemException { 338 return getPersistence().filterFindByGroupId(groupId, start, end); 339 } 340 341 /** 342 * Returns an ordered range of all the asset tags that the user has permissions to view where groupId = ?. 343 * 344 * <p> 345 * 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. 346 * </p> 347 * 348 * @param groupId the group ID 349 * @param start the lower bound of the range of asset tags 350 * @param end the upper bound of the range of asset tags (not inclusive) 351 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 352 * @return the ordered range of matching asset tags that the user has permission to view 353 * @throws SystemException if a system exception occurred 354 */ 355 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 356 long groupId, int start, int end, 357 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 358 throws com.liferay.portal.kernel.exception.SystemException { 359 return getPersistence() 360 .filterFindByGroupId(groupId, start, end, orderByComparator); 361 } 362 363 /** 364 * 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 = ?. 365 * 366 * @param tagId the primary key of the current asset tag 367 * @param groupId the group ID 368 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 369 * @return the previous, current, and next asset tag 370 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 371 * @throws SystemException if a system exception occurred 372 */ 373 public static com.liferay.portlet.asset.model.AssetTag[] filterFindByGroupId_PrevAndNext( 374 long tagId, long groupId, 375 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 376 throws com.liferay.portal.kernel.exception.SystemException, 377 com.liferay.portlet.asset.NoSuchTagException { 378 return getPersistence() 379 .filterFindByGroupId_PrevAndNext(tagId, groupId, 380 orderByComparator); 381 } 382 383 /** 384 * Returns the asset tag where groupId = ? and name = ? or throws a {@link com.liferay.portlet.asset.NoSuchTagException} if it could not be found. 385 * 386 * @param groupId the group ID 387 * @param name the name 388 * @return the matching asset tag 389 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 390 * @throws SystemException if a system exception occurred 391 */ 392 public static com.liferay.portlet.asset.model.AssetTag findByG_N( 393 long groupId, java.lang.String name) 394 throws com.liferay.portal.kernel.exception.SystemException, 395 com.liferay.portlet.asset.NoSuchTagException { 396 return getPersistence().findByG_N(groupId, name); 397 } 398 399 /** 400 * Returns the asset tag where groupId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 401 * 402 * @param groupId the group ID 403 * @param name the name 404 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 405 * @throws SystemException if a system exception occurred 406 */ 407 public static com.liferay.portlet.asset.model.AssetTag fetchByG_N( 408 long groupId, java.lang.String name) 409 throws com.liferay.portal.kernel.exception.SystemException { 410 return getPersistence().fetchByG_N(groupId, name); 411 } 412 413 /** 414 * Returns the asset tag where groupId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 415 * 416 * @param groupId the group ID 417 * @param name the name 418 * @param retrieveFromCache whether to use the finder cache 419 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 420 * @throws SystemException if a system exception occurred 421 */ 422 public static com.liferay.portlet.asset.model.AssetTag fetchByG_N( 423 long groupId, java.lang.String name, boolean retrieveFromCache) 424 throws com.liferay.portal.kernel.exception.SystemException { 425 return getPersistence().fetchByG_N(groupId, name, retrieveFromCache); 426 } 427 428 /** 429 * Returns all the asset tags. 430 * 431 * @return the asset tags 432 * @throws SystemException if a system exception occurred 433 */ 434 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll() 435 throws com.liferay.portal.kernel.exception.SystemException { 436 return getPersistence().findAll(); 437 } 438 439 /** 440 * Returns a range of all the asset tags. 441 * 442 * <p> 443 * 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. 444 * </p> 445 * 446 * @param start the lower bound of the range of asset tags 447 * @param end the upper bound of the range of asset tags (not inclusive) 448 * @return the range of 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 int start, int end) 453 throws com.liferay.portal.kernel.exception.SystemException { 454 return getPersistence().findAll(start, end); 455 } 456 457 /** 458 * Returns an ordered 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 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 467 * @return the ordered range of asset tags 468 * @throws SystemException if a system exception occurred 469 */ 470 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 471 int start, int end, 472 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 473 throws com.liferay.portal.kernel.exception.SystemException { 474 return getPersistence().findAll(start, end, orderByComparator); 475 } 476 477 /** 478 * Removes all the asset tags where groupId = ? from the database. 479 * 480 * @param groupId the group ID 481 * @throws SystemException if a system exception occurred 482 */ 483 public static void removeByGroupId(long groupId) 484 throws com.liferay.portal.kernel.exception.SystemException { 485 getPersistence().removeByGroupId(groupId); 486 } 487 488 /** 489 * Removes the asset tag where groupId = ? and name = ? from the database. 490 * 491 * @param groupId the group ID 492 * @param name the name 493 * @throws SystemException if a system exception occurred 494 */ 495 public static void removeByG_N(long groupId, java.lang.String name) 496 throws com.liferay.portal.kernel.exception.SystemException, 497 com.liferay.portlet.asset.NoSuchTagException { 498 getPersistence().removeByG_N(groupId, name); 499 } 500 501 /** 502 * Removes all the asset tags from the database. 503 * 504 * @throws SystemException if a system exception occurred 505 */ 506 public static void removeAll() 507 throws com.liferay.portal.kernel.exception.SystemException { 508 getPersistence().removeAll(); 509 } 510 511 /** 512 * Returns the number of asset tags where groupId = ?. 513 * 514 * @param groupId the group ID 515 * @return the number of matching asset tags 516 * @throws SystemException if a system exception occurred 517 */ 518 public static int countByGroupId(long groupId) 519 throws com.liferay.portal.kernel.exception.SystemException { 520 return getPersistence().countByGroupId(groupId); 521 } 522 523 /** 524 * Returns the number of asset tags that the user has permission to view where groupId = ?. 525 * 526 * @param groupId the group ID 527 * @return the number of matching asset tags that the user has permission to view 528 * @throws SystemException if a system exception occurred 529 */ 530 public static int filterCountByGroupId(long groupId) 531 throws com.liferay.portal.kernel.exception.SystemException { 532 return getPersistence().filterCountByGroupId(groupId); 533 } 534 535 /** 536 * Returns the number of asset tags where groupId = ? and name = ?. 537 * 538 * @param groupId the group ID 539 * @param name the name 540 * @return the number of matching asset tags 541 * @throws SystemException if a system exception occurred 542 */ 543 public static int countByG_N(long groupId, java.lang.String name) 544 throws com.liferay.portal.kernel.exception.SystemException { 545 return getPersistence().countByG_N(groupId, name); 546 } 547 548 /** 549 * Returns the number of asset tags. 550 * 551 * @return the number of asset tags 552 * @throws SystemException if a system exception occurred 553 */ 554 public static int countAll() 555 throws com.liferay.portal.kernel.exception.SystemException { 556 return getPersistence().countAll(); 557 } 558 559 /** 560 * Returns all the asset entries associated with the asset tag. 561 * 562 * @param pk the primary key of the asset tag 563 * @return the asset entries associated with the asset tag 564 * @throws SystemException if a system exception occurred 565 */ 566 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 567 long pk) throws com.liferay.portal.kernel.exception.SystemException { 568 return getPersistence().getAssetEntries(pk); 569 } 570 571 /** 572 * Returns a range of all the asset entries associated with the asset tag. 573 * 574 * <p> 575 * 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. 576 * </p> 577 * 578 * @param pk the primary key of the asset tag 579 * @param start the lower bound of the range of asset tags 580 * @param end the upper bound of the range of asset tags (not inclusive) 581 * @return the range of asset entries associated with the asset tag 582 * @throws SystemException if a system exception occurred 583 */ 584 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 585 long pk, int start, int end) 586 throws com.liferay.portal.kernel.exception.SystemException { 587 return getPersistence().getAssetEntries(pk, start, end); 588 } 589 590 /** 591 * Returns an ordered 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 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 601 * @return the ordered 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 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 607 throws com.liferay.portal.kernel.exception.SystemException { 608 return getPersistence() 609 .getAssetEntries(pk, start, end, orderByComparator); 610 } 611 612 /** 613 * Returns the number of asset entries associated with the asset tag. 614 * 615 * @param pk the primary key of the asset tag 616 * @return the number of asset entries associated with the asset tag 617 * @throws SystemException if a system exception occurred 618 */ 619 public static int getAssetEntriesSize(long pk) 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return getPersistence().getAssetEntriesSize(pk); 622 } 623 624 /** 625 * Returns <code>true</code> if the asset entry is associated with the asset tag. 626 * 627 * @param pk the primary key of the asset tag 628 * @param assetEntryPK the primary key of the asset entry 629 * @return <code>true</code> if the asset entry is associated with the asset tag; <code>false</code> otherwise 630 * @throws SystemException if a system exception occurred 631 */ 632 public static boolean containsAssetEntry(long pk, long assetEntryPK) 633 throws com.liferay.portal.kernel.exception.SystemException { 634 return getPersistence().containsAssetEntry(pk, assetEntryPK); 635 } 636 637 /** 638 * Returns <code>true</code> if the asset tag has any asset entries associated with it. 639 * 640 * @param pk the primary key of the asset tag to check for associations with asset entries 641 * @return <code>true</code> if the asset tag has any asset entries associated with it; <code>false</code> otherwise 642 * @throws SystemException if a system exception occurred 643 */ 644 public static boolean containsAssetEntries(long pk) 645 throws com.liferay.portal.kernel.exception.SystemException { 646 return getPersistence().containsAssetEntries(pk); 647 } 648 649 /** 650 * Adds an association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 651 * 652 * @param pk the primary key of the asset tag 653 * @param assetEntryPK the primary key of the asset entry 654 * @throws SystemException if a system exception occurred 655 */ 656 public static void addAssetEntry(long pk, long assetEntryPK) 657 throws com.liferay.portal.kernel.exception.SystemException { 658 getPersistence().addAssetEntry(pk, assetEntryPK); 659 } 660 661 /** 662 * Adds an association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 663 * 664 * @param pk the primary key of the asset tag 665 * @param assetEntry the asset entry 666 * @throws SystemException if a system exception occurred 667 */ 668 public static void addAssetEntry(long pk, 669 com.liferay.portlet.asset.model.AssetEntry assetEntry) 670 throws com.liferay.portal.kernel.exception.SystemException { 671 getPersistence().addAssetEntry(pk, assetEntry); 672 } 673 674 /** 675 * Adds an association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 676 * 677 * @param pk the primary key of the asset tag 678 * @param assetEntryPKs the primary keys of the asset entries 679 * @throws SystemException if a system exception occurred 680 */ 681 public static void addAssetEntries(long pk, long[] assetEntryPKs) 682 throws com.liferay.portal.kernel.exception.SystemException { 683 getPersistence().addAssetEntries(pk, assetEntryPKs); 684 } 685 686 /** 687 * Adds an association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 688 * 689 * @param pk the primary key of the asset tag 690 * @param assetEntries the asset entries 691 * @throws SystemException if a system exception occurred 692 */ 693 public static void addAssetEntries(long pk, 694 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 getPersistence().addAssetEntries(pk, assetEntries); 697 } 698 699 /** 700 * Clears all associations between the asset tag and its asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 701 * 702 * @param pk the primary key of the asset tag to clear the associated asset entries from 703 * @throws SystemException if a system exception occurred 704 */ 705 public static void clearAssetEntries(long pk) 706 throws com.liferay.portal.kernel.exception.SystemException { 707 getPersistence().clearAssetEntries(pk); 708 } 709 710 /** 711 * Removes the association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 712 * 713 * @param pk the primary key of the asset tag 714 * @param assetEntryPK the primary key of the asset entry 715 * @throws SystemException if a system exception occurred 716 */ 717 public static void removeAssetEntry(long pk, long assetEntryPK) 718 throws com.liferay.portal.kernel.exception.SystemException { 719 getPersistence().removeAssetEntry(pk, assetEntryPK); 720 } 721 722 /** 723 * Removes the association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 724 * 725 * @param pk the primary key of the asset tag 726 * @param assetEntry the asset entry 727 * @throws SystemException if a system exception occurred 728 */ 729 public static void removeAssetEntry(long pk, 730 com.liferay.portlet.asset.model.AssetEntry assetEntry) 731 throws com.liferay.portal.kernel.exception.SystemException { 732 getPersistence().removeAssetEntry(pk, assetEntry); 733 } 734 735 /** 736 * Removes the association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 737 * 738 * @param pk the primary key of the asset tag 739 * @param assetEntryPKs the primary keys of the asset entries 740 * @throws SystemException if a system exception occurred 741 */ 742 public static void removeAssetEntries(long pk, long[] assetEntryPKs) 743 throws com.liferay.portal.kernel.exception.SystemException { 744 getPersistence().removeAssetEntries(pk, assetEntryPKs); 745 } 746 747 /** 748 * Removes the association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 749 * 750 * @param pk the primary key of the asset tag 751 * @param assetEntries the asset entries 752 * @throws SystemException if a system exception occurred 753 */ 754 public static void removeAssetEntries(long pk, 755 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 756 throws com.liferay.portal.kernel.exception.SystemException { 757 getPersistence().removeAssetEntries(pk, assetEntries); 758 } 759 760 /** 761 * 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. 762 * 763 * @param pk the primary key of the asset tag 764 * @param assetEntryPKs the primary keys of the asset entries to be associated with the asset tag 765 * @throws SystemException if a system exception occurred 766 */ 767 public static void setAssetEntries(long pk, long[] assetEntryPKs) 768 throws com.liferay.portal.kernel.exception.SystemException { 769 getPersistence().setAssetEntries(pk, assetEntryPKs); 770 } 771 772 /** 773 * 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. 774 * 775 * @param pk the primary key of the asset tag 776 * @param assetEntries the asset entries to be associated with the asset tag 777 * @throws SystemException if a system exception occurred 778 */ 779 public static void setAssetEntries(long pk, 780 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 781 throws com.liferay.portal.kernel.exception.SystemException { 782 getPersistence().setAssetEntries(pk, assetEntries); 783 } 784 785 public static AssetTagPersistence getPersistence() { 786 if (_persistence == null) { 787 _persistence = (AssetTagPersistence)PortalBeanLocatorUtil.locate(AssetTagPersistence.class.getName()); 788 789 ReferenceRegistry.registerReference(AssetTagUtil.class, 790 "_persistence"); 791 } 792 793 return _persistence; 794 } 795 796 public void setPersistence(AssetTagPersistence persistence) { 797 _persistence = persistence; 798 799 ReferenceRegistry.registerReference(AssetTagUtil.class, "_persistence"); 800 } 801 802 private static AssetTagPersistence _persistence; 803 }