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