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.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.model.WorkflowInstanceLink; 024 import com.liferay.portal.service.ServiceContext; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the workflow instance link service. This utility wraps {@link com.liferay.portal.service.persistence.impl.WorkflowInstanceLinkPersistenceImpl} 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see WorkflowInstanceLinkPersistence 037 * @see com.liferay.portal.service.persistence.impl.WorkflowInstanceLinkPersistenceImpl 038 * @generated 039 */ 040 @ProviderType 041 public class WorkflowInstanceLinkUtil { 042 /* 043 * NOTE FOR DEVELOPERS: 044 * 045 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 046 */ 047 048 /** 049 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 050 */ 051 public static void clearCache() { 052 getPersistence().clearCache(); 053 } 054 055 /** 056 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 057 */ 058 public static void clearCache(WorkflowInstanceLink workflowInstanceLink) { 059 getPersistence().clearCache(workflowInstanceLink); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 064 */ 065 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<WorkflowInstanceLink> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<WorkflowInstanceLink> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) { 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<WorkflowInstanceLink> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator<WorkflowInstanceLink> orderByComparator) { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static WorkflowInstanceLink update( 100 WorkflowInstanceLink workflowInstanceLink) { 101 return getPersistence().update(workflowInstanceLink); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static WorkflowInstanceLink update( 108 WorkflowInstanceLink workflowInstanceLink, ServiceContext serviceContext) { 109 return getPersistence().update(workflowInstanceLink, serviceContext); 110 } 111 112 /** 113 * Returns all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 114 * 115 * @param groupId the group ID 116 * @param companyId the company ID 117 * @param classNameId the class name ID 118 * @param classPK the class p k 119 * @return the matching workflow instance links 120 */ 121 public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId, 122 long companyId, long classNameId, long classPK) { 123 return getPersistence() 124 .findByG_C_C_C(groupId, companyId, classNameId, classPK); 125 } 126 127 /** 128 * Returns a range of all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowInstanceLinkModelImpl}. 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 groupId the group ID 135 * @param companyId the company ID 136 * @param classNameId the class name ID 137 * @param classPK the class p k 138 * @param start the lower bound of the range of workflow instance links 139 * @param end the upper bound of the range of workflow instance links (not inclusive) 140 * @return the range of matching workflow instance links 141 */ 142 public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId, 143 long companyId, long classNameId, long classPK, int start, int end) { 144 return getPersistence() 145 .findByG_C_C_C(groupId, companyId, classNameId, classPK, 146 start, end); 147 } 148 149 /** 150 * Returns an ordered range of all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 151 * 152 * <p> 153 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowInstanceLinkModelImpl}. 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. 154 * </p> 155 * 156 * @param groupId the group ID 157 * @param companyId the company ID 158 * @param classNameId the class name ID 159 * @param classPK the class p k 160 * @param start the lower bound of the range of workflow instance links 161 * @param end the upper bound of the range of workflow instance links (not inclusive) 162 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 163 * @return the ordered range of matching workflow instance links 164 */ 165 public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId, 166 long companyId, long classNameId, long classPK, int start, int end, 167 OrderByComparator<WorkflowInstanceLink> orderByComparator) { 168 return getPersistence() 169 .findByG_C_C_C(groupId, companyId, classNameId, classPK, 170 start, end, orderByComparator); 171 } 172 173 /** 174 * Returns an ordered range of all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 175 * 176 * <p> 177 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowInstanceLinkModelImpl}. 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. 178 * </p> 179 * 180 * @param groupId the group ID 181 * @param companyId the company ID 182 * @param classNameId the class name ID 183 * @param classPK the class p k 184 * @param start the lower bound of the range of workflow instance links 185 * @param end the upper bound of the range of workflow instance links (not inclusive) 186 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 187 * @param retrieveFromCache whether to retrieve from the finder cache 188 * @return the ordered range of matching workflow instance links 189 */ 190 public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId, 191 long companyId, long classNameId, long classPK, int start, int end, 192 OrderByComparator<WorkflowInstanceLink> orderByComparator, 193 boolean retrieveFromCache) { 194 return getPersistence() 195 .findByG_C_C_C(groupId, companyId, classNameId, classPK, 196 start, end, orderByComparator, retrieveFromCache); 197 } 198 199 /** 200 * Returns the first workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 201 * 202 * @param groupId the group ID 203 * @param companyId the company ID 204 * @param classNameId the class name ID 205 * @param classPK the class p k 206 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 207 * @return the first matching workflow instance link 208 * @throws NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found 209 */ 210 public static WorkflowInstanceLink findByG_C_C_C_First(long groupId, 211 long companyId, long classNameId, long classPK, 212 OrderByComparator<WorkflowInstanceLink> orderByComparator) 213 throws com.liferay.portal.exception.NoSuchWorkflowInstanceLinkException { 214 return getPersistence() 215 .findByG_C_C_C_First(groupId, companyId, classNameId, 216 classPK, orderByComparator); 217 } 218 219 /** 220 * Returns the first workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 221 * 222 * @param groupId the group ID 223 * @param companyId the company ID 224 * @param classNameId the class name ID 225 * @param classPK the class p k 226 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 227 * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found 228 */ 229 public static WorkflowInstanceLink fetchByG_C_C_C_First(long groupId, 230 long companyId, long classNameId, long classPK, 231 OrderByComparator<WorkflowInstanceLink> orderByComparator) { 232 return getPersistence() 233 .fetchByG_C_C_C_First(groupId, companyId, classNameId, 234 classPK, orderByComparator); 235 } 236 237 /** 238 * Returns the last workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 239 * 240 * @param groupId the group ID 241 * @param companyId the company ID 242 * @param classNameId the class name ID 243 * @param classPK the class p k 244 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 245 * @return the last matching workflow instance link 246 * @throws NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found 247 */ 248 public static WorkflowInstanceLink findByG_C_C_C_Last(long groupId, 249 long companyId, long classNameId, long classPK, 250 OrderByComparator<WorkflowInstanceLink> orderByComparator) 251 throws com.liferay.portal.exception.NoSuchWorkflowInstanceLinkException { 252 return getPersistence() 253 .findByG_C_C_C_Last(groupId, companyId, classNameId, 254 classPK, orderByComparator); 255 } 256 257 /** 258 * Returns the last workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 259 * 260 * @param groupId the group ID 261 * @param companyId the company ID 262 * @param classNameId the class name ID 263 * @param classPK the class p k 264 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 265 * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found 266 */ 267 public static WorkflowInstanceLink fetchByG_C_C_C_Last(long groupId, 268 long companyId, long classNameId, long classPK, 269 OrderByComparator<WorkflowInstanceLink> orderByComparator) { 270 return getPersistence() 271 .fetchByG_C_C_C_Last(groupId, companyId, classNameId, 272 classPK, orderByComparator); 273 } 274 275 /** 276 * Returns the workflow instance links before and after the current workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 277 * 278 * @param workflowInstanceLinkId the primary key of the current workflow instance link 279 * @param groupId the group ID 280 * @param companyId the company ID 281 * @param classNameId the class name ID 282 * @param classPK the class p k 283 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 284 * @return the previous, current, and next workflow instance link 285 * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found 286 */ 287 public static WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext( 288 long workflowInstanceLinkId, long groupId, long companyId, 289 long classNameId, long classPK, 290 OrderByComparator<WorkflowInstanceLink> orderByComparator) 291 throws com.liferay.portal.exception.NoSuchWorkflowInstanceLinkException { 292 return getPersistence() 293 .findByG_C_C_C_PrevAndNext(workflowInstanceLinkId, groupId, 294 companyId, classNameId, classPK, orderByComparator); 295 } 296 297 /** 298 * Removes all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ? from the database. 299 * 300 * @param groupId the group ID 301 * @param companyId the company ID 302 * @param classNameId the class name ID 303 * @param classPK the class p k 304 */ 305 public static void removeByG_C_C_C(long groupId, long companyId, 306 long classNameId, long classPK) { 307 getPersistence() 308 .removeByG_C_C_C(groupId, companyId, classNameId, classPK); 309 } 310 311 /** 312 * Returns the number of workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 313 * 314 * @param groupId the group ID 315 * @param companyId the company ID 316 * @param classNameId the class name ID 317 * @param classPK the class p k 318 * @return the number of matching workflow instance links 319 */ 320 public static int countByG_C_C_C(long groupId, long companyId, 321 long classNameId, long classPK) { 322 return getPersistence() 323 .countByG_C_C_C(groupId, companyId, classNameId, classPK); 324 } 325 326 /** 327 * Caches the workflow instance link in the entity cache if it is enabled. 328 * 329 * @param workflowInstanceLink the workflow instance link 330 */ 331 public static void cacheResult(WorkflowInstanceLink workflowInstanceLink) { 332 getPersistence().cacheResult(workflowInstanceLink); 333 } 334 335 /** 336 * Caches the workflow instance links in the entity cache if it is enabled. 337 * 338 * @param workflowInstanceLinks the workflow instance links 339 */ 340 public static void cacheResult( 341 List<WorkflowInstanceLink> workflowInstanceLinks) { 342 getPersistence().cacheResult(workflowInstanceLinks); 343 } 344 345 /** 346 * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database. 347 * 348 * @param workflowInstanceLinkId the primary key for the new workflow instance link 349 * @return the new workflow instance link 350 */ 351 public static WorkflowInstanceLink create(long workflowInstanceLinkId) { 352 return getPersistence().create(workflowInstanceLinkId); 353 } 354 355 /** 356 * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners. 357 * 358 * @param workflowInstanceLinkId the primary key of the workflow instance link 359 * @return the workflow instance link that was removed 360 * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found 361 */ 362 public static WorkflowInstanceLink remove(long workflowInstanceLinkId) 363 throws com.liferay.portal.exception.NoSuchWorkflowInstanceLinkException { 364 return getPersistence().remove(workflowInstanceLinkId); 365 } 366 367 public static WorkflowInstanceLink updateImpl( 368 WorkflowInstanceLink workflowInstanceLink) { 369 return getPersistence().updateImpl(workflowInstanceLink); 370 } 371 372 /** 373 * Returns the workflow instance link with the primary key or throws a {@link NoSuchWorkflowInstanceLinkException} if it could not be found. 374 * 375 * @param workflowInstanceLinkId the primary key of the workflow instance link 376 * @return the workflow instance link 377 * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found 378 */ 379 public static WorkflowInstanceLink findByPrimaryKey( 380 long workflowInstanceLinkId) 381 throws com.liferay.portal.exception.NoSuchWorkflowInstanceLinkException { 382 return getPersistence().findByPrimaryKey(workflowInstanceLinkId); 383 } 384 385 /** 386 * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found. 387 * 388 * @param workflowInstanceLinkId the primary key of the workflow instance link 389 * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found 390 */ 391 public static WorkflowInstanceLink fetchByPrimaryKey( 392 long workflowInstanceLinkId) { 393 return getPersistence().fetchByPrimaryKey(workflowInstanceLinkId); 394 } 395 396 public static java.util.Map<java.io.Serializable, WorkflowInstanceLink> fetchByPrimaryKeys( 397 java.util.Set<java.io.Serializable> primaryKeys) { 398 return getPersistence().fetchByPrimaryKeys(primaryKeys); 399 } 400 401 /** 402 * Returns all the workflow instance links. 403 * 404 * @return the workflow instance links 405 */ 406 public static List<WorkflowInstanceLink> findAll() { 407 return getPersistence().findAll(); 408 } 409 410 /** 411 * Returns a range of all the workflow instance links. 412 * 413 * <p> 414 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowInstanceLinkModelImpl}. 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. 415 * </p> 416 * 417 * @param start the lower bound of the range of workflow instance links 418 * @param end the upper bound of the range of workflow instance links (not inclusive) 419 * @return the range of workflow instance links 420 */ 421 public static List<WorkflowInstanceLink> findAll(int start, int end) { 422 return getPersistence().findAll(start, end); 423 } 424 425 /** 426 * Returns an ordered range of all the workflow instance links. 427 * 428 * <p> 429 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowInstanceLinkModelImpl}. 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. 430 * </p> 431 * 432 * @param start the lower bound of the range of workflow instance links 433 * @param end the upper bound of the range of workflow instance links (not inclusive) 434 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 435 * @return the ordered range of workflow instance links 436 */ 437 public static List<WorkflowInstanceLink> findAll(int start, int end, 438 OrderByComparator<WorkflowInstanceLink> orderByComparator) { 439 return getPersistence().findAll(start, end, orderByComparator); 440 } 441 442 /** 443 * Returns an ordered range of all the workflow instance links. 444 * 445 * <p> 446 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowInstanceLinkModelImpl}. 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. 447 * </p> 448 * 449 * @param start the lower bound of the range of workflow instance links 450 * @param end the upper bound of the range of workflow instance links (not inclusive) 451 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 452 * @param retrieveFromCache whether to retrieve from the finder cache 453 * @return the ordered range of workflow instance links 454 */ 455 public static List<WorkflowInstanceLink> findAll(int start, int end, 456 OrderByComparator<WorkflowInstanceLink> orderByComparator, 457 boolean retrieveFromCache) { 458 return getPersistence() 459 .findAll(start, end, orderByComparator, retrieveFromCache); 460 } 461 462 /** 463 * Removes all the workflow instance links from the database. 464 */ 465 public static void removeAll() { 466 getPersistence().removeAll(); 467 } 468 469 /** 470 * Returns the number of workflow instance links. 471 * 472 * @return the number of workflow instance links 473 */ 474 public static int countAll() { 475 return getPersistence().countAll(); 476 } 477 478 public static WorkflowInstanceLinkPersistence getPersistence() { 479 if (_persistence == null) { 480 _persistence = (WorkflowInstanceLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkPersistence.class.getName()); 481 482 ReferenceRegistry.registerReference(WorkflowInstanceLinkUtil.class, 483 "_persistence"); 484 } 485 486 return _persistence; 487 } 488 489 private static WorkflowInstanceLinkPersistence _persistence; 490 }