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                    getService().deleteClassStorageLink(classPK);
076            }
077    
078            /**
079            * Deletes the d d m storage link from the database. Also notifies the appropriate model listeners.
080            *
081            * @param ddmStorageLink the d d m storage link
082            * @return the d d m storage link that was removed
083            */
084            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink deleteDDMStorageLink(
085                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
086                    return getService().deleteDDMStorageLink(ddmStorageLink);
087            }
088    
089            /**
090            * Deletes the d d m storage link with the primary key from the database. Also notifies the appropriate model listeners.
091            *
092            * @param storageLinkId the primary key of the d d m storage link
093            * @return the d d m storage link that was removed
094            * @throws PortalException if a d d m storage link with the primary key could not be found
095            */
096            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink deleteDDMStorageLink(
097                    long storageLinkId)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().deleteDDMStorageLink(storageLinkId);
100            }
101    
102            /**
103            * @throws PortalException
104            */
105            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
106                    com.liferay.portal.model.PersistedModel persistedModel)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    return getService().deletePersistedModel(persistedModel);
109            }
110    
111            public static void deleteStorageLink(
112                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink storageLink) {
113                    getService().deleteStorageLink(storageLink);
114            }
115    
116            public static void deleteStorageLink(long storageLinkId) {
117                    getService().deleteStorageLink(storageLinkId);
118            }
119    
120            public static void deleteStructureStorageLinks(long structureId) {
121                    getService().deleteStructureStorageLinks(structureId);
122            }
123    
124            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
125                    return getService().dynamicQuery();
126            }
127    
128            /**
129            * Performs a dynamic query on the database and returns the matching rows.
130            *
131            * @param dynamicQuery the dynamic query
132            * @return the matching rows
133            */
134            public static <T> java.util.List<T> dynamicQuery(
135                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
136                    return getService().dynamicQuery(dynamicQuery);
137            }
138    
139            /**
140            * Performs a dynamic query on the database and returns a range of the matching rows.
141            *
142            * <p>
143            * 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.
144            * </p>
145            *
146            * @param dynamicQuery the dynamic query
147            * @param start the lower bound of the range of model instances
148            * @param end the upper bound of the range of model instances (not inclusive)
149            * @return the range of matching rows
150            */
151            public static <T> java.util.List<T> dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end) {
154                    return getService().dynamicQuery(dynamicQuery, start, end);
155            }
156    
157            /**
158            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
159            *
160            * <p>
161            * 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.
162            * </p>
163            *
164            * @param dynamicQuery the dynamic query
165            * @param start the lower bound of the range of model instances
166            * @param end the upper bound of the range of model instances (not inclusive)
167            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
168            * @return the ordered range of matching rows
169            */
170            public static <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
172                    int end,
173                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
174                    return getService()
175                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
176            }
177    
178            /**
179            * Returns the number of rows matching the dynamic query.
180            *
181            * @param dynamicQuery the dynamic query
182            * @return the number of rows matching the dynamic query
183            */
184            public static long dynamicQueryCount(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
186                    return getService().dynamicQueryCount(dynamicQuery);
187            }
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @param projection the projection to apply to the query
194            * @return the number of rows matching the dynamic query
195            */
196            public static long dynamicQueryCount(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
198                    com.liferay.portal.kernel.dao.orm.Projection projection) {
199                    return getService().dynamicQueryCount(dynamicQuery, projection);
200            }
201    
202            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink fetchDDMStorageLink(
203                    long storageLinkId) {
204                    return getService().fetchDDMStorageLink(storageLinkId);
205            }
206    
207            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
208                    return getService().getActionableDynamicQuery();
209            }
210    
211            /**
212            * Returns the Spring bean ID for this bean.
213            *
214            * @return the Spring bean ID for this bean
215            */
216            public static java.lang.String getBeanIdentifier() {
217                    return getService().getBeanIdentifier();
218            }
219    
220            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink getClassStorageLink(
221                    long classPK)
222                    throws com.liferay.portal.kernel.exception.PortalException {
223                    return getService().getClassStorageLink(classPK);
224            }
225    
226            /**
227            * Returns the d d m storage link with the primary key.
228            *
229            * @param storageLinkId the primary key of the d d m storage link
230            * @return the d d m storage link
231            * @throws PortalException if a d d m storage link with the primary key could not be found
232            */
233            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink getDDMStorageLink(
234                    long storageLinkId)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    return getService().getDDMStorageLink(storageLinkId);
237            }
238    
239            /**
240            * Returns a range of all the d d m storage links.
241            *
242            * <p>
243            * 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.
244            * </p>
245            *
246            * @param start the lower bound of the range of d d m storage links
247            * @param end the upper bound of the range of d d m storage links (not inclusive)
248            * @return the range of d d m storage links
249            */
250            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> getDDMStorageLinks(
251                    int start, int end) {
252                    return getService().getDDMStorageLinks(start, end);
253            }
254    
255            /**
256            * Returns the number of d d m storage links.
257            *
258            * @return the number of d d m storage links
259            */
260            public static int getDDMStorageLinksCount() {
261                    return getService().getDDMStorageLinksCount();
262            }
263    
264            public static com.liferay.portal.model.PersistedModel getPersistedModel(
265                    java.io.Serializable primaryKeyObj)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    return getService().getPersistedModel(primaryKeyObj);
268            }
269    
270            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink getStorageLink(
271                    long storageLinkId)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    return getService().getStorageLink(storageLinkId);
274            }
275    
276            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> getStructureStorageLinks(
277                    long structureId) {
278                    return getService().getStructureStorageLinks(structureId);
279            }
280    
281            public static int getStructureStorageLinksCount(long structureId) {
282                    return getService().getStructureStorageLinksCount(structureId);
283            }
284    
285            /**
286            * Sets the Spring bean ID for this bean.
287            *
288            * @param beanIdentifier the Spring bean ID for this bean
289            */
290            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
291                    getService().setBeanIdentifier(beanIdentifier);
292            }
293    
294            /**
295            * 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.
296            *
297            * @param ddmStorageLink the d d m storage link
298            * @return the d d m storage link that was updated
299            */
300            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink updateDDMStorageLink(
301                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
302                    return getService().updateDDMStorageLink(ddmStorageLink);
303            }
304    
305            public static com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink updateStorageLink(
306                    long storageLinkId, long classNameId, long classPK)
307                    throws com.liferay.portal.kernel.exception.PortalException {
308                    return getService()
309                                       .updateStorageLink(storageLinkId, classNameId, classPK);
310            }
311    
312            public static DDMStorageLinkLocalService getService() {
313                    if (_service == null) {
314                            _service = (DDMStorageLinkLocalService)PortalBeanLocatorUtil.locate(DDMStorageLinkLocalService.class.getName());
315    
316                            ReferenceRegistry.registerReference(DDMStorageLinkLocalServiceUtil.class,
317                                    "_service");
318                    }
319    
320                    return _service;
321            }
322    
323            /**
324             * @deprecated As of 6.2.0
325             */
326            @Deprecated
327            public void setService(DDMStorageLinkLocalService service) {
328            }
329    
330            private static DDMStorageLinkLocalService _service;
331    }