001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.WorkflowDefinitionLink; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the workflow definition link service. This utility wraps {@link WorkflowDefinitionLinkPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see WorkflowDefinitionLinkPersistence 036 * @see WorkflowDefinitionLinkPersistenceImpl 037 * @generated 038 */ 039 public class WorkflowDefinitionLinkUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(WorkflowDefinitionLink workflowDefinitionLink) { 057 getPersistence().clearCache(workflowDefinitionLink); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<WorkflowDefinitionLink> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<WorkflowDefinitionLink> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<WorkflowDefinitionLink> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 098 */ 099 public static WorkflowDefinitionLink remove( 100 WorkflowDefinitionLink workflowDefinitionLink) 101 throws SystemException { 102 return getPersistence().remove(workflowDefinitionLink); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static WorkflowDefinitionLink update( 109 WorkflowDefinitionLink workflowDefinitionLink, boolean merge) 110 throws SystemException { 111 return getPersistence().update(workflowDefinitionLink, merge); 112 } 113 114 /** 115 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 116 */ 117 public static WorkflowDefinitionLink update( 118 WorkflowDefinitionLink workflowDefinitionLink, boolean merge, 119 ServiceContext serviceContext) throws SystemException { 120 return getPersistence() 121 .update(workflowDefinitionLink, merge, serviceContext); 122 } 123 124 /** 125 * Caches the workflow definition link in the entity cache if it is enabled. 126 * 127 * @param workflowDefinitionLink the workflow definition link to cache 128 */ 129 public static void cacheResult( 130 com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) { 131 getPersistence().cacheResult(workflowDefinitionLink); 132 } 133 134 /** 135 * Caches the workflow definition links in the entity cache if it is enabled. 136 * 137 * @param workflowDefinitionLinks the workflow definition links to cache 138 */ 139 public static void cacheResult( 140 java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> workflowDefinitionLinks) { 141 getPersistence().cacheResult(workflowDefinitionLinks); 142 } 143 144 /** 145 * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database. 146 * 147 * @param workflowDefinitionLinkId the primary key for the new workflow definition link 148 * @return the new workflow definition link 149 */ 150 public static com.liferay.portal.model.WorkflowDefinitionLink create( 151 long workflowDefinitionLinkId) { 152 return getPersistence().create(workflowDefinitionLinkId); 153 } 154 155 /** 156 * Removes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners. 157 * 158 * @param workflowDefinitionLinkId the primary key of the workflow definition link to remove 159 * @return the workflow definition link that was removed 160 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public static com.liferay.portal.model.WorkflowDefinitionLink remove( 164 long workflowDefinitionLinkId) 165 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 166 com.liferay.portal.kernel.exception.SystemException { 167 return getPersistence().remove(workflowDefinitionLinkId); 168 } 169 170 public static com.liferay.portal.model.WorkflowDefinitionLink updateImpl( 171 com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink, 172 boolean merge) 173 throws com.liferay.portal.kernel.exception.SystemException { 174 return getPersistence().updateImpl(workflowDefinitionLink, merge); 175 } 176 177 /** 178 * Finds the workflow definition link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowDefinitionLinkException} if it could not be found. 179 * 180 * @param workflowDefinitionLinkId the primary key of the workflow definition link to find 181 * @return the workflow definition link 182 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public static com.liferay.portal.model.WorkflowDefinitionLink findByPrimaryKey( 186 long workflowDefinitionLinkId) 187 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 188 com.liferay.portal.kernel.exception.SystemException { 189 return getPersistence().findByPrimaryKey(workflowDefinitionLinkId); 190 } 191 192 /** 193 * Finds the workflow definition link with the primary key or returns <code>null</code> if it could not be found. 194 * 195 * @param workflowDefinitionLinkId the primary key of the workflow definition link to find 196 * @return the workflow definition link, or <code>null</code> if a workflow definition link with the primary key could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public static com.liferay.portal.model.WorkflowDefinitionLink fetchByPrimaryKey( 200 long workflowDefinitionLinkId) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().fetchByPrimaryKey(workflowDefinitionLinkId); 203 } 204 205 /** 206 * Finds all the workflow definition links where companyId = ?. 207 * 208 * @param companyId the company ID to search with 209 * @return the matching workflow definition links 210 * @throws SystemException if a system exception occurred 211 */ 212 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId( 213 long companyId) 214 throws com.liferay.portal.kernel.exception.SystemException { 215 return getPersistence().findByCompanyId(companyId); 216 } 217 218 /** 219 * Finds a range of all the workflow definition links where companyId = ?. 220 * 221 * <p> 222 * 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. 223 * </p> 224 * 225 * @param companyId the company ID to search with 226 * @param start the lower bound of the range of workflow definition links to return 227 * @param end the upper bound of the range of workflow definition links to return (not inclusive) 228 * @return the range of matching workflow definition links 229 * @throws SystemException if a system exception occurred 230 */ 231 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId( 232 long companyId, int start, int end) 233 throws com.liferay.portal.kernel.exception.SystemException { 234 return getPersistence().findByCompanyId(companyId, start, end); 235 } 236 237 /** 238 * Finds an ordered range of all the workflow definition links where companyId = ?. 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. 242 * </p> 243 * 244 * @param companyId the company ID to search with 245 * @param start the lower bound of the range of workflow definition links to return 246 * @param end the upper bound of the range of workflow definition links to return (not inclusive) 247 * @param orderByComparator the comparator to order the results by 248 * @return the ordered range of matching workflow definition links 249 * @throws SystemException if a system exception occurred 250 */ 251 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId( 252 long companyId, int start, int end, 253 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 254 throws com.liferay.portal.kernel.exception.SystemException { 255 return getPersistence() 256 .findByCompanyId(companyId, start, end, orderByComparator); 257 } 258 259 /** 260 * Finds the first workflow definition link in the ordered set where companyId = ?. 261 * 262 * <p> 263 * 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. 264 * </p> 265 * 266 * @param companyId the company ID to search with 267 * @param orderByComparator the comparator to order the set by 268 * @return the first matching workflow definition link 269 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portal.model.WorkflowDefinitionLink findByCompanyId_First( 273 long companyId, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 276 com.liferay.portal.kernel.exception.SystemException { 277 return getPersistence() 278 .findByCompanyId_First(companyId, orderByComparator); 279 } 280 281 /** 282 * Finds the last workflow definition link in the ordered set where companyId = ?. 283 * 284 * <p> 285 * 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. 286 * </p> 287 * 288 * @param companyId the company ID to search with 289 * @param orderByComparator the comparator to order the set by 290 * @return the last matching workflow definition link 291 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found 292 * @throws SystemException if a system exception occurred 293 */ 294 public static com.liferay.portal.model.WorkflowDefinitionLink findByCompanyId_Last( 295 long companyId, 296 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 297 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 298 com.liferay.portal.kernel.exception.SystemException { 299 return getPersistence() 300 .findByCompanyId_Last(companyId, orderByComparator); 301 } 302 303 /** 304 * Finds the workflow definition links before and after the current workflow definition link in the ordered set where companyId = ?. 305 * 306 * <p> 307 * 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. 308 * </p> 309 * 310 * @param workflowDefinitionLinkId the primary key of the current workflow definition link 311 * @param companyId the company ID to search with 312 * @param orderByComparator the comparator to order the set by 313 * @return the previous, current, and next workflow definition link 314 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found 315 * @throws SystemException if a system exception occurred 316 */ 317 public static com.liferay.portal.model.WorkflowDefinitionLink[] findByCompanyId_PrevAndNext( 318 long workflowDefinitionLinkId, long companyId, 319 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 320 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 321 com.liferay.portal.kernel.exception.SystemException { 322 return getPersistence() 323 .findByCompanyId_PrevAndNext(workflowDefinitionLinkId, 324 companyId, orderByComparator); 325 } 326 327 /** 328 * Finds the workflow definition link where groupId = ? and companyId = ? and classNameId = ? or throws a {@link com.liferay.portal.NoSuchWorkflowDefinitionLinkException} if it could not be found. 329 * 330 * @param groupId the group ID to search with 331 * @param companyId the company ID to search with 332 * @param classNameId the class name ID to search with 333 * @return the matching workflow definition link 334 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found 335 * @throws SystemException if a system exception occurred 336 */ 337 public static com.liferay.portal.model.WorkflowDefinitionLink findByG_C_C( 338 long groupId, long companyId, long classNameId) 339 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 340 com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findByG_C_C(groupId, companyId, classNameId); 342 } 343 344 /** 345 * Finds the workflow definition link where groupId = ? and companyId = ? and classNameId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 346 * 347 * @param groupId the group ID to search with 348 * @param companyId the company ID to search with 349 * @param classNameId the class name ID to search with 350 * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found 351 * @throws SystemException if a system exception occurred 352 */ 353 public static com.liferay.portal.model.WorkflowDefinitionLink fetchByG_C_C( 354 long groupId, long companyId, long classNameId) 355 throws com.liferay.portal.kernel.exception.SystemException { 356 return getPersistence().fetchByG_C_C(groupId, companyId, classNameId); 357 } 358 359 /** 360 * Finds the workflow definition link where groupId = ? and companyId = ? and classNameId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 361 * 362 * @param groupId the group ID to search with 363 * @param companyId the company ID to search with 364 * @param classNameId the class name ID to search with 365 * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found 366 * @throws SystemException if a system exception occurred 367 */ 368 public static com.liferay.portal.model.WorkflowDefinitionLink fetchByG_C_C( 369 long groupId, long companyId, long classNameId, 370 boolean retrieveFromCache) 371 throws com.liferay.portal.kernel.exception.SystemException { 372 return getPersistence() 373 .fetchByG_C_C(groupId, companyId, classNameId, 374 retrieveFromCache); 375 } 376 377 /** 378 * Finds all the workflow definition links where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 379 * 380 * @param companyId the company ID to search with 381 * @param workflowDefinitionName the workflow definition name to search with 382 * @param workflowDefinitionVersion the workflow definition version to search with 383 * @return the matching workflow definition links 384 * @throws SystemException if a system exception occurred 385 */ 386 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W( 387 long companyId, java.lang.String workflowDefinitionName, 388 int workflowDefinitionVersion) 389 throws com.liferay.portal.kernel.exception.SystemException { 390 return getPersistence() 391 .findByC_W_W(companyId, workflowDefinitionName, 392 workflowDefinitionVersion); 393 } 394 395 /** 396 * Finds a range of all the workflow definition links where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 397 * 398 * <p> 399 * 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. 400 * </p> 401 * 402 * @param companyId the company ID to search with 403 * @param workflowDefinitionName the workflow definition name to search with 404 * @param workflowDefinitionVersion the workflow definition version to search with 405 * @param start the lower bound of the range of workflow definition links to return 406 * @param end the upper bound of the range of workflow definition links to return (not inclusive) 407 * @return the range of matching workflow definition links 408 * @throws SystemException if a system exception occurred 409 */ 410 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W( 411 long companyId, java.lang.String workflowDefinitionName, 412 int workflowDefinitionVersion, int start, int end) 413 throws com.liferay.portal.kernel.exception.SystemException { 414 return getPersistence() 415 .findByC_W_W(companyId, workflowDefinitionName, 416 workflowDefinitionVersion, start, end); 417 } 418 419 /** 420 * Finds an ordered range of all the workflow definition links where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 421 * 422 * <p> 423 * 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. 424 * </p> 425 * 426 * @param companyId the company ID to search with 427 * @param workflowDefinitionName the workflow definition name to search with 428 * @param workflowDefinitionVersion the workflow definition version to search with 429 * @param start the lower bound of the range of workflow definition links to return 430 * @param end the upper bound of the range of workflow definition links to return (not inclusive) 431 * @param orderByComparator the comparator to order the results by 432 * @return the ordered range of matching workflow definition links 433 * @throws SystemException if a system exception occurred 434 */ 435 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W( 436 long companyId, java.lang.String workflowDefinitionName, 437 int workflowDefinitionVersion, int start, int end, 438 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 439 throws com.liferay.portal.kernel.exception.SystemException { 440 return getPersistence() 441 .findByC_W_W(companyId, workflowDefinitionName, 442 workflowDefinitionVersion, start, end, orderByComparator); 443 } 444 445 /** 446 * Finds the first workflow definition link in the ordered set where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 447 * 448 * <p> 449 * 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. 450 * </p> 451 * 452 * @param companyId the company ID to search with 453 * @param workflowDefinitionName the workflow definition name to search with 454 * @param workflowDefinitionVersion the workflow definition version to search with 455 * @param orderByComparator the comparator to order the set by 456 * @return the first matching workflow definition link 457 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found 458 * @throws SystemException if a system exception occurred 459 */ 460 public static com.liferay.portal.model.WorkflowDefinitionLink findByC_W_W_First( 461 long companyId, java.lang.String workflowDefinitionName, 462 int workflowDefinitionVersion, 463 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 464 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 465 com.liferay.portal.kernel.exception.SystemException { 466 return getPersistence() 467 .findByC_W_W_First(companyId, workflowDefinitionName, 468 workflowDefinitionVersion, orderByComparator); 469 } 470 471 /** 472 * Finds the last workflow definition link in the ordered set where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 473 * 474 * <p> 475 * 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. 476 * </p> 477 * 478 * @param companyId the company ID to search with 479 * @param workflowDefinitionName the workflow definition name to search with 480 * @param workflowDefinitionVersion the workflow definition version to search with 481 * @param orderByComparator the comparator to order the set by 482 * @return the last matching workflow definition link 483 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portal.model.WorkflowDefinitionLink findByC_W_W_Last( 487 long companyId, java.lang.String workflowDefinitionName, 488 int workflowDefinitionVersion, 489 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 490 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 491 com.liferay.portal.kernel.exception.SystemException { 492 return getPersistence() 493 .findByC_W_W_Last(companyId, workflowDefinitionName, 494 workflowDefinitionVersion, orderByComparator); 495 } 496 497 /** 498 * Finds the workflow definition links before and after the current workflow definition link in the ordered set where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 499 * 500 * <p> 501 * 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. 502 * </p> 503 * 504 * @param workflowDefinitionLinkId the primary key of the current workflow definition link 505 * @param companyId the company ID to search with 506 * @param workflowDefinitionName the workflow definition name to search with 507 * @param workflowDefinitionVersion the workflow definition version to search with 508 * @param orderByComparator the comparator to order the set by 509 * @return the previous, current, and next workflow definition link 510 * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found 511 * @throws SystemException if a system exception occurred 512 */ 513 public static com.liferay.portal.model.WorkflowDefinitionLink[] findByC_W_W_PrevAndNext( 514 long workflowDefinitionLinkId, long companyId, 515 java.lang.String workflowDefinitionName, int workflowDefinitionVersion, 516 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 517 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 518 com.liferay.portal.kernel.exception.SystemException { 519 return getPersistence() 520 .findByC_W_W_PrevAndNext(workflowDefinitionLinkId, 521 companyId, workflowDefinitionName, workflowDefinitionVersion, 522 orderByComparator); 523 } 524 525 /** 526 * Finds all the workflow definition links. 527 * 528 * @return the workflow definition links 529 * @throws SystemException if a system exception occurred 530 */ 531 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll() 532 throws com.liferay.portal.kernel.exception.SystemException { 533 return getPersistence().findAll(); 534 } 535 536 /** 537 * Finds a range of all the workflow definition links. 538 * 539 * <p> 540 * 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. 541 * </p> 542 * 543 * @param start the lower bound of the range of workflow definition links to return 544 * @param end the upper bound of the range of workflow definition links to return (not inclusive) 545 * @return the range of workflow definition links 546 * @throws SystemException if a system exception occurred 547 */ 548 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll( 549 int start, int end) 550 throws com.liferay.portal.kernel.exception.SystemException { 551 return getPersistence().findAll(start, end); 552 } 553 554 /** 555 * Finds an ordered range of all the workflow definition links. 556 * 557 * <p> 558 * 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. 559 * </p> 560 * 561 * @param start the lower bound of the range of workflow definition links to return 562 * @param end the upper bound of the range of workflow definition links to return (not inclusive) 563 * @param orderByComparator the comparator to order the results by 564 * @return the ordered range of workflow definition links 565 * @throws SystemException if a system exception occurred 566 */ 567 public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll( 568 int start, int end, 569 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 570 throws com.liferay.portal.kernel.exception.SystemException { 571 return getPersistence().findAll(start, end, orderByComparator); 572 } 573 574 /** 575 * Removes all the workflow definition links where companyId = ? from the database. 576 * 577 * @param companyId the company ID to search with 578 * @throws SystemException if a system exception occurred 579 */ 580 public static void removeByCompanyId(long companyId) 581 throws com.liferay.portal.kernel.exception.SystemException { 582 getPersistence().removeByCompanyId(companyId); 583 } 584 585 /** 586 * Removes the workflow definition link where groupId = ? and companyId = ? and classNameId = ? from the database. 587 * 588 * @param groupId the group ID to search with 589 * @param companyId the company ID to search with 590 * @param classNameId the class name ID to search with 591 * @throws SystemException if a system exception occurred 592 */ 593 public static void removeByG_C_C(long groupId, long companyId, 594 long classNameId) 595 throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException, 596 com.liferay.portal.kernel.exception.SystemException { 597 getPersistence().removeByG_C_C(groupId, companyId, classNameId); 598 } 599 600 /** 601 * Removes all the workflow definition links where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ? from the database. 602 * 603 * @param companyId the company ID to search with 604 * @param workflowDefinitionName the workflow definition name to search with 605 * @param workflowDefinitionVersion the workflow definition version to search with 606 * @throws SystemException if a system exception occurred 607 */ 608 public static void removeByC_W_W(long companyId, 609 java.lang.String workflowDefinitionName, int workflowDefinitionVersion) 610 throws com.liferay.portal.kernel.exception.SystemException { 611 getPersistence() 612 .removeByC_W_W(companyId, workflowDefinitionName, 613 workflowDefinitionVersion); 614 } 615 616 /** 617 * Removes all the workflow definition links from the database. 618 * 619 * @throws SystemException if a system exception occurred 620 */ 621 public static void removeAll() 622 throws com.liferay.portal.kernel.exception.SystemException { 623 getPersistence().removeAll(); 624 } 625 626 /** 627 * Counts all the workflow definition links where companyId = ?. 628 * 629 * @param companyId the company ID to search with 630 * @return the number of matching workflow definition links 631 * @throws SystemException if a system exception occurred 632 */ 633 public static int countByCompanyId(long companyId) 634 throws com.liferay.portal.kernel.exception.SystemException { 635 return getPersistence().countByCompanyId(companyId); 636 } 637 638 /** 639 * Counts all the workflow definition links where groupId = ? and companyId = ? and classNameId = ?. 640 * 641 * @param groupId the group ID to search with 642 * @param companyId the company ID to search with 643 * @param classNameId the class name ID to search with 644 * @return the number of matching workflow definition links 645 * @throws SystemException if a system exception occurred 646 */ 647 public static int countByG_C_C(long groupId, long companyId, 648 long classNameId) 649 throws com.liferay.portal.kernel.exception.SystemException { 650 return getPersistence().countByG_C_C(groupId, companyId, classNameId); 651 } 652 653 /** 654 * Counts all the workflow definition links where companyId = ? and workflowDefinitionName = ? and workflowDefinitionVersion = ?. 655 * 656 * @param companyId the company ID to search with 657 * @param workflowDefinitionName the workflow definition name to search with 658 * @param workflowDefinitionVersion the workflow definition version to search with 659 * @return the number of matching workflow definition links 660 * @throws SystemException if a system exception occurred 661 */ 662 public static int countByC_W_W(long companyId, 663 java.lang.String workflowDefinitionName, int workflowDefinitionVersion) 664 throws com.liferay.portal.kernel.exception.SystemException { 665 return getPersistence() 666 .countByC_W_W(companyId, workflowDefinitionName, 667 workflowDefinitionVersion); 668 } 669 670 /** 671 * Counts all the workflow definition links. 672 * 673 * @return the number of workflow definition links 674 * @throws SystemException if a system exception occurred 675 */ 676 public static int countAll() 677 throws com.liferay.portal.kernel.exception.SystemException { 678 return getPersistence().countAll(); 679 } 680 681 public static WorkflowDefinitionLinkPersistence getPersistence() { 682 if (_persistence == null) { 683 _persistence = (WorkflowDefinitionLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkPersistence.class.getName()); 684 685 ReferenceRegistry.registerReference(WorkflowDefinitionLinkUtil.class, 686 "_persistence"); 687 } 688 689 return _persistence; 690 } 691 692 public void setPersistence(WorkflowDefinitionLinkPersistence persistence) { 693 _persistence = persistence; 694 695 ReferenceRegistry.registerReference(WorkflowDefinitionLinkUtil.class, 696 "_persistence"); 697 } 698 699 private static WorkflowDefinitionLinkPersistence _persistence; 700 }