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