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