001 /** 002 * Copyright (c) 2000-2013 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 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.WorkflowInstanceLink; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the workflow instance link service. This utility wraps {@link 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. 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 WorkflowInstanceLinkPersistence 036 * @see WorkflowInstanceLinkPersistenceImpl 037 * @generated 038 */ 039 public class WorkflowInstanceLinkUtil { 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(WorkflowInstanceLink workflowInstanceLink) { 057 getPersistence().clearCache(workflowInstanceLink); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public static 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<WorkflowInstanceLink> 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<WorkflowInstanceLink> 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<WorkflowInstanceLink> 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#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static WorkflowInstanceLink update( 100 WorkflowInstanceLink workflowInstanceLink) throws SystemException { 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 throws SystemException { 110 return getPersistence().update(workflowInstanceLink, serviceContext); 111 } 112 113 /** 114 * Returns all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 115 * 116 * @param groupId the group ID 117 * @param companyId the company ID 118 * @param classNameId the class name ID 119 * @param classPK the class p k 120 * @return the matching workflow instance links 121 * @throws SystemException if a system exception occurred 122 */ 123 public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C( 124 long groupId, long companyId, long classNameId, long classPK) 125 throws com.liferay.portal.kernel.exception.SystemException { 126 return getPersistence() 127 .findByG_C_C_C(groupId, companyId, classNameId, classPK); 128 } 129 130 /** 131 * Returns a range of all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 132 * 133 * <p> 134 * 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.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. 135 * </p> 136 * 137 * @param groupId the group ID 138 * @param companyId the company ID 139 * @param classNameId the class name ID 140 * @param classPK the class p k 141 * @param start the lower bound of the range of workflow instance links 142 * @param end the upper bound of the range of workflow instance links (not inclusive) 143 * @return the range of matching workflow instance links 144 * @throws SystemException if a system exception occurred 145 */ 146 public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C( 147 long groupId, long companyId, long classNameId, long classPK, 148 int start, int end) 149 throws com.liferay.portal.kernel.exception.SystemException { 150 return getPersistence() 151 .findByG_C_C_C(groupId, companyId, classNameId, classPK, 152 start, end); 153 } 154 155 /** 156 * Returns an ordered range of all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 157 * 158 * <p> 159 * 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.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. 160 * </p> 161 * 162 * @param groupId the group ID 163 * @param companyId the company ID 164 * @param classNameId the class name ID 165 * @param classPK the class p k 166 * @param start the lower bound of the range of workflow instance links 167 * @param end the upper bound of the range of workflow instance links (not inclusive) 168 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 169 * @return the ordered range of matching workflow instance links 170 * @throws SystemException if a system exception occurred 171 */ 172 public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C( 173 long groupId, long companyId, long classNameId, long classPK, 174 int start, int end, 175 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 176 throws com.liferay.portal.kernel.exception.SystemException { 177 return getPersistence() 178 .findByG_C_C_C(groupId, companyId, classNameId, classPK, 179 start, end, orderByComparator); 180 } 181 182 /** 183 * Returns the first workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 184 * 185 * @param groupId the group ID 186 * @param companyId the company ID 187 * @param classNameId the class name ID 188 * @param classPK the class p k 189 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 190 * @return the first matching workflow instance link 191 * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found 192 * @throws SystemException if a system exception occurred 193 */ 194 public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_First( 195 long groupId, long companyId, long classNameId, long classPK, 196 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 197 throws com.liferay.portal.NoSuchWorkflowInstanceLinkException, 198 com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence() 200 .findByG_C_C_C_First(groupId, companyId, classNameId, 201 classPK, orderByComparator); 202 } 203 204 /** 205 * Returns the first workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 206 * 207 * @param groupId the group ID 208 * @param companyId the company ID 209 * @param classNameId the class name ID 210 * @param classPK the class p k 211 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 212 * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found 213 * @throws SystemException if a system exception occurred 214 */ 215 public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_First( 216 long groupId, long companyId, long classNameId, long classPK, 217 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 218 throws com.liferay.portal.kernel.exception.SystemException { 219 return getPersistence() 220 .fetchByG_C_C_C_First(groupId, companyId, classNameId, 221 classPK, orderByComparator); 222 } 223 224 /** 225 * Returns the last workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 226 * 227 * @param groupId the group ID 228 * @param companyId the company ID 229 * @param classNameId the class name ID 230 * @param classPK the class p k 231 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 232 * @return the last matching workflow instance link 233 * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found 234 * @throws SystemException if a system exception occurred 235 */ 236 public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_Last( 237 long groupId, long companyId, long classNameId, long classPK, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.NoSuchWorkflowInstanceLinkException, 240 com.liferay.portal.kernel.exception.SystemException { 241 return getPersistence() 242 .findByG_C_C_C_Last(groupId, companyId, classNameId, 243 classPK, orderByComparator); 244 } 245 246 /** 247 * Returns the last workflow instance link in the ordered set where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 248 * 249 * @param groupId the group ID 250 * @param companyId the company ID 251 * @param classNameId the class name ID 252 * @param classPK the class p k 253 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 254 * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found 255 * @throws SystemException if a system exception occurred 256 */ 257 public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_Last( 258 long groupId, long companyId, long classNameId, long classPK, 259 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 260 throws com.liferay.portal.kernel.exception.SystemException { 261 return getPersistence() 262 .fetchByG_C_C_C_Last(groupId, companyId, classNameId, 263 classPK, orderByComparator); 264 } 265 266 /** 267 * 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 = ?. 268 * 269 * @param workflowInstanceLinkId the primary key of the current workflow instance link 270 * @param groupId the group ID 271 * @param companyId the company ID 272 * @param classNameId the class name ID 273 * @param classPK the class p k 274 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 275 * @return the previous, current, and next workflow instance link 276 * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found 277 * @throws SystemException if a system exception occurred 278 */ 279 public static com.liferay.portal.model.WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext( 280 long workflowInstanceLinkId, long groupId, long companyId, 281 long classNameId, long classPK, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchWorkflowInstanceLinkException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getPersistence() 286 .findByG_C_C_C_PrevAndNext(workflowInstanceLinkId, groupId, 287 companyId, classNameId, classPK, orderByComparator); 288 } 289 290 /** 291 * Removes all the workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ? from the database. 292 * 293 * @param groupId the group ID 294 * @param companyId the company ID 295 * @param classNameId the class name ID 296 * @param classPK the class p k 297 * @throws SystemException if a system exception occurred 298 */ 299 public static void removeByG_C_C_C(long groupId, long companyId, 300 long classNameId, long classPK) 301 throws com.liferay.portal.kernel.exception.SystemException { 302 getPersistence() 303 .removeByG_C_C_C(groupId, companyId, classNameId, classPK); 304 } 305 306 /** 307 * Returns the number of workflow instance links where groupId = ? and companyId = ? and classNameId = ? and classPK = ?. 308 * 309 * @param groupId the group ID 310 * @param companyId the company ID 311 * @param classNameId the class name ID 312 * @param classPK the class p k 313 * @return the number of matching workflow instance links 314 * @throws SystemException if a system exception occurred 315 */ 316 public static int countByG_C_C_C(long groupId, long companyId, 317 long classNameId, long classPK) 318 throws com.liferay.portal.kernel.exception.SystemException { 319 return getPersistence() 320 .countByG_C_C_C(groupId, companyId, classNameId, classPK); 321 } 322 323 /** 324 * Caches the workflow instance link in the entity cache if it is enabled. 325 * 326 * @param workflowInstanceLink the workflow instance link 327 */ 328 public static void cacheResult( 329 com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) { 330 getPersistence().cacheResult(workflowInstanceLink); 331 } 332 333 /** 334 * Caches the workflow instance links in the entity cache if it is enabled. 335 * 336 * @param workflowInstanceLinks the workflow instance links 337 */ 338 public static void cacheResult( 339 java.util.List<com.liferay.portal.model.WorkflowInstanceLink> workflowInstanceLinks) { 340 getPersistence().cacheResult(workflowInstanceLinks); 341 } 342 343 /** 344 * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database. 345 * 346 * @param workflowInstanceLinkId the primary key for the new workflow instance link 347 * @return the new workflow instance link 348 */ 349 public static com.liferay.portal.model.WorkflowInstanceLink create( 350 long workflowInstanceLinkId) { 351 return getPersistence().create(workflowInstanceLinkId); 352 } 353 354 /** 355 * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners. 356 * 357 * @param workflowInstanceLinkId the primary key of the workflow instance link 358 * @return the workflow instance link that was removed 359 * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found 360 * @throws SystemException if a system exception occurred 361 */ 362 public static com.liferay.portal.model.WorkflowInstanceLink remove( 363 long workflowInstanceLinkId) 364 throws com.liferay.portal.NoSuchWorkflowInstanceLinkException, 365 com.liferay.portal.kernel.exception.SystemException { 366 return getPersistence().remove(workflowInstanceLinkId); 367 } 368 369 public static com.liferay.portal.model.WorkflowInstanceLink updateImpl( 370 com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) 371 throws com.liferay.portal.kernel.exception.SystemException { 372 return getPersistence().updateImpl(workflowInstanceLink); 373 } 374 375 /** 376 * Returns the workflow instance link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowInstanceLinkException} if it could not be found. 377 * 378 * @param workflowInstanceLinkId the primary key of the workflow instance link 379 * @return the workflow instance link 380 * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found 381 * @throws SystemException if a system exception occurred 382 */ 383 public static com.liferay.portal.model.WorkflowInstanceLink findByPrimaryKey( 384 long workflowInstanceLinkId) 385 throws com.liferay.portal.NoSuchWorkflowInstanceLinkException, 386 com.liferay.portal.kernel.exception.SystemException { 387 return getPersistence().findByPrimaryKey(workflowInstanceLinkId); 388 } 389 390 /** 391 * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found. 392 * 393 * @param workflowInstanceLinkId the primary key of the workflow instance link 394 * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found 395 * @throws SystemException if a system exception occurred 396 */ 397 public static com.liferay.portal.model.WorkflowInstanceLink fetchByPrimaryKey( 398 long workflowInstanceLinkId) 399 throws com.liferay.portal.kernel.exception.SystemException { 400 return getPersistence().fetchByPrimaryKey(workflowInstanceLinkId); 401 } 402 403 /** 404 * Returns all the workflow instance links. 405 * 406 * @return the workflow instance links 407 * @throws SystemException if a system exception occurred 408 */ 409 public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll() 410 throws com.liferay.portal.kernel.exception.SystemException { 411 return getPersistence().findAll(); 412 } 413 414 /** 415 * Returns a range of all the workflow instance links. 416 * 417 * <p> 418 * 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.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. 419 * </p> 420 * 421 * @param start the lower bound of the range of workflow instance links 422 * @param end the upper bound of the range of workflow instance links (not inclusive) 423 * @return the range of workflow instance links 424 * @throws SystemException if a system exception occurred 425 */ 426 public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll( 427 int start, int end) 428 throws com.liferay.portal.kernel.exception.SystemException { 429 return getPersistence().findAll(start, end); 430 } 431 432 /** 433 * Returns an ordered range of all the workflow instance links. 434 * 435 * <p> 436 * 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.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. 437 * </p> 438 * 439 * @param start the lower bound of the range of workflow instance links 440 * @param end the upper bound of the range of workflow instance links (not inclusive) 441 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 442 * @return the ordered range of workflow instance links 443 * @throws SystemException if a system exception occurred 444 */ 445 public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll( 446 int start, int end, 447 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 448 throws com.liferay.portal.kernel.exception.SystemException { 449 return getPersistence().findAll(start, end, orderByComparator); 450 } 451 452 /** 453 * Removes all the workflow instance links from the database. 454 * 455 * @throws SystemException if a system exception occurred 456 */ 457 public static void removeAll() 458 throws com.liferay.portal.kernel.exception.SystemException { 459 getPersistence().removeAll(); 460 } 461 462 /** 463 * Returns the number of workflow instance links. 464 * 465 * @return the number of workflow instance links 466 * @throws SystemException if a system exception occurred 467 */ 468 public static int countAll() 469 throws com.liferay.portal.kernel.exception.SystemException { 470 return getPersistence().countAll(); 471 } 472 473 public static WorkflowInstanceLinkPersistence getPersistence() { 474 if (_persistence == null) { 475 _persistence = (WorkflowInstanceLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkPersistence.class.getName()); 476 477 ReferenceRegistry.registerReference(WorkflowInstanceLinkUtil.class, 478 "_persistence"); 479 } 480 481 return _persistence; 482 } 483 484 /** 485 * @deprecated As of 6.2.0 486 */ 487 public void setPersistence(WorkflowInstanceLinkPersistence persistence) { 488 } 489 490 private static WorkflowInstanceLinkPersistence _persistence; 491 }