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