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)
052                    throws com.liferay.portal.kernel.exception.PortalException;
053    
054            /**
055            * Adds the workflow definition link to the database. Also notifies the appropriate model listeners.
056            *
057            * @param workflowDefinitionLink the workflow definition link
058            * @return the workflow definition link that was added
059            */
060            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
061            public com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
062                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
063    
064            /**
065            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
066            *
067            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
068            * @return the new workflow definition link
069            */
070            public com.liferay.portal.model.WorkflowDefinitionLink createWorkflowDefinitionLink(
071                    long workflowDefinitionLinkId);
072    
073            /**
074            * @throws PortalException
075            */
076            @Override
077            public com.liferay.portal.model.PersistedModel deletePersistedModel(
078                    com.liferay.portal.model.PersistedModel persistedModel)
079                    throws com.liferay.portal.kernel.exception.PortalException;
080    
081            public void deleteWorkflowDefinitionLink(long companyId, long groupId,
082                    java.lang.String className, long classPK, long typePK);
083    
084            /**
085            * Deletes the workflow definition link from the database. Also notifies the appropriate model listeners.
086            *
087            * @param workflowDefinitionLink the workflow definition link
088            * @return the workflow definition link that was removed
089            */
090            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
091            public com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
092                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
093    
094            /**
095            * Deletes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
096            *
097            * @param workflowDefinitionLinkId the primary key of the workflow definition link
098            * @return the workflow definition link that was removed
099            * @throws PortalException if a workflow definition link with the primary key could not be found
100            */
101            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
102            public com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
103                    long workflowDefinitionLinkId)
104                    throws com.liferay.portal.kernel.exception.PortalException;
105    
106            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
107    
108            /**
109            * Performs a dynamic query on the database and returns the matching rows.
110            *
111            * @param dynamicQuery the dynamic query
112            * @return the matching rows
113            */
114            public <T> java.util.List<T> dynamicQuery(
115                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
116    
117            /**
118            * Performs a dynamic query on the database and returns a range of the matching rows.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param dynamicQuery the dynamic query
125            * @param start the lower bound of the range of model instances
126            * @param end the upper bound of the range of model instances (not inclusive)
127            * @return the range of matching rows
128            */
129            public <T> java.util.List<T> dynamicQuery(
130                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
131                    int end);
132    
133            /**
134            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
135            *
136            * <p>
137            * 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.
138            * </p>
139            *
140            * @param dynamicQuery the dynamic query
141            * @param start the lower bound of the range of model instances
142            * @param end the upper bound of the range of model instances (not inclusive)
143            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
144            * @return the ordered range of matching rows
145            */
146            public <T> java.util.List<T> dynamicQuery(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
148                    int end,
149                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
150    
151            /**
152            * Returns the number of rows matching the dynamic query.
153            *
154            * @param dynamicQuery the dynamic query
155            * @return the number of rows matching the dynamic query
156            */
157            public long dynamicQueryCount(
158                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
159    
160            /**
161            * Returns the number of rows matching the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @param projection the projection to apply to the query
165            * @return the number of rows matching the dynamic query
166            */
167            public long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
169                    com.liferay.portal.kernel.dao.orm.Projection projection);
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public com.liferay.portal.model.WorkflowDefinitionLink fetchDefaultWorkflowDefinitionLink(
173                    long companyId, java.lang.String className, long classPK, long typePK);
174    
175            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176            public com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
177                    long companyId, long groupId, java.lang.String className, long classPK,
178                    long typePK);
179    
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
182                    long companyId, long groupId, java.lang.String className, long classPK,
183                    long typePK, boolean strict);
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
187                    long workflowDefinitionLinkId);
188    
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
191    
192            /**
193            * Returns the Spring bean ID for this bean.
194            *
195            * @return the Spring bean ID for this bean
196            */
197            public java.lang.String getBeanIdentifier();
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
201                    long companyId, java.lang.String className, long classPK, long typePK)
202                    throws com.liferay.portal.kernel.exception.PortalException;
203    
204            @Override
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public com.liferay.portal.model.PersistedModel getPersistedModel(
207                    java.io.Serializable primaryKeyObj)
208                    throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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)
219                    throws com.liferay.portal.kernel.exception.PortalException;
220    
221            /**
222            * Returns the workflow definition link with the primary key.
223            *
224            * @param workflowDefinitionLinkId the primary key of the workflow definition link
225            * @return the workflow definition link
226            * @throws PortalException if a workflow definition link with the primary key could not be found
227            */
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
230                    long workflowDefinitionLinkId)
231                    throws com.liferay.portal.kernel.exception.PortalException;
232    
233            /**
234            * Returns a range of all the workflow definition links.
235            *
236            * <p>
237            * 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.
238            * </p>
239            *
240            * @param start the lower bound of the range of workflow definition links
241            * @param end the upper bound of the range of workflow definition links (not inclusive)
242            * @return the range of workflow definition links
243            */
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
246                    int start, int end);
247    
248            /**
249            * Returns the number of workflow definition links.
250            *
251            * @return the number of workflow definition links
252            */
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public int getWorkflowDefinitionLinksCount();
255    
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public int getWorkflowDefinitionLinksCount(long companyId, long groupId,
258                    java.lang.String className);
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public int getWorkflowDefinitionLinksCount(long companyId,
262                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion);
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);
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);
273    
274            @com.liferay.portal.kernel.spring.aop.Skip
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public boolean hasWorkflowDefinitionLink(long companyId, long groupId,
277                    java.lang.String className, long classPK, long typePK);
278    
279            /**
280            * Sets the Spring bean ID for this bean.
281            *
282            * @param beanIdentifier the Spring bean ID for this bean
283            */
284            public void setBeanIdentifier(java.lang.String beanIdentifier);
285    
286            public void updateWorkflowDefinitionLink(long userId, long companyId,
287                    long groupId, java.lang.String className, long classPK, long typePK,
288                    java.lang.String workflowDefinition)
289                    throws com.liferay.portal.kernel.exception.PortalException;
290    
291            public com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
292                    long userId, long companyId, long groupId, java.lang.String className,
293                    long classPK, long typePK, java.lang.String workflowDefinitionName,
294                    int workflowDefinitionVersion)
295                    throws com.liferay.portal.kernel.exception.PortalException;
296    
297            /**
298            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
299            *
300            * @param workflowDefinitionLink the workflow definition link
301            * @return the workflow definition link that was updated
302            */
303            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
304            public com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
305                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink);
306    
307            public void updateWorkflowDefinitionLinks(long userId, long companyId,
308                    long groupId, java.lang.String className, long classPK,
309                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
310                    throws com.liferay.portal.kernel.exception.PortalException;
311    }