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