001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.asset.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.service.ServiceWrapper; 020 021 /** 022 * Provides a wrapper for {@link AssetLinkLocalService}. 023 * 024 * @author Brian Wing Shun Chan 025 * @see AssetLinkLocalService 026 * @generated 027 */ 028 @ProviderType 029 public class AssetLinkLocalServiceWrapper implements AssetLinkLocalService, 030 ServiceWrapper<AssetLinkLocalService> { 031 public AssetLinkLocalServiceWrapper( 032 AssetLinkLocalService assetLinkLocalService) { 033 _assetLinkLocalService = assetLinkLocalService; 034 } 035 036 /** 037 * Adds the asset link to the database. Also notifies the appropriate model listeners. 038 * 039 * @param assetLink the asset link 040 * @return the asset link that was added 041 * @throws SystemException if a system exception occurred 042 */ 043 @Override 044 public com.liferay.portlet.asset.model.AssetLink addAssetLink( 045 com.liferay.portlet.asset.model.AssetLink assetLink) 046 throws com.liferay.portal.kernel.exception.SystemException { 047 return _assetLinkLocalService.addAssetLink(assetLink); 048 } 049 050 /** 051 * Creates a new asset link with the primary key. Does not add the asset link to the database. 052 * 053 * @param linkId the primary key for the new asset link 054 * @return the new asset link 055 */ 056 @Override 057 public com.liferay.portlet.asset.model.AssetLink createAssetLink( 058 long linkId) { 059 return _assetLinkLocalService.createAssetLink(linkId); 060 } 061 062 /** 063 * Deletes the asset link with the primary key from the database. Also notifies the appropriate model listeners. 064 * 065 * @param linkId the primary key of the asset link 066 * @return the asset link that was removed 067 * @throws PortalException if a asset link with the primary key could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 @Override 071 public com.liferay.portlet.asset.model.AssetLink deleteAssetLink( 072 long linkId) 073 throws com.liferay.portal.kernel.exception.PortalException, 074 com.liferay.portal.kernel.exception.SystemException { 075 return _assetLinkLocalService.deleteAssetLink(linkId); 076 } 077 078 /** 079 * Deletes the asset link from the database. Also notifies the appropriate model listeners. 080 * 081 * @param assetLink the asset link 082 * @return the asset link that was removed 083 * @throws SystemException if a system exception occurred 084 */ 085 @Override 086 public com.liferay.portlet.asset.model.AssetLink deleteAssetLink( 087 com.liferay.portlet.asset.model.AssetLink assetLink) 088 throws com.liferay.portal.kernel.exception.SystemException { 089 return _assetLinkLocalService.deleteAssetLink(assetLink); 090 } 091 092 @Override 093 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 094 return _assetLinkLocalService.dynamicQuery(); 095 } 096 097 /** 098 * Performs a dynamic query on the database and returns the matching rows. 099 * 100 * @param dynamicQuery the dynamic query 101 * @return the matching rows 102 * @throws SystemException if a system exception occurred 103 */ 104 @Override 105 @SuppressWarnings("rawtypes") 106 public java.util.List dynamicQuery( 107 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 108 throws com.liferay.portal.kernel.exception.SystemException { 109 return _assetLinkLocalService.dynamicQuery(dynamicQuery); 110 } 111 112 /** 113 * Performs a dynamic query on the database and returns a range of the matching rows. 114 * 115 * <p> 116 * 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.AssetLinkModelImpl}. 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. 117 * </p> 118 * 119 * @param dynamicQuery the dynamic query 120 * @param start the lower bound of the range of model instances 121 * @param end the upper bound of the range of model instances (not inclusive) 122 * @return the range of matching rows 123 * @throws SystemException if a system exception occurred 124 */ 125 @Override 126 @SuppressWarnings("rawtypes") 127 public java.util.List dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 129 int end) throws com.liferay.portal.kernel.exception.SystemException { 130 return _assetLinkLocalService.dynamicQuery(dynamicQuery, start, end); 131 } 132 133 /** 134 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 135 * 136 * <p> 137 * 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.AssetLinkModelImpl}. 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. 138 * </p> 139 * 140 * @param dynamicQuery the dynamic query 141 * @param start the lower bound of the range of model instances 142 * @param end the upper bound of the range of model instances (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 144 * @return the ordered range of matching rows 145 * @throws SystemException if a system exception occurred 146 */ 147 @Override 148 @SuppressWarnings("rawtypes") 149 public java.util.List dynamicQuery( 150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 151 int end, 152 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 153 throws com.liferay.portal.kernel.exception.SystemException { 154 return _assetLinkLocalService.dynamicQuery(dynamicQuery, start, end, 155 orderByComparator); 156 } 157 158 /** 159 * Returns the number of rows that match the dynamic query. 160 * 161 * @param dynamicQuery the dynamic query 162 * @return the number of rows that match the dynamic query 163 * @throws SystemException if a system exception occurred 164 */ 165 @Override 166 public long dynamicQueryCount( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 168 throws com.liferay.portal.kernel.exception.SystemException { 169 return _assetLinkLocalService.dynamicQueryCount(dynamicQuery); 170 } 171 172 /** 173 * Returns the number of rows that match the dynamic query. 174 * 175 * @param dynamicQuery the dynamic query 176 * @param projection the projection to apply to the query 177 * @return the number of rows that match the dynamic query 178 * @throws SystemException if a system exception occurred 179 */ 180 @Override 181 public long dynamicQueryCount( 182 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 183 com.liferay.portal.kernel.dao.orm.Projection projection) 184 throws com.liferay.portal.kernel.exception.SystemException { 185 return _assetLinkLocalService.dynamicQueryCount(dynamicQuery, projection); 186 } 187 188 @Override 189 public com.liferay.portlet.asset.model.AssetLink fetchAssetLink(long linkId) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return _assetLinkLocalService.fetchAssetLink(linkId); 192 } 193 194 /** 195 * Returns the asset link with the primary key. 196 * 197 * @param linkId the primary key of the asset link 198 * @return the asset link 199 * @throws PortalException if a asset link with the primary key could not be found 200 * @throws SystemException if a system exception occurred 201 */ 202 @Override 203 public com.liferay.portlet.asset.model.AssetLink getAssetLink(long linkId) 204 throws com.liferay.portal.kernel.exception.PortalException, 205 com.liferay.portal.kernel.exception.SystemException { 206 return _assetLinkLocalService.getAssetLink(linkId); 207 } 208 209 @Override 210 public com.liferay.portal.model.PersistedModel getPersistedModel( 211 java.io.Serializable primaryKeyObj) 212 throws com.liferay.portal.kernel.exception.PortalException, 213 com.liferay.portal.kernel.exception.SystemException { 214 return _assetLinkLocalService.getPersistedModel(primaryKeyObj); 215 } 216 217 /** 218 * Returns a range of all the asset links. 219 * 220 * <p> 221 * 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.AssetLinkModelImpl}. 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. 222 * </p> 223 * 224 * @param start the lower bound of the range of asset links 225 * @param end the upper bound of the range of asset links (not inclusive) 226 * @return the range of asset links 227 * @throws SystemException if a system exception occurred 228 */ 229 @Override 230 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getAssetLinks( 231 int start, int end) 232 throws com.liferay.portal.kernel.exception.SystemException { 233 return _assetLinkLocalService.getAssetLinks(start, end); 234 } 235 236 /** 237 * Returns the number of asset links. 238 * 239 * @return the number of asset links 240 * @throws SystemException if a system exception occurred 241 */ 242 @Override 243 public int getAssetLinksCount() 244 throws com.liferay.portal.kernel.exception.SystemException { 245 return _assetLinkLocalService.getAssetLinksCount(); 246 } 247 248 /** 249 * Updates the asset link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 250 * 251 * @param assetLink the asset link 252 * @return the asset link that was updated 253 * @throws SystemException if a system exception occurred 254 */ 255 @Override 256 public com.liferay.portlet.asset.model.AssetLink updateAssetLink( 257 com.liferay.portlet.asset.model.AssetLink assetLink) 258 throws com.liferay.portal.kernel.exception.SystemException { 259 return _assetLinkLocalService.updateAssetLink(assetLink); 260 } 261 262 /** 263 * Returns the Spring bean ID for this bean. 264 * 265 * @return the Spring bean ID for this bean 266 */ 267 @Override 268 public java.lang.String getBeanIdentifier() { 269 return _assetLinkLocalService.getBeanIdentifier(); 270 } 271 272 /** 273 * Sets the Spring bean ID for this bean. 274 * 275 * @param beanIdentifier the Spring bean ID for this bean 276 */ 277 @Override 278 public void setBeanIdentifier(java.lang.String beanIdentifier) { 279 _assetLinkLocalService.setBeanIdentifier(beanIdentifier); 280 } 281 282 /** 283 * Adds a new asset link. 284 * 285 * @param userId the primary key of the link's creator 286 * @param entryId1 the primary key of the first asset entry 287 * @param entryId2 the primary key of the second asset entry 288 * @param type the link type. Acceptable values include {@link 289 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 290 which is a bidirectional relationship and {@link 291 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 292 which is a unidirectional relationship. For more information see 293 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 294 * @param weight the weight of the relationship, allowing precedence 295 ordering of links 296 * @return the asset link 297 * @throws PortalException if the user could not be found 298 * @throws SystemException if a system exception occurred 299 */ 300 @Override 301 public com.liferay.portlet.asset.model.AssetLink addLink(long userId, 302 long entryId1, long entryId2, int type, int weight) 303 throws com.liferay.portal.kernel.exception.PortalException, 304 com.liferay.portal.kernel.exception.SystemException { 305 return _assetLinkLocalService.addLink(userId, entryId1, entryId2, type, 306 weight); 307 } 308 309 /** 310 * Deletes the asset link. 311 * 312 * @param link the asset link 313 * @throws SystemException if a system exception occurred 314 */ 315 @Override 316 public void deleteLink(com.liferay.portlet.asset.model.AssetLink link) 317 throws com.liferay.portal.kernel.exception.SystemException { 318 _assetLinkLocalService.deleteLink(link); 319 } 320 321 /** 322 * Deletes the asset link. 323 * 324 * @param linkId the primary key of the asset link 325 * @throws PortalException if the asset link could not be found 326 * @throws SystemException if a system exception occurred 327 */ 328 @Override 329 public void deleteLink(long linkId) 330 throws com.liferay.portal.kernel.exception.PortalException, 331 com.liferay.portal.kernel.exception.SystemException { 332 _assetLinkLocalService.deleteLink(linkId); 333 } 334 335 /** 336 * Deletes all links associated with the asset entry. 337 * 338 * @param entryId the primary key of the asset entry 339 * @throws SystemException if a system exception occurred 340 */ 341 @Override 342 public void deleteLinks(long entryId) 343 throws com.liferay.portal.kernel.exception.SystemException { 344 _assetLinkLocalService.deleteLinks(entryId); 345 } 346 347 /** 348 * Delete all links that associate the two asset entries. 349 * 350 * @param entryId1 the primary key of the first asset entry 351 * @param entryId2 the primary key of the second asset entry 352 * @throws SystemException if a system exception occurred 353 */ 354 @Override 355 public void deleteLinks(long entryId1, long entryId2) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 _assetLinkLocalService.deleteLinks(entryId1, entryId2); 358 } 359 360 /** 361 * Returns all the asset links whose first entry ID is the given entry ID. 362 * 363 * @param entryId the primary key of the asset entry 364 * @return the asset links whose first entry ID is the given entry ID 365 * @throws SystemException if a system exception occurred 366 */ 367 @Override 368 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getDirectLinks( 369 long entryId) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return _assetLinkLocalService.getDirectLinks(entryId); 372 } 373 374 @Override 375 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getDirectLinks( 376 long entryId, boolean excludeInvisibleLinks) 377 throws com.liferay.portal.kernel.exception.SystemException { 378 return _assetLinkLocalService.getDirectLinks(entryId, 379 excludeInvisibleLinks); 380 } 381 382 /** 383 * Returns all the asset links of the given link type whose first entry ID 384 * is the given entry ID. 385 * 386 * @param entryId the primary key of the asset entry 387 * @param typeId the link type. Acceptable values include {@link 388 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 389 which is a bidirectional relationship and {@link 390 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 391 which is a unidirectional relationship. For more information see 392 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 393 * @return the asset links of the given link type whose first entry ID is 394 the given entry ID 395 * @throws SystemException if a system exception occurred 396 */ 397 @Override 398 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getDirectLinks( 399 long entryId, int typeId) 400 throws com.liferay.portal.kernel.exception.SystemException { 401 return _assetLinkLocalService.getDirectLinks(entryId, typeId); 402 } 403 404 @Override 405 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getDirectLinks( 406 long entryId, int typeId, boolean excludeInvisibleLinks) 407 throws com.liferay.portal.kernel.exception.SystemException { 408 return _assetLinkLocalService.getDirectLinks(entryId, typeId, 409 excludeInvisibleLinks); 410 } 411 412 /** 413 * Returns all the asset links whose first or second entry ID is the given 414 * entry ID. 415 * 416 * @param entryId the primary key of the asset entry 417 * @return the asset links whose first or second entry ID is the given entry 418 ID 419 * @throws SystemException if a system exception occurred 420 */ 421 @Override 422 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getLinks( 423 long entryId) 424 throws com.liferay.portal.kernel.exception.SystemException { 425 return _assetLinkLocalService.getLinks(entryId); 426 } 427 428 /** 429 * Returns all the asset links of the given link type whose first or second 430 * entry ID is the given entry ID. 431 * 432 * @param entryId the primary key of the asset entry 433 * @param typeId the link type. Acceptable values include {@link 434 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 435 which is a bidirectional relationship and {@link 436 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 437 which is a unidirectional relationship. For more information see 438 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 439 * @return the asset links of the given link type whose first or second 440 entry ID is the given entry ID 441 * @throws SystemException if a system exception occurred 442 */ 443 @Override 444 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getLinks( 445 long entryId, int typeId) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 return _assetLinkLocalService.getLinks(entryId, typeId); 448 } 449 450 /** 451 * Returns all the asset links of the given link type whose second entry ID 452 * is the given entry ID. 453 * 454 * @param entryId the primary key of the asset entry 455 * @param typeId the link type. Acceptable values include {@link 456 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 457 which is a bidirectional relationship and {@link 458 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 459 which is a unidirectional relationship. For more information see 460 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 461 * @return the asset links of the given link type whose second entry ID is 462 the given entry ID 463 * @throws SystemException if a system exception occurred 464 */ 465 @Override 466 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getReverseLinks( 467 long entryId, int typeId) 468 throws com.liferay.portal.kernel.exception.SystemException { 469 return _assetLinkLocalService.getReverseLinks(entryId, typeId); 470 } 471 472 @Override 473 public com.liferay.portlet.asset.model.AssetLink updateLink(long userId, 474 long entryId1, long entryId2, int typeId, int weight) 475 throws com.liferay.portal.kernel.exception.PortalException, 476 com.liferay.portal.kernel.exception.SystemException { 477 return _assetLinkLocalService.updateLink(userId, entryId1, entryId2, 478 typeId, weight); 479 } 480 481 /** 482 * Updates all links of the asset entry, replacing them with links 483 * associating the asset entry with the asset entries of the given link 484 * entry IDs. 485 * 486 * <p> 487 * If no link exists with a given link entry ID, a new link is created 488 * associating the current asset entry with the asset entry of that link 489 * entry ID. An existing link is deleted if either of its entry IDs is not 490 * contained in the given link entry IDs. 491 * </p> 492 * 493 * @param userId the primary key of the user updating the links 494 * @param entryId the primary key of the asset entry to be managed 495 * @param linkEntryIds the primary keys of the asset entries to be linked 496 with the asset entry to be managed 497 * @param typeId the type of the asset links to be created. Acceptable 498 values include {@link 499 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 500 which is a bidirectional relationship and {@link 501 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 502 which is a unidirectional relationship. For more information see 503 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 504 * @throws PortalException if the user could not be found 505 * @throws SystemException if a system exception occurred 506 */ 507 @Override 508 public void updateLinks(long userId, long entryId, long[] linkEntryIds, 509 int typeId) 510 throws com.liferay.portal.kernel.exception.PortalException, 511 com.liferay.portal.kernel.exception.SystemException { 512 _assetLinkLocalService.updateLinks(userId, entryId, linkEntryIds, typeId); 513 } 514 515 /** 516 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 517 */ 518 public AssetLinkLocalService getWrappedAssetLinkLocalService() { 519 return _assetLinkLocalService; 520 } 521 522 /** 523 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 524 */ 525 public void setWrappedAssetLinkLocalService( 526 AssetLinkLocalService assetLinkLocalService) { 527 _assetLinkLocalService = assetLinkLocalService; 528 } 529 530 @Override 531 public AssetLinkLocalService getWrappedService() { 532 return _assetLinkLocalService; 533 } 534 535 @Override 536 public void setWrappedService(AssetLinkLocalService assetLinkLocalService) { 537 _assetLinkLocalService = assetLinkLocalService; 538 } 539 540 private AssetLinkLocalService _assetLinkLocalService; 541 }