001 /** 002 * Copyright (c) 2000-2010 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.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.asset.model.AssetTag; 020 021 /** 022 * The persistence interface for the asset tag service. 023 * 024 * <p> 025 * Never modify or reference this interface directly. Always use {@link AssetTagUtil} to access the asset tag persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 026 * </p> 027 * 028 * <p> 029 * Caching information and settings can be found in <code>portal.properties</code> 030 * </p> 031 * 032 * @author Brian Wing Shun Chan 033 * @see AssetTagPersistenceImpl 034 * @see AssetTagUtil 035 * @generated 036 */ 037 public interface AssetTagPersistence extends BasePersistence<AssetTag> { 038 /** 039 * Caches the asset tag in the entity cache if it is enabled. 040 * 041 * @param assetTag the asset tag to cache 042 */ 043 public void cacheResult(com.liferay.portlet.asset.model.AssetTag assetTag); 044 045 /** 046 * Caches the asset tags in the entity cache if it is enabled. 047 * 048 * @param assetTags the asset tags to cache 049 */ 050 public void cacheResult( 051 java.util.List<com.liferay.portlet.asset.model.AssetTag> assetTags); 052 053 /** 054 * Creates a new asset tag with the primary key. Does not add the asset tag to the database. 055 * 056 * @param tagId the primary key for the new asset tag 057 * @return the new asset tag 058 */ 059 public com.liferay.portlet.asset.model.AssetTag create(long tagId); 060 061 /** 062 * Removes the asset tag with the primary key from the database. Also notifies the appropriate model listeners. 063 * 064 * @param tagId the primary key of the asset tag to remove 065 * @return the asset tag that was removed 066 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 067 * @throws SystemException if a system exception occurred 068 */ 069 public com.liferay.portlet.asset.model.AssetTag remove(long tagId) 070 throws com.liferay.portal.kernel.exception.SystemException, 071 com.liferay.portlet.asset.NoSuchTagException; 072 073 public com.liferay.portlet.asset.model.AssetTag updateImpl( 074 com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Finds the asset tag with the primary key or throws a {@link com.liferay.portlet.asset.NoSuchTagException} if it could not be found. 079 * 080 * @param tagId the primary key of the asset tag to find 081 * @return the asset tag 082 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portlet.asset.model.AssetTag findByPrimaryKey(long tagId) 086 throws com.liferay.portal.kernel.exception.SystemException, 087 com.liferay.portlet.asset.NoSuchTagException; 088 089 /** 090 * Finds the asset tag with the primary key or returns <code>null</code> if it could not be found. 091 * 092 * @param tagId the primary key of the asset tag to find 093 * @return the asset tag, or <code>null</code> if a asset tag with the primary key could not be found 094 * @throws SystemException if a system exception occurred 095 */ 096 public com.liferay.portlet.asset.model.AssetTag fetchByPrimaryKey( 097 long tagId) throws com.liferay.portal.kernel.exception.SystemException; 098 099 /** 100 * Finds all the asset tags where groupId = ?. 101 * 102 * @param groupId the group id to search with 103 * @return the matching asset tags 104 * @throws SystemException if a system exception occurred 105 */ 106 public java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 107 long groupId) 108 throws com.liferay.portal.kernel.exception.SystemException; 109 110 /** 111 * Finds a range of all the asset tags where groupId = ?. 112 * 113 * <p> 114 * 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. 115 * </p> 116 * 117 * @param groupId the group id to search with 118 * @param start the lower bound of the range of asset tags to return 119 * @param end the upper bound of the range of asset tags to return (not inclusive) 120 * @return the range of matching asset tags 121 * @throws SystemException if a system exception occurred 122 */ 123 public java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 124 long groupId, int start, int end) 125 throws com.liferay.portal.kernel.exception.SystemException; 126 127 /** 128 * Finds an ordered range of all the asset tags where groupId = ?. 129 * 130 * <p> 131 * 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. 132 * </p> 133 * 134 * @param groupId the group id to search with 135 * @param start the lower bound of the range of asset tags to return 136 * @param end the upper bound of the range of asset tags to return (not inclusive) 137 * @param orderByComparator the comparator to order the results by 138 * @return the ordered range of matching asset tags 139 * @throws SystemException if a system exception occurred 140 */ 141 public java.util.List<com.liferay.portlet.asset.model.AssetTag> findByGroupId( 142 long groupId, int start, int end, 143 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 144 throws com.liferay.portal.kernel.exception.SystemException; 145 146 /** 147 * Finds the first asset tag in the ordered set where groupId = ?. 148 * 149 * <p> 150 * 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. 151 * </p> 152 * 153 * @param groupId the group id to search with 154 * @param orderByComparator the comparator to order the set by 155 * @return the first matching asset tag 156 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 157 * @throws SystemException if a system exception occurred 158 */ 159 public com.liferay.portlet.asset.model.AssetTag findByGroupId_First( 160 long groupId, 161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 162 throws com.liferay.portal.kernel.exception.SystemException, 163 com.liferay.portlet.asset.NoSuchTagException; 164 165 /** 166 * Finds the last asset tag in the ordered set where groupId = ?. 167 * 168 * <p> 169 * 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. 170 * </p> 171 * 172 * @param groupId the group id to search with 173 * @param orderByComparator the comparator to order the set by 174 * @return the last matching asset tag 175 * @throws com.liferay.portlet.asset.NoSuchTagException if a matching asset tag could not be found 176 * @throws SystemException if a system exception occurred 177 */ 178 public com.liferay.portlet.asset.model.AssetTag findByGroupId_Last( 179 long groupId, 180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 181 throws com.liferay.portal.kernel.exception.SystemException, 182 com.liferay.portlet.asset.NoSuchTagException; 183 184 /** 185 * Finds the asset tags before and after the current asset tag in the ordered set where groupId = ?. 186 * 187 * <p> 188 * 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. 189 * </p> 190 * 191 * @param tagId the primary key of the current asset tag 192 * @param groupId the group id to search with 193 * @param orderByComparator the comparator to order the set by 194 * @return the previous, current, and next asset tag 195 * @throws com.liferay.portlet.asset.NoSuchTagException if a asset tag with the primary key could not be found 196 * @throws SystemException if a system exception occurred 197 */ 198 public com.liferay.portlet.asset.model.AssetTag[] findByGroupId_PrevAndNext( 199 long tagId, long groupId, 200 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 201 throws com.liferay.portal.kernel.exception.SystemException, 202 com.liferay.portlet.asset.NoSuchTagException; 203 204 /** 205 * Filters by the user's permissions and finds all the asset tags where groupId = ?. 206 * 207 * @param groupId the group id to search with 208 * @return the matching asset tags that the user has permission to view 209 * @throws SystemException if a system exception occurred 210 */ 211 public java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 212 long groupId) 213 throws com.liferay.portal.kernel.exception.SystemException; 214 215 /** 216 * Filters by the user's permissions and finds a range of all the asset tags where groupId = ?. 217 * 218 * <p> 219 * 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. 220 * </p> 221 * 222 * @param groupId the group id to search with 223 * @param start the lower bound of the range of asset tags to return 224 * @param end the upper bound of the range of asset tags to return (not inclusive) 225 * @return the range of matching asset tags that the user has permission to view 226 * @throws SystemException if a system exception occurred 227 */ 228 public java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 229 long groupId, int start, int end) 230 throws com.liferay.portal.kernel.exception.SystemException; 231 232 /** 233 * Filters by the user's permissions and finds an ordered range of all the asset tags where groupId = ?. 234 * 235 * <p> 236 * 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. 237 * </p> 238 * 239 * @param groupId the group id to search with 240 * @param start the lower bound of the range of asset tags to return 241 * @param end the upper bound of the range of asset tags to return (not inclusive) 242 * @param orderByComparator the comparator to order the results by 243 * @return the ordered range of matching asset tags that the user has permission to view 244 * @throws SystemException if a system exception occurred 245 */ 246 public java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByGroupId( 247 long groupId, int start, int end, 248 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 249 throws com.liferay.portal.kernel.exception.SystemException; 250 251 /** 252 * Finds all the asset tags. 253 * 254 * @return the asset tags 255 * @throws SystemException if a system exception occurred 256 */ 257 public java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll() 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * Finds a range of all the asset tags. 262 * 263 * <p> 264 * 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. 265 * </p> 266 * 267 * @param start the lower bound of the range of asset tags to return 268 * @param end the upper bound of the range of asset tags to return (not inclusive) 269 * @return the range of asset tags 270 * @throws SystemException if a system exception occurred 271 */ 272 public java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 273 int start, int end) 274 throws com.liferay.portal.kernel.exception.SystemException; 275 276 /** 277 * Finds an ordered range of all the asset tags. 278 * 279 * <p> 280 * 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. 281 * </p> 282 * 283 * @param start the lower bound of the range of asset tags to return 284 * @param end the upper bound of the range of asset tags to return (not inclusive) 285 * @param orderByComparator the comparator to order the results by 286 * @return the ordered range of asset tags 287 * @throws SystemException if a system exception occurred 288 */ 289 public java.util.List<com.liferay.portlet.asset.model.AssetTag> findAll( 290 int start, int end, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException; 293 294 /** 295 * Removes all the asset tags where groupId = ? from the database. 296 * 297 * @param groupId the group id to search with 298 * @throws SystemException if a system exception occurred 299 */ 300 public void removeByGroupId(long groupId) 301 throws com.liferay.portal.kernel.exception.SystemException; 302 303 /** 304 * Removes all the asset tags from the database. 305 * 306 * @throws SystemException if a system exception occurred 307 */ 308 public void removeAll() 309 throws com.liferay.portal.kernel.exception.SystemException; 310 311 /** 312 * Counts all the asset tags where groupId = ?. 313 * 314 * @param groupId the group id to search with 315 * @return the number of matching asset tags 316 * @throws SystemException if a system exception occurred 317 */ 318 public int countByGroupId(long groupId) 319 throws com.liferay.portal.kernel.exception.SystemException; 320 321 /** 322 * Filters by the user's permissions and counts all the asset tags where groupId = ?. 323 * 324 * @param groupId the group id to search with 325 * @return the number of matching asset tags that the user has permission to view 326 * @throws SystemException if a system exception occurred 327 */ 328 public int filterCountByGroupId(long groupId) 329 throws com.liferay.portal.kernel.exception.SystemException; 330 331 /** 332 * Counts all the asset tags. 333 * 334 * @return the number of asset tags 335 * @throws SystemException if a system exception occurred 336 */ 337 public int countAll() 338 throws com.liferay.portal.kernel.exception.SystemException; 339 340 /** 341 * Gets all the asset entries associated with the asset tag. 342 * 343 * @param pk the primary key of the asset tag to get the associated asset entries for 344 * @return the asset entries associated with the asset tag 345 * @throws SystemException if a system exception occurred 346 */ 347 public java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 348 long pk) throws com.liferay.portal.kernel.exception.SystemException; 349 350 /** 351 * Gets a range of all the asset entries associated with the asset tag. 352 * 353 * <p> 354 * 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. 355 * </p> 356 * 357 * @param pk the primary key of the asset tag to get the associated asset entries for 358 * @param start the lower bound of the range of asset tags to return 359 * @param end the upper bound of the range of asset tags to return (not inclusive) 360 * @return the range of asset entries associated with the asset tag 361 * @throws SystemException if a system exception occurred 362 */ 363 public java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 364 long pk, int start, int end) 365 throws com.liferay.portal.kernel.exception.SystemException; 366 367 /** 368 * Gets an ordered range of all the asset entries associated with the asset tag. 369 * 370 * <p> 371 * 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. 372 * </p> 373 * 374 * @param pk the primary key of the asset tag to get the associated asset entries for 375 * @param start the lower bound of the range of asset tags to return 376 * @param end the upper bound of the range of asset tags to return (not inclusive) 377 * @param orderByComparator the comparator to order the results by 378 * @return the ordered range of asset entries associated with the asset tag 379 * @throws SystemException if a system exception occurred 380 */ 381 public java.util.List<com.liferay.portlet.asset.model.AssetEntry> getAssetEntries( 382 long pk, int start, int end, 383 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 384 throws com.liferay.portal.kernel.exception.SystemException; 385 386 /** 387 * Gets the number of asset entries associated with the asset tag. 388 * 389 * @param pk the primary key of the asset tag to get the number of associated asset entries for 390 * @return the number of asset entries associated with the asset tag 391 * @throws SystemException if a system exception occurred 392 */ 393 public int getAssetEntriesSize(long pk) 394 throws com.liferay.portal.kernel.exception.SystemException; 395 396 /** 397 * Determines whether the asset entry is associated with the asset tag. 398 * 399 * @param pk the primary key of the asset tag 400 * @param assetEntryPK the primary key of the asset entry 401 * @return whether the asset entry is associated with the asset tag 402 * @throws SystemException if a system exception occurred 403 */ 404 public boolean containsAssetEntry(long pk, long assetEntryPK) 405 throws com.liferay.portal.kernel.exception.SystemException; 406 407 /** 408 * Determines whether the asset tag has any asset entries associated with it. 409 * 410 * @param pk the primary key of the asset tag to check for associations with asset entries 411 * @return whether the asset tag has any asset entries associated with it 412 * @throws SystemException if a system exception occurred 413 */ 414 public boolean containsAssetEntries(long pk) 415 throws com.liferay.portal.kernel.exception.SystemException; 416 417 /** 418 * Adds an association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 419 * 420 * @param pk the primary key of the asset tag 421 * @param assetEntryPK the primary key of the asset entry 422 * @throws SystemException if a system exception occurred 423 */ 424 public void addAssetEntry(long pk, long assetEntryPK) 425 throws com.liferay.portal.kernel.exception.SystemException; 426 427 /** 428 * Adds an association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 429 * 430 * @param pk the primary key of the asset tag 431 * @param assetEntry the asset entry 432 * @throws SystemException if a system exception occurred 433 */ 434 public void addAssetEntry(long pk, 435 com.liferay.portlet.asset.model.AssetEntry assetEntry) 436 throws com.liferay.portal.kernel.exception.SystemException; 437 438 /** 439 * Adds an association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 440 * 441 * @param pk the primary key of the asset tag 442 * @param assetEntryPKs the primary keys of the asset entries 443 * @throws SystemException if a system exception occurred 444 */ 445 public void addAssetEntries(long pk, long[] assetEntryPKs) 446 throws com.liferay.portal.kernel.exception.SystemException; 447 448 /** 449 * Adds an association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 450 * 451 * @param pk the primary key of the asset tag 452 * @param assetEntries the asset entries 453 * @throws SystemException if a system exception occurred 454 */ 455 public void addAssetEntries(long pk, 456 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 457 throws com.liferay.portal.kernel.exception.SystemException; 458 459 /** 460 * Clears all associations between the asset tag and its asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 461 * 462 * @param pk the primary key of the asset tag to clear the associated asset entries from 463 * @throws SystemException if a system exception occurred 464 */ 465 public void clearAssetEntries(long pk) 466 throws com.liferay.portal.kernel.exception.SystemException; 467 468 /** 469 * Removes the association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 470 * 471 * @param pk the primary key of the asset tag 472 * @param assetEntryPK the primary key of the asset entry 473 * @throws SystemException if a system exception occurred 474 */ 475 public void removeAssetEntry(long pk, long assetEntryPK) 476 throws com.liferay.portal.kernel.exception.SystemException; 477 478 /** 479 * Removes the association between the asset tag and the asset entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 480 * 481 * @param pk the primary key of the asset tag 482 * @param assetEntry the asset entry 483 * @throws SystemException if a system exception occurred 484 */ 485 public void removeAssetEntry(long pk, 486 com.liferay.portlet.asset.model.AssetEntry assetEntry) 487 throws com.liferay.portal.kernel.exception.SystemException; 488 489 /** 490 * Removes the association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 491 * 492 * @param pk the primary key of the asset tag 493 * @param assetEntryPKs the primary keys of the asset entries 494 * @throws SystemException if a system exception occurred 495 */ 496 public void removeAssetEntries(long pk, long[] assetEntryPKs) 497 throws com.liferay.portal.kernel.exception.SystemException; 498 499 /** 500 * Removes the association between the asset tag and the asset entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 501 * 502 * @param pk the primary key of the asset tag 503 * @param assetEntries the asset entries 504 * @throws SystemException if a system exception occurred 505 */ 506 public void removeAssetEntries(long pk, 507 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 508 throws com.liferay.portal.kernel.exception.SystemException; 509 510 /** 511 * 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. 512 * 513 * @param pk the primary key of the asset tag to set the associations for 514 * @param assetEntryPKs the primary keys of the asset entries to be associated with the asset tag 515 * @throws SystemException if a system exception occurred 516 */ 517 public void setAssetEntries(long pk, long[] assetEntryPKs) 518 throws com.liferay.portal.kernel.exception.SystemException; 519 520 /** 521 * 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. 522 * 523 * @param pk the primary key of the asset tag to set the associations for 524 * @param assetEntries the asset entries to be associated with the asset tag 525 * @throws SystemException if a system exception occurred 526 */ 527 public void setAssetEntries(long pk, 528 java.util.List<com.liferay.portlet.asset.model.AssetEntry> assetEntries) 529 throws com.liferay.portal.kernel.exception.SystemException; 530 }