001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.asset.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.asset.model.AssetTag; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the asset tag service. This utility wraps {@link AssetTagPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see AssetTagPersistence 037 * @see AssetTagPersistenceImpl 038 * @generated 039 */ 040 public class AssetTagUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(AssetTag assetTag) { 058 getPersistence().clearCache(assetTag); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<AssetTag> findWithDynamicQuery(DynamicQuery dynamicQuery) 073 throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<AssetTag> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<AssetTag> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 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 * Returns all the asset tags where groupId = ?. 114 * 115 * @param groupId the group ID 116 * @return the matching asset tags 117 * @throws SystemException if a system exception occurred 118 */ 119 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 120 long groupId) 121 throws com.liferay.portal.kernel.exception.SystemException { 122 return getPersistence().findByGroupId(groupId); 123 } 124 125 /** 126 * Returns a range of all the asset tags where groupId = ?. 127 * 128 * <p> 129 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 130 * </p> 131 * 132 * @param groupId the group ID 133 * @param start the lower bound of the range of asset tags 134 * @param end the upper bound of the range of asset tags (not inclusive) 135 * @return the range of matching asset tags 136 * @throws SystemException if a system exception occurred 137 */ 138 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 139 long groupId, int start, int end) 140 throws com.liferay.portal.kernel.exception.SystemException { 141 return getPersistence().findByGroupId(groupId, start, end); 142 } 143 144 /** 145 * Returns an ordered range of all the asset tags where groupId = ?. 146 * 147 * <p> 148 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 149 * </p> 150 * 151 * @param groupId the group ID 152 * @param start the lower bound of the range of asset tags 153 * @param end the upper bound of the range of asset tags (not inclusive) 154 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 155 * @return the ordered range of matching asset tags 156 * @throws SystemException if a system exception occurred 157 */ 158 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 159 long groupId, int start, int end, 160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence() 163 .findByGroupId(groupId, start, end, orderByComparator); 164 } 165 166 /** 167 * Returns the first asset tag in the ordered set where groupId = ?. 168 * 169 * @param groupId the group ID 170 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 171 * @return the first matching asset tag 172 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portlet.asset.model.AssetTag findByGroupId_First( 176 long groupId, 177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 178 throws com.liferay.portal.kernel.exception.SystemException, 179 com.liferay.portlet.asset.NoSuchTagException { 180 return getPersistence().findByGroupId_First(groupId, orderByComparator); 181 } 182 183 /** 184 * Returns the first asset tag in the ordered set where groupId = ?. 185 * 186 * @param groupId the group ID 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the first matching asset tag, or <code>null</code> if a matching asset tag could not be found 189 * @throws SystemException if a system exception occurred 190 */ 191 public static com.liferay.portlet.asset.model.AssetTag fetchByGroupId_First( 192 long groupId, 193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 194 throws com.liferay.portal.kernel.exception.SystemException { 195 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 196 } 197 198 /** 199 * Returns the last asset tag in the ordered set where groupId = ?. 200 * 201 * @param groupId the group ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the last matching asset tag 204 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public static com.liferay.portlet.asset.model.AssetTag findByGroupId_Last( 208 long groupId, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.kernel.exception.SystemException, 211 com.liferay.portlet.asset.NoSuchTagException { 212 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 213 } 214 215 /** 216 * Returns the last asset tag in the ordered set where groupId = ?. 217 * 218 * @param groupId the group ID 219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 220 * @return the last matching asset tag, or <code>null</code> if a matching asset tag could not be found 221 * @throws SystemException if a system exception occurred 222 */ 223 public static com.liferay.portlet.asset.model.AssetTag fetchByGroupId_Last( 224 long groupId, 225 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 226 throws com.liferay.portal.kernel.exception.SystemException { 227 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 228 } 229 230 /** 231 * Returns the asset tags before and after the current asset tag in the ordered set where groupId = ?. 232 * 233 * @param tagId the primary key of the current asset tag 234 * @param groupId the group ID 235 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 236 * @return the previous, current, and next asset tag 237 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 238 * @throws SystemException if a system exception occurred 239 */ 240 public static com.liferay.portlet.asset.model.AssetTag[] findByGroupId_PrevAndNext( 241 long tagId, long groupId, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.kernel.exception.SystemException, 244 com.liferay.portlet.asset.NoSuchTagException { 245 return getPersistence() 246 .findByGroupId_PrevAndNext(tagId, groupId, orderByComparator); 247 } 248 249 /** 250 * Returns all the asset tags that the user has permission to view where groupId = ?. 251 * 252 * @param groupId the group ID 253 * @return the matching asset tags that the user has permission to view 254 * @throws SystemException if a system exception occurred 255 */ 256 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 257 long groupId) 258 throws com.liferay.portal.kernel.exception.SystemException { 259 return getPersistence().filterFindByGroupId(groupId); 260 } 261 262 /** 263 * Returns a range of all the asset tags that the user has permission to view where groupId = ?. 264 * 265 * <p> 266 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 267 * </p> 268 * 269 * @param groupId the group ID 270 * @param start the lower bound of the range of asset tags 271 * @param end the upper bound of the range of asset tags (not inclusive) 272 * @return the range of matching asset tags that the user has permission to view 273 * @throws SystemException if a system exception occurred 274 */ 275 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 276 long groupId, int start, int end) 277 throws com.liferay.portal.kernel.exception.SystemException { 278 return getPersistence().filterFindByGroupId(groupId, start, end); 279 } 280 281 /** 282 * Returns an ordered range of all the asset tags that the user has permissions to view where groupId = ?. 283 * 284 * <p> 285 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 286 * </p> 287 * 288 * @param groupId the group ID 289 * @param start the lower bound of the range of asset tags 290 * @param end the upper bound of the range of asset tags (not inclusive) 291 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 292 * @return the ordered range of matching asset tags that the user has permission to view 293 * @throws SystemException if a system exception occurred 294 */ 295 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 296 long groupId, int start, int end, 297 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 298 throws com.liferay.portal.kernel.exception.SystemException { 299 return getPersistence() 300 .filterFindByGroupId(groupId, start, end, orderByComparator); 301 } 302 303 /** 304 * 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 = ?. 305 * 306 * @param tagId the primary key of the current asset tag 307 * @param groupId the group ID 308 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 309 * @return the previous, current, and next asset tag 310 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 311 * @throws SystemException if a system exception occurred 312 */ 313 public static com.liferay.portlet.asset.model.AssetTag[] filterFindByGroupId_PrevAndNext( 314 long tagId, long groupId, 315 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 316 throws com.liferay.portal.kernel.exception.SystemException, 317 com.liferay.portlet.asset.NoSuchTagException { 318 return getPersistence() 319 .filterFindByGroupId_PrevAndNext(tagId, groupId, 320 orderByComparator); 321 } 322 323 /** 324 * Removes all the asset tags where groupId = ? from the database. 325 * 326 * @param groupId the group ID 327 * @throws SystemException if a system exception occurred 328 */ 329 public static void removeByGroupId(long groupId) 330 throws com.liferay.portal.kernel.exception.SystemException { 331 getPersistence().removeByGroupId(groupId); 332 } 333 334 /** 335 * Returns the number of asset tags where groupId = ?. 336 * 337 * @param groupId the group ID 338 * @return the number of matching asset tags 339 * @throws SystemException if a system exception occurred 340 */ 341 public static int countByGroupId(long groupId) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().countByGroupId(groupId); 344 } 345 346 /** 347 * Returns the number of asset tags that the user has permission to view where groupId = ?. 348 * 349 * @param groupId the group ID 350 * @return the number of matching asset tags that the user has permission to view 351 * @throws SystemException if a system exception occurred 352 */ 353 public static int filterCountByGroupId(long groupId) 354 throws com.liferay.portal.kernel.exception.SystemException { 355 return getPersistence().filterCountByGroupId(groupId); 356 } 357 358 /** 359 * Returns the asset tag where groupId = ? and name = ? or throws a {@link com.liferay.portlet.asset.NoSuchTagException} if it could not be found. 360 * 361 * @param groupId the group ID 362 * @param name the name 363 * @return the matching asset tag 364 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 365 * @throws SystemException if a system exception occurred 366 */ 367 public static com.liferay.portlet.asset.model.AssetTag findByG_N( 368 long groupId, java.lang.String name) 369 throws com.liferay.portal.kernel.exception.SystemException, 370 com.liferay.portlet.asset.NoSuchTagException { 371 return getPersistence().findByG_N(groupId, name); 372 } 373 374 /** 375 * Returns the asset tag where groupId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 376 * 377 * @param groupId the group ID 378 * @param name the name 379 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 380 * @throws SystemException if a system exception occurred 381 */ 382 public static com.liferay.portlet.asset.model.AssetTag fetchByG_N( 383 long groupId, java.lang.String name) 384 throws com.liferay.portal.kernel.exception.SystemException { 385 return getPersistence().fetchByG_N(groupId, name); 386 } 387 388 /** 389 * Returns the asset tag where groupId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 390 * 391 * @param groupId the group ID 392 * @param name the name 393 * @param retrieveFromCache whether to use the finder cache 394 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 395 * @throws SystemException if a system exception occurred 396 */ 397 public static com.liferay.portlet.asset.model.AssetTag fetchByG_N( 398 long groupId, java.lang.String name, boolean retrieveFromCache) 399 throws com.liferay.portal.kernel.exception.SystemException { 400 return getPersistence().fetchByG_N(groupId, name, retrieveFromCache); 401 } 402 403 /** 404 * Removes the asset tag where groupId = ? and name = ? from the database. 405 * 406 * @param groupId the group ID 407 * @param name the name 408 * @return the asset tag that was removed 409 * @throws SystemException if a system exception occurred 410 */ 411 public static com.liferay.portlet.asset.model.AssetTag removeByG_N( 412 long groupId, java.lang.String name) 413 throws com.liferay.portal.kernel.exception.SystemException, 414 com.liferay.portlet.asset.NoSuchTagException { 415 return getPersistence().removeByG_N(groupId, name); 416 } 417 418 /** 419 * Returns the number of asset tags where groupId = ? and name = ?. 420 * 421 * @param groupId the group ID 422 * @param name the name 423 * @return the number of matching asset tags 424 * @throws SystemException if a system exception occurred 425 */ 426 public static int countByG_N(long groupId, java.lang.String name) 427 throws com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence().countByG_N(groupId, name); 429 } 430 431 /** 432 * Caches the asset tag in the entity cache if it is enabled. 433 * 434 * @param assetTag the asset tag 435 */ 436 public static void cacheResult( 437 com.liferay.portlet.asset.model.AssetTag assetTag) { 438 getPersistence().cacheResult(assetTag); 439 } 440 441 /** 442 * Caches the asset tags in the entity cache if it is enabled. 443 * 444 * @param assetTags the asset tags 445 */ 446 public static void cacheResult( 447 java.util.List<com.liferay.portlet.asset.model.AssetTag> assetTags) { 448 getPersistence().cacheResult(assetTags); 449 } 450 451 /** 452 * Creates a new asset tag with the primary key. Does not add the asset tag to the database. 453 * 454 * @param tagId the primary key for the new asset tag 455 * @return the new asset tag 456 */ 457 public static com.liferay.portlet.asset.model.AssetTag create(long tagId) { 458 return getPersistence().create(tagId); 459 } 460 461 /** 462 * Removes the asset tag with the primary key from the database. Also notifies the appropriate model listeners. 463 * 464 * @param tagId the primary key of the asset tag 465 * @return the asset tag that was removed 466 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 467 * @throws SystemException if a system exception occurred 468 */ 469 public static com.liferay.portlet.asset.model.AssetTag remove(long tagId) 470 throws com.liferay.portal.kernel.exception.SystemException, 471 com.liferay.portlet.asset.NoSuchTagException { 472 return getPersistence().remove(tagId); 473 } 474 475 public static com.liferay.portlet.asset.model.AssetTag updateImpl( 476 com.liferay.portlet.asset.model.AssetTag assetTag) 477 throws com.liferay.portal.kernel.exception.SystemException { 478 return getPersistence().updateImpl(assetTag); 479 } 480 481 /** 482 * Returns the asset tag with the primary key or throws a {@link com.liferay.portlet.asset.NoSuchTagException} if it could not be found. 483 * 484 * @param tagId the primary key of the asset tag 485 * @return the asset tag 486 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 487 * @throws SystemException if a system exception occurred 488 */ 489 public static com.liferay.portlet.asset.model.AssetTag findByPrimaryKey( 490 long tagId) 491 throws com.liferay.portal.kernel.exception.SystemException, 492 com.liferay.portlet.asset.NoSuchTagException { 493 return getPersistence().findByPrimaryKey(tagId); 494 } 495 496 /** 497 * Returns the asset tag with the primary key or returns <code>null</code> if it could not be found. 498 * 499 * @param tagId the primary key of the asset tag 500 * @return the asset tag, or <code>null</code> if a asset tag with the primary key could not be found 501 * @throws SystemException if a system exception occurred 502 */ 503 public static com.liferay.portlet.asset.model.AssetTag fetchByPrimaryKey( 504 long tagId) throws com.liferay.portal.kernel.exception.SystemException { 505 return getPersistence().fetchByPrimaryKey(tagId); 506 } 507 508 /** 509 * Returns all the asset tags. 510 * 511 * @return the asset tags 512 * @throws SystemException if a system exception occurred 513 */ 514 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll() 515 throws com.liferay.portal.kernel.exception.SystemException { 516 return getPersistence().findAll(); 517 } 518 519 /** 520 * Returns a range of all the asset tags. 521 * 522 * <p> 523 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 524 * </p> 525 * 526 * @param start the lower bound of the range of asset tags 527 * @param end the upper bound of the range of asset tags (not inclusive) 528 * @return the range of asset tags 529 * @throws SystemException if a system exception occurred 530 */ 531 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 532 int start, int end) 533 throws com.liferay.portal.kernel.exception.SystemException { 534 return getPersistence().findAll(start, end); 535 } 536 537 /** 538 * Returns an ordered range of all the asset tags. 539 * 540 * <p> 541 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 542 * </p> 543 * 544 * @param start the lower bound of the range of asset tags 545 * @param end the upper bound of the range of asset tags (not inclusive) 546 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 547 * @return the ordered range of asset tags 548 * @throws SystemException if a system exception occurred 549 */ 550 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 551 int start, int end, 552 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 553 throws com.liferay.portal.kernel.exception.SystemException { 554 return getPersistence().findAll(start, end, orderByComparator); 555 } 556 557 /** 558 * Removes all the asset tags from the database. 559 * 560 * @throws SystemException if a system exception occurred 561 */ 562 public static void removeAll() 563 throws com.liferay.portal.kernel.exception.SystemException { 564 getPersistence().removeAll(); 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetTagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 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 As of 6.2.0 817 */ 818 public void setPersistence(AssetTagPersistence persistence) { 819 } 820 821 private static AssetTagPersistence _persistence; 822 }