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