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.portlet.wiki.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.service.ServiceContext; 023 024 import com.liferay.portlet.wiki.model.WikiPageResource; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the wiki page resource service. This utility wraps {@link WikiPageResourcePersistenceImpl} 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 WikiPageResourcePersistence 037 * @see WikiPageResourcePersistenceImpl 038 * @generated 039 */ 040 public class WikiPageResourceUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(WikiPageResource wikiPageResource) { 058 getPersistence().clearCache(wikiPageResource); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<WikiPageResource> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 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<WikiPageResource> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<WikiPageResource> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static WikiPageResource update(WikiPageResource wikiPageResource) 101 throws SystemException { 102 return getPersistence().update(wikiPageResource); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static WikiPageResource update(WikiPageResource wikiPageResource, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(wikiPageResource, serviceContext); 111 } 112 113 /** 114 * Caches the wiki page resource in the entity cache if it is enabled. 115 * 116 * @param wikiPageResource the wiki page resource 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) { 120 getPersistence().cacheResult(wikiPageResource); 121 } 122 123 /** 124 * Caches the wiki page resources in the entity cache if it is enabled. 125 * 126 * @param wikiPageResources the wiki page resources 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources) { 130 getPersistence().cacheResult(wikiPageResources); 131 } 132 133 /** 134 * Creates a new wiki page resource with the primary key. Does not add the wiki page resource to the database. 135 * 136 * @param resourcePrimKey the primary key for the new wiki page resource 137 * @return the new wiki page resource 138 */ 139 public static com.liferay.portlet.wiki.model.WikiPageResource create( 140 long resourcePrimKey) { 141 return getPersistence().create(resourcePrimKey); 142 } 143 144 /** 145 * Removes the wiki page resource with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param resourcePrimKey the primary key of the wiki page resource 148 * @return the wiki page resource that was removed 149 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.wiki.model.WikiPageResource remove( 153 long resourcePrimKey) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.wiki.NoSuchPageResourceException { 156 return getPersistence().remove(resourcePrimKey); 157 } 158 159 public static com.liferay.portlet.wiki.model.WikiPageResource updateImpl( 160 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(wikiPageResource); 163 } 164 165 /** 166 * Returns the wiki page resource with the primary key or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found. 167 * 168 * @param resourcePrimKey the primary key of the wiki page resource 169 * @return the wiki page resource 170 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey( 174 long resourcePrimKey) 175 throws com.liferay.portal.kernel.exception.SystemException, 176 com.liferay.portlet.wiki.NoSuchPageResourceException { 177 return getPersistence().findByPrimaryKey(resourcePrimKey); 178 } 179 180 /** 181 * Returns the wiki page resource with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param resourcePrimKey the primary key of the wiki page resource 184 * @return the wiki page resource, or <code>null</code> if a wiki page resource with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey( 188 long resourcePrimKey) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(resourcePrimKey); 191 } 192 193 /** 194 * Returns all the wiki page resources where uuid = ?. 195 * 196 * @param uuid the uuid 197 * @return the matching wiki page resources 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 201 java.lang.String uuid) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByUuid(uuid); 204 } 205 206 /** 207 * Returns a range of all the wiki page resources where uuid = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param uuid the uuid 214 * @param start the lower bound of the range of wiki page resources 215 * @param end the upper bound of the range of wiki page resources (not inclusive) 216 * @return the range of matching wiki page resources 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 220 java.lang.String uuid, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByUuid(uuid, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the wiki page resources where uuid = ?. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param uuid the uuid 233 * @param start the lower bound of the range of wiki page resources 234 * @param end the upper bound of the range of wiki page resources (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching wiki page resources 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 240 java.lang.String uuid, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 244 } 245 246 /** 247 * Returns the first wiki page resource in the ordered set where uuid = ?. 248 * 249 * @param uuid the uuid 250 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 251 * @return the first matching wiki page resource 252 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 253 * @throws SystemException if a system exception occurred 254 */ 255 public static com.liferay.portlet.wiki.model.WikiPageResource findByUuid_First( 256 java.lang.String uuid, 257 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 258 throws com.liferay.portal.kernel.exception.SystemException, 259 com.liferay.portlet.wiki.NoSuchPageResourceException { 260 return getPersistence().findByUuid_First(uuid, orderByComparator); 261 } 262 263 /** 264 * Returns the first wiki page resource in the ordered set where uuid = ?. 265 * 266 * @param uuid the uuid 267 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 268 * @return the first matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 269 * @throws SystemException if a system exception occurred 270 */ 271 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByUuid_First( 272 java.lang.String uuid, 273 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 274 throws com.liferay.portal.kernel.exception.SystemException { 275 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 276 } 277 278 /** 279 * Returns the last wiki page resource in the ordered set where uuid = ?. 280 * 281 * @param uuid the uuid 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the last matching wiki page resource 284 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portlet.wiki.model.WikiPageResource findByUuid_Last( 288 java.lang.String uuid, 289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 290 throws com.liferay.portal.kernel.exception.SystemException, 291 com.liferay.portlet.wiki.NoSuchPageResourceException { 292 return getPersistence().findByUuid_Last(uuid, orderByComparator); 293 } 294 295 /** 296 * Returns the last wiki page resource in the ordered set where uuid = ?. 297 * 298 * @param uuid the uuid 299 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 300 * @return the last matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByUuid_Last( 304 java.lang.String uuid, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 308 } 309 310 /** 311 * Returns the wiki page resources before and after the current wiki page resource in the ordered set where uuid = ?. 312 * 313 * @param resourcePrimKey the primary key of the current wiki page resource 314 * @param uuid the uuid 315 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 316 * @return the previous, current, and next wiki page resource 317 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 318 * @throws SystemException if a system exception occurred 319 */ 320 public static com.liferay.portlet.wiki.model.WikiPageResource[] findByUuid_PrevAndNext( 321 long resourcePrimKey, java.lang.String uuid, 322 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 323 throws com.liferay.portal.kernel.exception.SystemException, 324 com.liferay.portlet.wiki.NoSuchPageResourceException { 325 return getPersistence() 326 .findByUuid_PrevAndNext(resourcePrimKey, uuid, 327 orderByComparator); 328 } 329 330 /** 331 * Returns the wiki page resource where nodeId = ? and title = ? or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found. 332 * 333 * @param nodeId the node ID 334 * @param title the title 335 * @return the matching wiki page resource 336 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 337 * @throws SystemException if a system exception occurred 338 */ 339 public static com.liferay.portlet.wiki.model.WikiPageResource findByN_T( 340 long nodeId, java.lang.String title) 341 throws com.liferay.portal.kernel.exception.SystemException, 342 com.liferay.portlet.wiki.NoSuchPageResourceException { 343 return getPersistence().findByN_T(nodeId, title); 344 } 345 346 /** 347 * Returns the wiki page resource where nodeId = ? and title = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 348 * 349 * @param nodeId the node ID 350 * @param title the title 351 * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 352 * @throws SystemException if a system exception occurred 353 */ 354 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T( 355 long nodeId, java.lang.String title) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 return getPersistence().fetchByN_T(nodeId, title); 358 } 359 360 /** 361 * Returns the wiki page resource where nodeId = ? and title = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 362 * 363 * @param nodeId the node ID 364 * @param title the title 365 * @param retrieveFromCache whether to use the finder cache 366 * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 367 * @throws SystemException if a system exception occurred 368 */ 369 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T( 370 long nodeId, java.lang.String title, boolean retrieveFromCache) 371 throws com.liferay.portal.kernel.exception.SystemException { 372 return getPersistence().fetchByN_T(nodeId, title, retrieveFromCache); 373 } 374 375 /** 376 * Returns all the wiki page resources. 377 * 378 * @return the wiki page resources 379 * @throws SystemException if a system exception occurred 380 */ 381 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll() 382 throws com.liferay.portal.kernel.exception.SystemException { 383 return getPersistence().findAll(); 384 } 385 386 /** 387 * Returns a range of all the wiki page resources. 388 * 389 * <p> 390 * 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. 391 * </p> 392 * 393 * @param start the lower bound of the range of wiki page resources 394 * @param end the upper bound of the range of wiki page resources (not inclusive) 395 * @return the range of wiki page resources 396 * @throws SystemException if a system exception occurred 397 */ 398 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll( 399 int start, int end) 400 throws com.liferay.portal.kernel.exception.SystemException { 401 return getPersistence().findAll(start, end); 402 } 403 404 /** 405 * Returns an ordered range of all the wiki page resources. 406 * 407 * <p> 408 * 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. 409 * </p> 410 * 411 * @param start the lower bound of the range of wiki page resources 412 * @param end the upper bound of the range of wiki page resources (not inclusive) 413 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 414 * @return the ordered range of wiki page resources 415 * @throws SystemException if a system exception occurred 416 */ 417 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll( 418 int start, int end, 419 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 420 throws com.liferay.portal.kernel.exception.SystemException { 421 return getPersistence().findAll(start, end, orderByComparator); 422 } 423 424 /** 425 * Removes all the wiki page resources where uuid = ? from the database. 426 * 427 * @param uuid the uuid 428 * @throws SystemException if a system exception occurred 429 */ 430 public static void removeByUuid(java.lang.String uuid) 431 throws com.liferay.portal.kernel.exception.SystemException { 432 getPersistence().removeByUuid(uuid); 433 } 434 435 /** 436 * Removes the wiki page resource where nodeId = ? and title = ? from the database. 437 * 438 * @param nodeId the node ID 439 * @param title the title 440 * @return the wiki page resource that was removed 441 * @throws SystemException if a system exception occurred 442 */ 443 public static com.liferay.portlet.wiki.model.WikiPageResource removeByN_T( 444 long nodeId, java.lang.String title) 445 throws com.liferay.portal.kernel.exception.SystemException, 446 com.liferay.portlet.wiki.NoSuchPageResourceException { 447 return getPersistence().removeByN_T(nodeId, title); 448 } 449 450 /** 451 * Removes all the wiki page resources from the database. 452 * 453 * @throws SystemException if a system exception occurred 454 */ 455 public static void removeAll() 456 throws com.liferay.portal.kernel.exception.SystemException { 457 getPersistence().removeAll(); 458 } 459 460 /** 461 * Returns the number of wiki page resources where uuid = ?. 462 * 463 * @param uuid the uuid 464 * @return the number of matching wiki page resources 465 * @throws SystemException if a system exception occurred 466 */ 467 public static int countByUuid(java.lang.String uuid) 468 throws com.liferay.portal.kernel.exception.SystemException { 469 return getPersistence().countByUuid(uuid); 470 } 471 472 /** 473 * Returns the number of wiki page resources where nodeId = ? and title = ?. 474 * 475 * @param nodeId the node ID 476 * @param title the title 477 * @return the number of matching wiki page resources 478 * @throws SystemException if a system exception occurred 479 */ 480 public static int countByN_T(long nodeId, java.lang.String title) 481 throws com.liferay.portal.kernel.exception.SystemException { 482 return getPersistence().countByN_T(nodeId, title); 483 } 484 485 /** 486 * Returns the number of wiki page resources. 487 * 488 * @return the number of wiki page resources 489 * @throws SystemException if a system exception occurred 490 */ 491 public static int countAll() 492 throws com.liferay.portal.kernel.exception.SystemException { 493 return getPersistence().countAll(); 494 } 495 496 public static WikiPageResourcePersistence getPersistence() { 497 if (_persistence == null) { 498 _persistence = (WikiPageResourcePersistence)PortalBeanLocatorUtil.locate(WikiPageResourcePersistence.class.getName()); 499 500 ReferenceRegistry.registerReference(WikiPageResourceUtil.class, 501 "_persistence"); 502 } 503 504 return _persistence; 505 } 506 507 /** 508 * @deprecated 509 */ 510 public void setPersistence(WikiPageResourcePersistence persistence) { 511 } 512 513 private static WikiPageResourcePersistence _persistence; 514 }