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.dynamicdatamapping.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DDMStorageLink. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStorageLinkLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DDMStorageLinkLocalService
032     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMStorageLinkLocalServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStorageLinkLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDMStorageLinkLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStorageLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the d d m storage link to the database. Also notifies the appropriate model listeners.
046            *
047            * @param ddmStorageLink the d d m storage link
048            * @return the d d m storage link that was added
049            */
050            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink addDDMStorageLink(
051                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
052                    return getService().addDDMStorageLink(ddmStorageLink);
053            }
054    
055            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink addStorageLink(
056                    long classNameId, long classPK, long structureId,
057                    com.liferay.portal.service.ServiceContext serviceContext) {
058                    return getService()
059                                       .addStorageLink(classNameId, classPK, structureId,
060                            serviceContext);
061            }
062    
063            /**
064            * Creates a new d d m storage link with the primary key. Does not add the d d m storage link to the database.
065            *
066            * @param storageLinkId the primary key for the new d d m storage link
067            * @return the new d d m storage link
068            */
069            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink createDDMStorageLink(
070                    long storageLinkId) {
071                    return getService().createDDMStorageLink(storageLinkId);
072            }
073    
074            public static void deleteClassStorageLink(long classPK)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    getService().deleteClassStorageLink(classPK);
077            }
078    
079            /**
080            * Deletes the d d m storage link from the database. Also notifies the appropriate model listeners.
081            *
082            * @param ddmStorageLink the d d m storage link
083            * @return the d d m storage link that was removed
084            */
085            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink deleteDDMStorageLink(
086                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
087                    return getService().deleteDDMStorageLink(ddmStorageLink);
088            }
089    
090            /**
091            * Deletes the d d m storage link with the primary key from the database. Also notifies the appropriate model listeners.
092            *
093            * @param storageLinkId the primary key of the d d m storage link
094            * @return the d d m storage link that was removed
095            * @throws PortalException if a d d m storage link with the primary key could not be found
096            */
097            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink deleteDDMStorageLink(
098                    long storageLinkId)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    return getService().deleteDDMStorageLink(storageLinkId);
101            }
102    
103            /**
104            * @throws PortalException
105            */
106            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
107                    com.liferay.portal.model.PersistedModel persistedModel)
108                    throws com.liferay.portal.kernel.exception.PortalException {
109                    return getService().deletePersistedModel(persistedModel);
110            }
111    
112            public static void deleteStorageLink(
113                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink storageLink) {
114                    getService().deleteStorageLink(storageLink);
115            }
116    
117            public static void deleteStorageLink(long storageLinkId)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    getService().deleteStorageLink(storageLinkId);
120            }
121    
122            public static void deleteStructureStorageLinks(long structureId) {
123                    getService().deleteStructureStorageLinks(structureId);
124            }
125    
126            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
127                    return getService().dynamicQuery();
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns the matching rows.
132            *
133            * @param dynamicQuery the dynamic query
134            * @return the matching rows
135            */
136            public static <T> java.util.List<T> dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
138                    return getService().dynamicQuery(dynamicQuery);
139            }
140    
141            /**
142            * Performs a dynamic query on the database and returns a range of the matching rows.
143            *
144            * <p>
145            * 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.dynamicdatamapping.model.impl.DDMStorageLinkModelImpl}. 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.
146            * </p>
147            *
148            * @param dynamicQuery the dynamic query
149            * @param start the lower bound of the range of model instances
150            * @param end the upper bound of the range of model instances (not inclusive)
151            * @return the range of matching rows
152            */
153            public static <T> java.util.List<T> dynamicQuery(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
155                    int end) {
156                    return getService().dynamicQuery(dynamicQuery, start, end);
157            }
158    
159            /**
160            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
161            *
162            * <p>
163            * 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.dynamicdatamapping.model.impl.DDMStorageLinkModelImpl}. 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.
164            * </p>
165            *
166            * @param dynamicQuery the dynamic query
167            * @param start the lower bound of the range of model instances
168            * @param end the upper bound of the range of model instances (not inclusive)
169            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
170            * @return the ordered range of matching rows
171            */
172            public static <T> java.util.List<T> dynamicQuery(
173                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
174                    int end,
175                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
176                    return getService()
177                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
178            }
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @return the number of rows matching the dynamic query
185            */
186            public static long dynamicQueryCount(
187                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
188                    return getService().dynamicQueryCount(dynamicQuery);
189            }
190    
191            /**
192            * Returns the number of rows matching the dynamic query.
193            *
194            * @param dynamicQuery the dynamic query
195            * @param projection the projection to apply to the query
196            * @return the number of rows matching the dynamic query
197            */
198            public static long dynamicQueryCount(
199                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
200                    com.liferay.portal.kernel.dao.orm.Projection projection) {
201                    return getService().dynamicQueryCount(dynamicQuery, projection);
202            }
203    
204            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink fetchDDMStorageLink(
205                    long storageLinkId) {
206                    return getService().fetchDDMStorageLink(storageLinkId);
207            }
208    
209            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
210                    return getService().getActionableDynamicQuery();
211            }
212    
213            /**
214            * Returns the Spring bean ID for this bean.
215            *
216            * @return the Spring bean ID for this bean
217            */
218            public static java.lang.String getBeanIdentifier() {
219                    return getService().getBeanIdentifier();
220            }
221    
222            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink getClassStorageLink(
223                    long classPK)
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return getService().getClassStorageLink(classPK);
226            }
227    
228            /**
229            * Returns the d d m storage link with the primary key.
230            *
231            * @param storageLinkId the primary key of the d d m storage link
232            * @return the d d m storage link
233            * @throws PortalException if a d d m storage link with the primary key could not be found
234            */
235            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink getDDMStorageLink(
236                    long storageLinkId)
237                    throws com.liferay.portal.kernel.exception.PortalException {
238                    return getService().getDDMStorageLink(storageLinkId);
239            }
240    
241            /**
242            * Returns a range of all the d d m storage links.
243            *
244            * <p>
245            * 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.dynamicdatamapping.model.impl.DDMStorageLinkModelImpl}. 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.
246            * </p>
247            *
248            * @param start the lower bound of the range of d d m storage links
249            * @param end the upper bound of the range of d d m storage links (not inclusive)
250            * @return the range of d d m storage links
251            */
252            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> getDDMStorageLinks(
253                    int start, int end) {
254                    return getService().getDDMStorageLinks(start, end);
255            }
256    
257            /**
258            * Returns the number of d d m storage links.
259            *
260            * @return the number of d d m storage links
261            */
262            public static int getDDMStorageLinksCount() {
263                    return getService().getDDMStorageLinksCount();
264            }
265    
266            public static com.liferay.portal.model.PersistedModel getPersistedModel(
267                    java.io.Serializable primaryKeyObj)
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    return getService().getPersistedModel(primaryKeyObj);
270            }
271    
272            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink getStorageLink(
273                    long storageLinkId)
274                    throws com.liferay.portal.kernel.exception.PortalException {
275                    return getService().getStorageLink(storageLinkId);
276            }
277    
278            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> getStructureStorageLinks(
279                    long structureId) {
280                    return getService().getStructureStorageLinks(structureId);
281            }
282    
283            public static int getStructureStorageLinksCount(long structureId) {
284                    return getService().getStructureStorageLinksCount(structureId);
285            }
286    
287            /**
288            * Sets the Spring bean ID for this bean.
289            *
290            * @param beanIdentifier the Spring bean ID for this bean
291            */
292            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
293                    getService().setBeanIdentifier(beanIdentifier);
294            }
295    
296            /**
297            * Updates the d d m storage link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
298            *
299            * @param ddmStorageLink the d d m storage link
300            * @return the d d m storage link that was updated
301            */
302            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink updateDDMStorageLink(
303                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
304                    return getService().updateDDMStorageLink(ddmStorageLink);
305            }
306    
307            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink updateStorageLink(
308                    long storageLinkId, long classNameId, long classPK)
309                    throws com.liferay.portal.kernel.exception.PortalException {
310                    return getService()
311                                       .updateStorageLink(storageLinkId, classNameId, classPK);
312            }
313    
314            public static DDMStorageLinkLocalService getService() {
315                    if (_service == null) {
316                            _service = (DDMStorageLinkLocalService)PortalBeanLocatorUtil.locate(DDMStorageLinkLocalService.class.getName());
317    
318                            ReferenceRegistry.registerReference(DDMStorageLinkLocalServiceUtil.class,
319                                    "_service");
320                    }
321    
322                    return _service;
323            }
324    
325            /**
326             * @deprecated As of 6.2.0
327             */
328            @Deprecated
329            public void setService(DDMStorageLinkLocalService service) {
330            }
331    
332            private static DDMStorageLinkLocalService _service;
333    }