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.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for WorkflowDefinitionLink. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see WorkflowDefinitionLinkLocalServiceUtil
034     * @see com.liferay.portal.service.base.WorkflowDefinitionLinkLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface WorkflowDefinitionLinkLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link WorkflowDefinitionLinkLocalServiceUtil} to access the workflow definition link local service. Add custom service methods to {@link com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048            public com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
049                    long userId, long companyId, long groupId, java.lang.String className,
050                    long classPK, long typePK, java.lang.String workflowDefinitionName,
051                    int workflowDefinitionVersion) throws PortalException;
052    
053            /**
054            * Adds the workflow definition link to the database. Also notifies the appropriate model listeners.
055            *
056            * @param workflowDefinitionLink the workflow definition link
057            * @return the workflow definition link that was added
058            */
059            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
060            public com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
061                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
062    
063            /**
064            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
065            *
066            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
067            * @return the new workflow definition link
068            */
069            public com.liferay.portal.model.WorkflowDefinitionLink createWorkflowDefinitionLink(
070                    long workflowDefinitionLinkId);
071    
072            /**
073            * @throws PortalException
074            */
075            @Override
076            public com.liferay.portal.model.PersistedModel deletePersistedModel(
077                    com.liferay.portal.model.PersistedModel persistedModel)
078                    throws PortalException;
079    
080            public void deleteWorkflowDefinitionLink(long companyId, long groupId,
081                    java.lang.String className, long classPK, long typePK);
082    
083            /**
084            * Deletes the workflow definition link from the database. Also notifies the appropriate model listeners.
085            *
086            * @param workflowDefinitionLink the workflow definition link
087            * @return the workflow definition link that was removed
088            */
089            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
090            public com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
091                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
092    
093            /**
094            * Deletes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
095            *
096            * @param workflowDefinitionLinkId the primary key of the workflow definition link
097            * @return the workflow definition link that was removed
098            * @throws PortalException if a workflow definition link with the primary key could not be found
099            */
100            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
101            public com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
102                    long workflowDefinitionLinkId) throws PortalException;
103    
104            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
105    
106            /**
107            * Performs a dynamic query on the database and returns the matching rows.
108            *
109            * @param dynamicQuery the dynamic query
110            * @return the matching rows
111            */
112            public <T> java.util.List<T> dynamicQuery(
113                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
114    
115            /**
116            * Performs a dynamic query on the database and returns a range of the matching rows.
117            *
118            * <p>
119            * 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.portal.model.impl.WorkflowDefinitionLinkModelImpl}. 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.
120            * </p>
121            *
122            * @param dynamicQuery the dynamic query
123            * @param start the lower bound of the range of model instances
124            * @param end the upper bound of the range of model instances (not inclusive)
125            * @return the range of matching rows
126            */
127            public <T> java.util.List<T> dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end);
130    
131            /**
132            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
133            *
134            * <p>
135            * 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.portal.model.impl.WorkflowDefinitionLinkModelImpl}. 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.
136            * </p>
137            *
138            * @param dynamicQuery the dynamic query
139            * @param start the lower bound of the range of model instances
140            * @param end the upper bound of the range of model instances (not inclusive)
141            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
142            * @return the ordered range of matching rows
143            */
144            public <T> java.util.List<T> dynamicQuery(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
146                    int end,
147                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
148    
149            /**
150            * Returns the number of rows matching the dynamic query.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the number of rows matching the dynamic query
154            */
155            public long dynamicQueryCount(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
157    
158            /**
159            * Returns the number of rows matching the dynamic query.
160            *
161            * @param dynamicQuery the dynamic query
162            * @param projection the projection to apply to the query
163            * @return the number of rows matching the dynamic query
164            */
165            public long dynamicQueryCount(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
167                    com.liferay.portal.kernel.dao.orm.Projection projection);
168    
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public com.liferay.portal.model.WorkflowDefinitionLink fetchDefaultWorkflowDefinitionLink(
171                    long companyId, java.lang.String className, long classPK, long typePK);
172    
173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174            public com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
175                    long companyId, long groupId, java.lang.String className, long classPK,
176                    long typePK);
177    
178            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179            public com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
180                    long companyId, long groupId, java.lang.String className, long classPK,
181                    long typePK, boolean strict);
182    
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
185                    long workflowDefinitionLinkId);
186    
187            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
189    
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
192                    long companyId, java.lang.String className, long classPK, long typePK)
193                    throws PortalException;
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
197    
198            /**
199            * Returns the OSGi service identifier.
200            *
201            * @return the OSGi service identifier
202            */
203            public java.lang.String getOSGiServiceIdentifier();
204    
205            @Override
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public com.liferay.portal.model.PersistedModel getPersistedModel(
208                    java.io.Serializable primaryKeyObj) throws PortalException;
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
212                    long companyId, long groupId, java.lang.String className, long classPK,
213                    long typePK) throws PortalException;
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
217                    long companyId, long groupId, java.lang.String className, long classPK,
218                    long typePK, boolean strict) throws PortalException;
219    
220            /**
221            * Returns the workflow definition link with the primary key.
222            *
223            * @param workflowDefinitionLinkId the primary key of the workflow definition link
224            * @return the workflow definition link
225            * @throws PortalException if a workflow definition link with the primary key could not be found
226            */
227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
229                    long workflowDefinitionLinkId) throws PortalException;
230    
231            /**
232            * Returns a range of all the workflow definition links.
233            *
234            * <p>
235            * 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.portal.model.impl.WorkflowDefinitionLinkModelImpl}. 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.
236            * </p>
237            *
238            * @param start the lower bound of the range of workflow definition links
239            * @param end the upper bound of the range of workflow definition links (not inclusive)
240            * @return the range of workflow definition links
241            */
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
244                    int start, int end);
245    
246            /**
247            * Returns the number of workflow definition links.
248            *
249            * @return the number of workflow definition links
250            */
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public int getWorkflowDefinitionLinksCount();
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public int getWorkflowDefinitionLinksCount(long companyId, long groupId,
256                    java.lang.String className);
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public int getWorkflowDefinitionLinksCount(long companyId,
260                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion);
261    
262            @com.liferay.portal.kernel.spring.aop.Skip
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
265                    java.lang.String className);
266    
267            @com.liferay.portal.kernel.spring.aop.Skip
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
270                    java.lang.String className, long classPK);
271    
272            @com.liferay.portal.kernel.spring.aop.Skip
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
275                    java.lang.String className, long classPK, long typePK);
276    
277            public void updateWorkflowDefinitionLink(long userId, long companyId,
278                    long groupId, java.lang.String className, long classPK, long typePK,
279                    java.lang.String workflowDefinition) throws PortalException;
280    
281            public com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
282                    long userId, long companyId, long groupId, java.lang.String className,
283                    long classPK, long typePK, java.lang.String workflowDefinitionName,
284                    int workflowDefinitionVersion) throws PortalException;
285    
286            /**
287            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
288            *
289            * @param workflowDefinitionLink the workflow definition link
290            * @return the workflow definition link that was updated
291            */
292            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
293            public com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
294                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
295    
296            public void updateWorkflowDefinitionLinks(long userId, long companyId,
297                    long groupId, java.lang.String className, long classPK,
298                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
299                    throws PortalException;
300    }