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