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