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 DDMStructureLink. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLinkLocalServiceImpl} 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 DDMStructureLinkLocalService
032     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureLinkLocalServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLinkLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDMStructureLinkLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the d d m structure link to the database. Also notifies the appropriate model listeners.
046            *
047            * @param ddmStructureLink the d d m structure link
048            * @return the d d m structure link that was added
049            */
050            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink addDDMStructureLink(
051                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink) {
052                    return getService().addDDMStructureLink(ddmStructureLink);
053            }
054    
055            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink addStructureLink(
056                    long classNameId, long classPK, long structureId,
057                    com.liferay.portal.service.ServiceContext serviceContext) {
058                    return getService()
059                                       .addStructureLink(classNameId, classPK, structureId,
060                            serviceContext);
061            }
062    
063            /**
064            * Creates a new d d m structure link with the primary key. Does not add the d d m structure link to the database.
065            *
066            * @param structureLinkId the primary key for the new d d m structure link
067            * @return the new d d m structure link
068            */
069            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink createDDMStructureLink(
070                    long structureLinkId) {
071                    return getService().createDDMStructureLink(structureLinkId);
072            }
073    
074            public static void deleteClassStructureLink(long classPK)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    getService().deleteClassStructureLink(classPK);
077            }
078    
079            /**
080            * Deletes the d d m structure link from the database. Also notifies the appropriate model listeners.
081            *
082            * @param ddmStructureLink the d d m structure link
083            * @return the d d m structure link that was removed
084            */
085            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink deleteDDMStructureLink(
086                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink) {
087                    return getService().deleteDDMStructureLink(ddmStructureLink);
088            }
089    
090            /**
091            * Deletes the d d m structure link with the primary key from the database. Also notifies the appropriate model listeners.
092            *
093            * @param structureLinkId the primary key of the d d m structure link
094            * @return the d d m structure link that was removed
095            * @throws PortalException if a d d m structure link with the primary key could not be found
096            */
097            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink deleteDDMStructureLink(
098                    long structureLinkId)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    return getService().deleteDDMStructureLink(structureLinkId);
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 deleteStructureLink(
113                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink structureLink) {
114                    getService().deleteStructureLink(structureLink);
115            }
116    
117            public static void deleteStructureLink(long structureLinkId)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    getService().deleteStructureLink(structureLinkId);
120            }
121    
122            public static void deleteStructureStructureLinks(long structureId) {
123                    getService().deleteStructureStructureLinks(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.DDMStructureLinkModelImpl}. 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.DDMStructureLinkModelImpl}. 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.DDMStructureLink fetchDDMStructureLink(
205                    long structureLinkId) {
206                    return getService().fetchDDMStructureLink(structureLinkId);
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.DDMStructureLink getClassStructureLink(
223                    long classPK)
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return getService().getClassStructureLink(classPK);
226            }
227    
228            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> getClassStructureLinks(
229                    long classNameId) {
230                    return getService().getClassStructureLinks(classNameId);
231            }
232    
233            /**
234            * Returns the d d m structure link with the primary key.
235            *
236            * @param structureLinkId the primary key of the d d m structure link
237            * @return the d d m structure link
238            * @throws PortalException if a d d m structure link with the primary key could not be found
239            */
240            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink getDDMStructureLink(
241                    long structureLinkId)
242                    throws com.liferay.portal.kernel.exception.PortalException {
243                    return getService().getDDMStructureLink(structureLinkId);
244            }
245    
246            /**
247            * Returns a range of all the d d m structure links.
248            *
249            * <p>
250            * 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.DDMStructureLinkModelImpl}. 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.
251            * </p>
252            *
253            * @param start the lower bound of the range of d d m structure links
254            * @param end the upper bound of the range of d d m structure links (not inclusive)
255            * @return the range of d d m structure links
256            */
257            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> getDDMStructureLinks(
258                    int start, int end) {
259                    return getService().getDDMStructureLinks(start, end);
260            }
261    
262            /**
263            * Returns the number of d d m structure links.
264            *
265            * @return the number of d d m structure links
266            */
267            public static int getDDMStructureLinksCount() {
268                    return getService().getDDMStructureLinksCount();
269            }
270    
271            public static com.liferay.portal.model.PersistedModel getPersistedModel(
272                    java.io.Serializable primaryKeyObj)
273                    throws com.liferay.portal.kernel.exception.PortalException {
274                    return getService().getPersistedModel(primaryKeyObj);
275            }
276    
277            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink getStructureLink(
278                    long structureLinkId)
279                    throws com.liferay.portal.kernel.exception.PortalException {
280                    return getService().getStructureLink(structureLinkId);
281            }
282    
283            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> getStructureLinks(
284                    long structureId, int start, int end) {
285                    return getService().getStructureLinks(structureId, start, end);
286            }
287    
288            /**
289            * Sets the Spring bean ID for this bean.
290            *
291            * @param beanIdentifier the Spring bean ID for this bean
292            */
293            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
294                    getService().setBeanIdentifier(beanIdentifier);
295            }
296    
297            /**
298            * Updates the d d m structure link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
299            *
300            * @param ddmStructureLink the d d m structure link
301            * @return the d d m structure link that was updated
302            */
303            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink updateDDMStructureLink(
304                    com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink) {
305                    return getService().updateDDMStructureLink(ddmStructureLink);
306            }
307    
308            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink updateStructureLink(
309                    long structureLinkId, long classNameId, long classPK, long structureId)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    return getService()
312                                       .updateStructureLink(structureLinkId, classNameId, classPK,
313                            structureId);
314            }
315    
316            public static DDMStructureLinkLocalService getService() {
317                    if (_service == null) {
318                            _service = (DDMStructureLinkLocalService)PortalBeanLocatorUtil.locate(DDMStructureLinkLocalService.class.getName());
319    
320                            ReferenceRegistry.registerReference(DDMStructureLinkLocalServiceUtil.class,
321                                    "_service");
322                    }
323    
324                    return _service;
325            }
326    
327            /**
328             * @deprecated As of 6.2.0
329             */
330            @Deprecated
331            public void setService(DDMStructureLinkLocalService service) {
332            }
333    
334            private static DDMStructureLinkLocalService _service;
335    }