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