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