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