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