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; 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 /** 375 * Returns all the asset links of the given link type whose first entry ID 376 * is the given entry ID. 377 * 378 * @param entryId the primary key of the asset entry 379 * @param typeId the link type. Acceptable values include {@link 380 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 381 which is a bidirectional relationship and {@link 382 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 383 which is a unidirectional relationship. For more information see 384 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 385 * @return the asset links of the given link type whose first entry ID is 386 the given entry ID 387 * @throws SystemException if a system exception occurred 388 */ 389 @Override 390 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getDirectLinks( 391 long entryId, int typeId) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 return _assetLinkLocalService.getDirectLinks(entryId, typeId); 394 } 395 396 /** 397 * Returns all the asset links whose first or second entry ID is the given 398 * entry ID. 399 * 400 * @param entryId the primary key of the asset entry 401 * @return the asset links whose first or second entry ID is the given entry 402 ID 403 * @throws SystemException if a system exception occurred 404 */ 405 @Override 406 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getLinks( 407 long entryId) 408 throws com.liferay.portal.kernel.exception.SystemException { 409 return _assetLinkLocalService.getLinks(entryId); 410 } 411 412 /** 413 * Returns all the asset links of the given link type whose first or second 414 * entry ID is the given entry ID. 415 * 416 * @param entryId the primary key of the asset entry 417 * @param typeId the link type. Acceptable values include {@link 418 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 419 which is a bidirectional relationship and {@link 420 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 421 which is a unidirectional relationship. For more information see 422 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 423 * @return the asset links of the given link type whose first or second 424 entry ID is the given entry ID 425 * @throws SystemException if a system exception occurred 426 */ 427 @Override 428 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getLinks( 429 long entryId, int typeId) 430 throws com.liferay.portal.kernel.exception.SystemException { 431 return _assetLinkLocalService.getLinks(entryId, typeId); 432 } 433 434 /** 435 * Returns all the asset links of the given link type whose second entry ID 436 * is the given entry ID. 437 * 438 * @param entryId the primary key of the asset entry 439 * @param typeId the link type. Acceptable values include {@link 440 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 441 which is a bidirectional relationship and {@link 442 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 443 which is a unidirectional relationship. For more information see 444 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 445 * @return the asset links of the given link type whose second entry ID is 446 the given entry ID 447 * @throws SystemException if a system exception occurred 448 */ 449 @Override 450 public java.util.List<com.liferay.portlet.asset.model.AssetLink> getReverseLinks( 451 long entryId, int typeId) 452 throws com.liferay.portal.kernel.exception.SystemException { 453 return _assetLinkLocalService.getReverseLinks(entryId, typeId); 454 } 455 456 @Override 457 public com.liferay.portlet.asset.model.AssetLink updateLink(long userId, 458 long entryId1, long entryId2, int typeId, int weight) 459 throws com.liferay.portal.kernel.exception.PortalException, 460 com.liferay.portal.kernel.exception.SystemException { 461 return _assetLinkLocalService.updateLink(userId, entryId1, entryId2, 462 typeId, weight); 463 } 464 465 /** 466 * Updates all links of the asset entry, replacing them with links 467 * associating the asset entry with the asset entries of the given link 468 * entry IDs. 469 * 470 * <p> 471 * If no link exists with a given link entry ID, a new link is created 472 * associating the current asset entry with the asset entry of that link 473 * entry ID. An existing link is deleted if either of its entry IDs is not 474 * contained in the given link entry IDs. 475 * </p> 476 * 477 * @param userId the primary key of the user updating the links 478 * @param entryId the primary key of the asset entry to be managed 479 * @param linkEntryIds the primary keys of the asset entries to be linked 480 with the asset entry to be managed 481 * @param typeId the type of the asset links to be created. Acceptable 482 values include {@link 483 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_RELATED} 484 which is a bidirectional relationship and {@link 485 com.liferay.portlet.asset.model.AssetLinkConstants#TYPE_CHILD} 486 which is a unidirectional relationship. For more information see 487 {@link com.liferay.portlet.asset.model.AssetLinkConstants} 488 * @throws PortalException if the user could not be found 489 * @throws SystemException if a system exception occurred 490 */ 491 @Override 492 public void updateLinks(long userId, long entryId, long[] linkEntryIds, 493 int typeId) 494 throws com.liferay.portal.kernel.exception.PortalException, 495 com.liferay.portal.kernel.exception.SystemException { 496 _assetLinkLocalService.updateLinks(userId, entryId, linkEntryIds, typeId); 497 } 498 499 /** 500 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 501 */ 502 public AssetLinkLocalService getWrappedAssetLinkLocalService() { 503 return _assetLinkLocalService; 504 } 505 506 /** 507 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 508 */ 509 public void setWrappedAssetLinkLocalService( 510 AssetLinkLocalService assetLinkLocalService) { 511 _assetLinkLocalService = assetLinkLocalService; 512 } 513 514 @Override 515 public AssetLinkLocalService getWrappedService() { 516 return _assetLinkLocalService; 517 } 518 519 @Override 520 public void setWrappedService(AssetLinkLocalService assetLinkLocalService) { 521 _assetLinkLocalService = assetLinkLocalService; 522 } 523 524 private AssetLinkLocalService _assetLinkLocalService; 525 }