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            /**
191            * Returns the Spring bean ID for this bean.
192            *
193            * @return the Spring bean ID for this bean
194            */
195            public java.lang.String getBeanIdentifier();
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
199                    long companyId, java.lang.String className, long classPK, long typePK)
200                    throws PortalException;
201    
202            @Override
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public com.liferay.portal.model.PersistedModel getPersistedModel(
205                    java.io.Serializable primaryKeyObj) throws PortalException;
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
209                    long companyId, long groupId, java.lang.String className, long classPK,
210                    long typePK) throws PortalException;
211    
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
214                    long companyId, long groupId, java.lang.String className, long classPK,
215                    long typePK, boolean strict) throws PortalException;
216    
217            /**
218            * Returns the workflow definition link with the primary key.
219            *
220            * @param workflowDefinitionLinkId the primary key of the workflow definition link
221            * @return the workflow definition link
222            * @throws PortalException if a workflow definition link with the primary key could not be found
223            */
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
226                    long workflowDefinitionLinkId) throws PortalException;
227    
228            /**
229            * Returns a range of all the workflow definition links.
230            *
231            * <p>
232            * 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.
233            * </p>
234            *
235            * @param start the lower bound of the range of workflow definition links
236            * @param end the upper bound of the range of workflow definition links (not inclusive)
237            * @return the range of workflow definition links
238            */
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
241                    int start, int end);
242    
243            /**
244            * Returns the number of workflow definition links.
245            *
246            * @return the number of workflow definition links
247            */
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public int getWorkflowDefinitionLinksCount();
250    
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public int getWorkflowDefinitionLinksCount(long companyId, long groupId,
253                    java.lang.String className);
254    
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public int getWorkflowDefinitionLinksCount(long companyId,
257                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion);
258    
259            @com.liferay.portal.kernel.spring.aop.Skip
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
262                    java.lang.String className);
263    
264            @com.liferay.portal.kernel.spring.aop.Skip
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
267                    java.lang.String className, long classPK);
268    
269            @com.liferay.portal.kernel.spring.aop.Skip
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
272                    java.lang.String className, long classPK, long typePK);
273    
274            /**
275            * Sets the Spring bean ID for this bean.
276            *
277            * @param beanIdentifier the Spring bean ID for this bean
278            */
279            public void setBeanIdentifier(java.lang.String beanIdentifier);
280    
281            public void updateWorkflowDefinitionLink(long userId, long companyId,
282                    long groupId, java.lang.String className, long classPK, long typePK,
283                    java.lang.String workflowDefinition) throws PortalException;
284    
285            public com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
286                    long userId, long companyId, long groupId, java.lang.String className,
287                    long classPK, long typePK, java.lang.String workflowDefinitionName,
288                    int workflowDefinitionVersion) throws PortalException;
289    
290            /**
291            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
292            *
293            * @param workflowDefinitionLink the workflow definition link
294            * @return the workflow definition link that was updated
295            */
296            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
297            public com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
298                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
299    
300            public void updateWorkflowDefinitionLinks(long userId, long companyId,
301                    long groupId, java.lang.String className, long classPK,
302                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
303                    throws PortalException;
304    }