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 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 static 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 * Returns all the wiki page resources where uuid = ?. 115 * 116 * @param uuid the uuid 117 * @return the matching wiki page resources 118 * @throws SystemException if a system exception occurred 119 */ 120 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 121 java.lang.String uuid) 122 throws com.liferay.portal.kernel.exception.SystemException { 123 return getPersistence().findByUuid(uuid); 124 } 125 126 /** 127 * Returns a range of all the wiki page resources where uuid = ?. 128 * 129 * <p> 130 * 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. 131 * </p> 132 * 133 * @param uuid the uuid 134 * @param start the lower bound of the range of wiki page resources 135 * @param end the upper bound of the range of wiki page resources (not inclusive) 136 * @return the range of matching wiki page resources 137 * @throws SystemException if a system exception occurred 138 */ 139 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 140 java.lang.String uuid, int start, int end) 141 throws com.liferay.portal.kernel.exception.SystemException { 142 return getPersistence().findByUuid(uuid, start, end); 143 } 144 145 /** 146 * Returns an ordered range of all the wiki page resources where uuid = ?. 147 * 148 * <p> 149 * 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. 150 * </p> 151 * 152 * @param uuid the uuid 153 * @param start the lower bound of the range of wiki page resources 154 * @param end the upper bound of the range of wiki page resources (not inclusive) 155 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 156 * @return the ordered range of matching wiki page resources 157 * @throws SystemException if a system exception occurred 158 */ 159 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 160 java.lang.String uuid, int start, int end, 161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 164 } 165 166 /** 167 * Returns the first wiki page resource in the ordered set where uuid = ?. 168 * 169 * @param uuid the uuid 170 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 171 * @return the first matching wiki page resource 172 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portlet.wiki.model.WikiPageResource findByUuid_First( 176 java.lang.String uuid, 177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 178 throws com.liferay.portal.kernel.exception.SystemException, 179 com.liferay.portlet.wiki.NoSuchPageResourceException { 180 return getPersistence().findByUuid_First(uuid, orderByComparator); 181 } 182 183 /** 184 * Returns the first wiki page resource in the ordered set where uuid = ?. 185 * 186 * @param uuid the uuid 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the first matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 189 * @throws SystemException if a system exception occurred 190 */ 191 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByUuid_First( 192 java.lang.String uuid, 193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 194 throws com.liferay.portal.kernel.exception.SystemException { 195 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 196 } 197 198 /** 199 * Returns the last wiki page resource in the ordered set where uuid = ?. 200 * 201 * @param uuid the uuid 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the last matching wiki page resource 204 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public static com.liferay.portlet.wiki.model.WikiPageResource findByUuid_Last( 208 java.lang.String uuid, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.kernel.exception.SystemException, 211 com.liferay.portlet.wiki.NoSuchPageResourceException { 212 return getPersistence().findByUuid_Last(uuid, orderByComparator); 213 } 214 215 /** 216 * Returns the last wiki page resource in the ordered set where uuid = ?. 217 * 218 * @param uuid the uuid 219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 220 * @return the last matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 221 * @throws SystemException if a system exception occurred 222 */ 223 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByUuid_Last( 224 java.lang.String uuid, 225 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 226 throws com.liferay.portal.kernel.exception.SystemException { 227 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 228 } 229 230 /** 231 * Returns the wiki page resources before and after the current wiki page resource in the ordered set where uuid = ?. 232 * 233 * @param resourcePrimKey the primary key of the current wiki page resource 234 * @param uuid the uuid 235 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 236 * @return the previous, current, and next wiki page resource 237 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 238 * @throws SystemException if a system exception occurred 239 */ 240 public static com.liferay.portlet.wiki.model.WikiPageResource[] findByUuid_PrevAndNext( 241 long resourcePrimKey, java.lang.String uuid, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.kernel.exception.SystemException, 244 com.liferay.portlet.wiki.NoSuchPageResourceException { 245 return getPersistence() 246 .findByUuid_PrevAndNext(resourcePrimKey, uuid, 247 orderByComparator); 248 } 249 250 /** 251 * Removes all the wiki page resources where uuid = ? from the database. 252 * 253 * @param uuid the uuid 254 * @throws SystemException if a system exception occurred 255 */ 256 public static void removeByUuid(java.lang.String uuid) 257 throws com.liferay.portal.kernel.exception.SystemException { 258 getPersistence().removeByUuid(uuid); 259 } 260 261 /** 262 * Returns the number of wiki page resources where uuid = ?. 263 * 264 * @param uuid the uuid 265 * @return the number of matching wiki page resources 266 * @throws SystemException if a system exception occurred 267 */ 268 public static int countByUuid(java.lang.String uuid) 269 throws com.liferay.portal.kernel.exception.SystemException { 270 return getPersistence().countByUuid(uuid); 271 } 272 273 /** 274 * Returns the wiki page resource where nodeId = ? and title = ? or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found. 275 * 276 * @param nodeId the node ID 277 * @param title the title 278 * @return the matching wiki page resource 279 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 280 * @throws SystemException if a system exception occurred 281 */ 282 public static com.liferay.portlet.wiki.model.WikiPageResource findByN_T( 283 long nodeId, java.lang.String title) 284 throws com.liferay.portal.kernel.exception.SystemException, 285 com.liferay.portlet.wiki.NoSuchPageResourceException { 286 return getPersistence().findByN_T(nodeId, title); 287 } 288 289 /** 290 * Returns the wiki page resource where nodeId = ? and title = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 291 * 292 * @param nodeId the node ID 293 * @param title the title 294 * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 295 * @throws SystemException if a system exception occurred 296 */ 297 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T( 298 long nodeId, java.lang.String title) 299 throws com.liferay.portal.kernel.exception.SystemException { 300 return getPersistence().fetchByN_T(nodeId, title); 301 } 302 303 /** 304 * 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. 305 * 306 * @param nodeId the node ID 307 * @param title the title 308 * @param retrieveFromCache whether to use the finder cache 309 * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 310 * @throws SystemException if a system exception occurred 311 */ 312 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T( 313 long nodeId, java.lang.String title, boolean retrieveFromCache) 314 throws com.liferay.portal.kernel.exception.SystemException { 315 return getPersistence().fetchByN_T(nodeId, title, retrieveFromCache); 316 } 317 318 /** 319 * Removes the wiki page resource where nodeId = ? and title = ? from the database. 320 * 321 * @param nodeId the node ID 322 * @param title the title 323 * @return the wiki page resource that was removed 324 * @throws SystemException if a system exception occurred 325 */ 326 public static com.liferay.portlet.wiki.model.WikiPageResource removeByN_T( 327 long nodeId, java.lang.String title) 328 throws com.liferay.portal.kernel.exception.SystemException, 329 com.liferay.portlet.wiki.NoSuchPageResourceException { 330 return getPersistence().removeByN_T(nodeId, title); 331 } 332 333 /** 334 * Returns the number of wiki page resources where nodeId = ? and title = ?. 335 * 336 * @param nodeId the node ID 337 * @param title the title 338 * @return the number of matching wiki page resources 339 * @throws SystemException if a system exception occurred 340 */ 341 public static int countByN_T(long nodeId, java.lang.String title) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().countByN_T(nodeId, title); 344 } 345 346 /** 347 * Caches the wiki page resource in the entity cache if it is enabled. 348 * 349 * @param wikiPageResource the wiki page resource 350 */ 351 public static void cacheResult( 352 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) { 353 getPersistence().cacheResult(wikiPageResource); 354 } 355 356 /** 357 * Caches the wiki page resources in the entity cache if it is enabled. 358 * 359 * @param wikiPageResources the wiki page resources 360 */ 361 public static void cacheResult( 362 java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources) { 363 getPersistence().cacheResult(wikiPageResources); 364 } 365 366 /** 367 * Creates a new wiki page resource with the primary key. Does not add the wiki page resource to the database. 368 * 369 * @param resourcePrimKey the primary key for the new wiki page resource 370 * @return the new wiki page resource 371 */ 372 public static com.liferay.portlet.wiki.model.WikiPageResource create( 373 long resourcePrimKey) { 374 return getPersistence().create(resourcePrimKey); 375 } 376 377 /** 378 * Removes the wiki page resource with the primary key from the database. Also notifies the appropriate model listeners. 379 * 380 * @param resourcePrimKey the primary key of the wiki page resource 381 * @return the wiki page resource that was removed 382 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 383 * @throws SystemException if a system exception occurred 384 */ 385 public static com.liferay.portlet.wiki.model.WikiPageResource remove( 386 long resourcePrimKey) 387 throws com.liferay.portal.kernel.exception.SystemException, 388 com.liferay.portlet.wiki.NoSuchPageResourceException { 389 return getPersistence().remove(resourcePrimKey); 390 } 391 392 public static com.liferay.portlet.wiki.model.WikiPageResource updateImpl( 393 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) 394 throws com.liferay.portal.kernel.exception.SystemException { 395 return getPersistence().updateImpl(wikiPageResource); 396 } 397 398 /** 399 * Returns the wiki page resource with the primary key or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found. 400 * 401 * @param resourcePrimKey the primary key of the wiki page resource 402 * @return the wiki page resource 403 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 404 * @throws SystemException if a system exception occurred 405 */ 406 public static com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey( 407 long resourcePrimKey) 408 throws com.liferay.portal.kernel.exception.SystemException, 409 com.liferay.portlet.wiki.NoSuchPageResourceException { 410 return getPersistence().findByPrimaryKey(resourcePrimKey); 411 } 412 413 /** 414 * Returns the wiki page resource with the primary key or returns <code>null</code> if it could not be found. 415 * 416 * @param resourcePrimKey the primary key of the wiki page resource 417 * @return the wiki page resource, or <code>null</code> if a wiki page resource with the primary key could not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public static com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey( 421 long resourcePrimKey) 422 throws com.liferay.portal.kernel.exception.SystemException { 423 return getPersistence().fetchByPrimaryKey(resourcePrimKey); 424 } 425 426 /** 427 * Returns all the wiki page resources. 428 * 429 * @return the wiki page resources 430 * @throws SystemException if a system exception occurred 431 */ 432 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll() 433 throws com.liferay.portal.kernel.exception.SystemException { 434 return getPersistence().findAll(); 435 } 436 437 /** 438 * Returns a range of all the wiki page resources. 439 * 440 * <p> 441 * 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. 442 * </p> 443 * 444 * @param start the lower bound of the range of wiki page resources 445 * @param end the upper bound of the range of wiki page resources (not inclusive) 446 * @return the range of wiki page resources 447 * @throws SystemException if a system exception occurred 448 */ 449 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll( 450 int start, int end) 451 throws com.liferay.portal.kernel.exception.SystemException { 452 return getPersistence().findAll(start, end); 453 } 454 455 /** 456 * Returns an ordered range of all the wiki page resources. 457 * 458 * <p> 459 * 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. 460 * </p> 461 * 462 * @param start the lower bound of the range of wiki page resources 463 * @param end the upper bound of the range of wiki page resources (not inclusive) 464 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 465 * @return the ordered range of wiki page resources 466 * @throws SystemException if a system exception occurred 467 */ 468 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll( 469 int start, int end, 470 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 471 throws com.liferay.portal.kernel.exception.SystemException { 472 return getPersistence().findAll(start, end, orderByComparator); 473 } 474 475 /** 476 * Removes all the wiki page resources from the database. 477 * 478 * @throws SystemException if a system exception occurred 479 */ 480 public static void removeAll() 481 throws com.liferay.portal.kernel.exception.SystemException { 482 getPersistence().removeAll(); 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 As of 6.2.0 509 */ 510 public void setPersistence(WikiPageResourcePersistence persistence) { 511 } 512 513 private static WikiPageResourcePersistence _persistence; 514 }