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