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