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