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