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