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