001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.Website; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the website service. This utility wraps {@link WebsitePersistenceImpl} 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 WebsitePersistence 036 * @see WebsitePersistenceImpl 037 * @generated 038 */ 039 public class WebsiteUtil { 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(Website website) { 057 getPersistence().clearCache(website); 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<Website> findWithDynamicQuery(DynamicQuery dynamicQuery) 072 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<Website> 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<Website> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 098 */ 099 public static Website update(Website website, boolean merge) 100 throws SystemException { 101 return getPersistence().update(website, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static Website update(Website website, boolean merge, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(website, merge, serviceContext); 110 } 111 112 /** 113 * Caches the website in the entity cache if it is enabled. 114 * 115 * @param website the website 116 */ 117 public static void cacheResult(com.liferay.portal.model.Website website) { 118 getPersistence().cacheResult(website); 119 } 120 121 /** 122 * Caches the websites in the entity cache if it is enabled. 123 * 124 * @param websites the websites 125 */ 126 public static void cacheResult( 127 java.util.List<com.liferay.portal.model.Website> websites) { 128 getPersistence().cacheResult(websites); 129 } 130 131 /** 132 * Creates a new website with the primary key. Does not add the website to the database. 133 * 134 * @param websiteId the primary key for the new website 135 * @return the new website 136 */ 137 public static com.liferay.portal.model.Website create(long websiteId) { 138 return getPersistence().create(websiteId); 139 } 140 141 /** 142 * Removes the website with the primary key from the database. Also notifies the appropriate model listeners. 143 * 144 * @param websiteId the primary key of the website 145 * @return the website that was removed 146 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 147 * @throws SystemException if a system exception occurred 148 */ 149 public static com.liferay.portal.model.Website remove(long websiteId) 150 throws com.liferay.portal.NoSuchWebsiteException, 151 com.liferay.portal.kernel.exception.SystemException { 152 return getPersistence().remove(websiteId); 153 } 154 155 public static com.liferay.portal.model.Website updateImpl( 156 com.liferay.portal.model.Website website, boolean merge) 157 throws com.liferay.portal.kernel.exception.SystemException { 158 return getPersistence().updateImpl(website, merge); 159 } 160 161 /** 162 * Returns the website with the primary key or throws a {@link com.liferay.portal.NoSuchWebsiteException} if it could not be found. 163 * 164 * @param websiteId the primary key of the website 165 * @return the website 166 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 167 * @throws SystemException if a system exception occurred 168 */ 169 public static com.liferay.portal.model.Website findByPrimaryKey( 170 long websiteId) 171 throws com.liferay.portal.NoSuchWebsiteException, 172 com.liferay.portal.kernel.exception.SystemException { 173 return getPersistence().findByPrimaryKey(websiteId); 174 } 175 176 /** 177 * Returns the website with the primary key or returns <code>null</code> if it could not be found. 178 * 179 * @param websiteId the primary key of the website 180 * @return the website, or <code>null</code> if a website with the primary key could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public static com.liferay.portal.model.Website fetchByPrimaryKey( 184 long websiteId) 185 throws com.liferay.portal.kernel.exception.SystemException { 186 return getPersistence().fetchByPrimaryKey(websiteId); 187 } 188 189 /** 190 * Returns all the websites where companyId = ?. 191 * 192 * @param companyId the company ID 193 * @return the matching websites 194 * @throws SystemException if a system exception occurred 195 */ 196 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId( 197 long companyId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().findByCompanyId(companyId); 200 } 201 202 /** 203 * Returns a range of all the websites where companyId = ?. 204 * 205 * <p> 206 * 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. 207 * </p> 208 * 209 * @param companyId the company ID 210 * @param start the lower bound of the range of websites 211 * @param end the upper bound of the range of websites (not inclusive) 212 * @return the range of matching websites 213 * @throws SystemException if a system exception occurred 214 */ 215 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId( 216 long companyId, int start, int end) 217 throws com.liferay.portal.kernel.exception.SystemException { 218 return getPersistence().findByCompanyId(companyId, start, end); 219 } 220 221 /** 222 * Returns an ordered range of all the websites where companyId = ?. 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 companyId the company ID 229 * @param start the lower bound of the range of websites 230 * @param end the upper bound of the range of websites (not inclusive) 231 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 232 * @return the ordered range of matching websites 233 * @throws SystemException if a system exception occurred 234 */ 235 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId( 236 long companyId, int start, int end, 237 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 238 throws com.liferay.portal.kernel.exception.SystemException { 239 return getPersistence() 240 .findByCompanyId(companyId, start, end, orderByComparator); 241 } 242 243 /** 244 * Returns the first website in the ordered set where companyId = ?. 245 * 246 * <p> 247 * 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. 248 * </p> 249 * 250 * @param companyId the company ID 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the first matching website 253 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public static com.liferay.portal.model.Website findByCompanyId_First( 257 long companyId, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.NoSuchWebsiteException, 260 com.liferay.portal.kernel.exception.SystemException { 261 return getPersistence() 262 .findByCompanyId_First(companyId, orderByComparator); 263 } 264 265 /** 266 * Returns the last website in the ordered set where companyId = ?. 267 * 268 * <p> 269 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 270 * </p> 271 * 272 * @param companyId the company ID 273 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 274 * @return the last matching website 275 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 276 * @throws SystemException if a system exception occurred 277 */ 278 public static com.liferay.portal.model.Website findByCompanyId_Last( 279 long companyId, 280 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 281 throws com.liferay.portal.NoSuchWebsiteException, 282 com.liferay.portal.kernel.exception.SystemException { 283 return getPersistence() 284 .findByCompanyId_Last(companyId, orderByComparator); 285 } 286 287 /** 288 * Returns the websites before and after the current website in the ordered set where companyId = ?. 289 * 290 * <p> 291 * 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. 292 * </p> 293 * 294 * @param websiteId the primary key of the current website 295 * @param companyId the company ID 296 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 297 * @return the previous, current, and next website 298 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 299 * @throws SystemException if a system exception occurred 300 */ 301 public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext( 302 long websiteId, long companyId, 303 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 304 throws com.liferay.portal.NoSuchWebsiteException, 305 com.liferay.portal.kernel.exception.SystemException { 306 return getPersistence() 307 .findByCompanyId_PrevAndNext(websiteId, companyId, 308 orderByComparator); 309 } 310 311 /** 312 * Returns all the websites where userId = ?. 313 * 314 * @param userId the user ID 315 * @return the matching websites 316 * @throws SystemException if a system exception occurred 317 */ 318 public static java.util.List<com.liferay.portal.model.Website> findByUserId( 319 long userId) throws com.liferay.portal.kernel.exception.SystemException { 320 return getPersistence().findByUserId(userId); 321 } 322 323 /** 324 * Returns a range of all the websites where userId = ?. 325 * 326 * <p> 327 * 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. 328 * </p> 329 * 330 * @param userId the user ID 331 * @param start the lower bound of the range of websites 332 * @param end the upper bound of the range of websites (not inclusive) 333 * @return the range of matching websites 334 * @throws SystemException if a system exception occurred 335 */ 336 public static java.util.List<com.liferay.portal.model.Website> findByUserId( 337 long userId, int start, int end) 338 throws com.liferay.portal.kernel.exception.SystemException { 339 return getPersistence().findByUserId(userId, start, end); 340 } 341 342 /** 343 * Returns an ordered range of all the websites where userId = ?. 344 * 345 * <p> 346 * 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. 347 * </p> 348 * 349 * @param userId the user ID 350 * @param start the lower bound of the range of websites 351 * @param end the upper bound of the range of websites (not inclusive) 352 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 353 * @return the ordered range of matching websites 354 * @throws SystemException if a system exception occurred 355 */ 356 public static java.util.List<com.liferay.portal.model.Website> findByUserId( 357 long userId, int start, int end, 358 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence() 361 .findByUserId(userId, start, end, orderByComparator); 362 } 363 364 /** 365 * Returns the first website in the ordered set where userId = ?. 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 userId the user ID 372 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 373 * @return the first matching website 374 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 375 * @throws SystemException if a system exception occurred 376 */ 377 public static com.liferay.portal.model.Website findByUserId_First( 378 long userId, 379 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 380 throws com.liferay.portal.NoSuchWebsiteException, 381 com.liferay.portal.kernel.exception.SystemException { 382 return getPersistence().findByUserId_First(userId, orderByComparator); 383 } 384 385 /** 386 * Returns the last website in the ordered set where userId = ?. 387 * 388 * <p> 389 * 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. 390 * </p> 391 * 392 * @param userId the user ID 393 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 394 * @return the last matching website 395 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 396 * @throws SystemException if a system exception occurred 397 */ 398 public static com.liferay.portal.model.Website findByUserId_Last( 399 long userId, 400 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 401 throws com.liferay.portal.NoSuchWebsiteException, 402 com.liferay.portal.kernel.exception.SystemException { 403 return getPersistence().findByUserId_Last(userId, orderByComparator); 404 } 405 406 /** 407 * Returns the websites before and after the current website in the ordered set where userId = ?. 408 * 409 * <p> 410 * 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. 411 * </p> 412 * 413 * @param websiteId the primary key of the current website 414 * @param userId the user ID 415 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 416 * @return the previous, current, and next website 417 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext( 421 long websiteId, long userId, 422 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 423 throws com.liferay.portal.NoSuchWebsiteException, 424 com.liferay.portal.kernel.exception.SystemException { 425 return getPersistence() 426 .findByUserId_PrevAndNext(websiteId, userId, 427 orderByComparator); 428 } 429 430 /** 431 * Returns all the websites where companyId = ? and classNameId = ?. 432 * 433 * @param companyId the company ID 434 * @param classNameId the class name ID 435 * @return the matching websites 436 * @throws SystemException if a system exception occurred 437 */ 438 public static java.util.List<com.liferay.portal.model.Website> findByC_C( 439 long companyId, long classNameId) 440 throws com.liferay.portal.kernel.exception.SystemException { 441 return getPersistence().findByC_C(companyId, classNameId); 442 } 443 444 /** 445 * Returns a range of all the websites where companyId = ? and classNameId = ?. 446 * 447 * <p> 448 * 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. 449 * </p> 450 * 451 * @param companyId the company ID 452 * @param classNameId the class name ID 453 * @param start the lower bound of the range of websites 454 * @param end the upper bound of the range of websites (not inclusive) 455 * @return the range of matching websites 456 * @throws SystemException if a system exception occurred 457 */ 458 public static java.util.List<com.liferay.portal.model.Website> findByC_C( 459 long companyId, long classNameId, int start, int end) 460 throws com.liferay.portal.kernel.exception.SystemException { 461 return getPersistence().findByC_C(companyId, classNameId, start, end); 462 } 463 464 /** 465 * Returns an ordered range of all the websites where companyId = ? and classNameId = ?. 466 * 467 * <p> 468 * 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. 469 * </p> 470 * 471 * @param companyId the company ID 472 * @param classNameId the class name ID 473 * @param start the lower bound of the range of websites 474 * @param end the upper bound of the range of websites (not inclusive) 475 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 476 * @return the ordered range of matching websites 477 * @throws SystemException if a system exception occurred 478 */ 479 public static java.util.List<com.liferay.portal.model.Website> findByC_C( 480 long companyId, long classNameId, int start, int end, 481 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence() 484 .findByC_C(companyId, classNameId, start, end, 485 orderByComparator); 486 } 487 488 /** 489 * Returns the first website in the ordered set where companyId = ? and classNameId = ?. 490 * 491 * <p> 492 * 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. 493 * </p> 494 * 495 * @param companyId the company ID 496 * @param classNameId the class name ID 497 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 498 * @return the first matching website 499 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 500 * @throws SystemException if a system exception occurred 501 */ 502 public static com.liferay.portal.model.Website findByC_C_First( 503 long companyId, long classNameId, 504 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 505 throws com.liferay.portal.NoSuchWebsiteException, 506 com.liferay.portal.kernel.exception.SystemException { 507 return getPersistence() 508 .findByC_C_First(companyId, classNameId, orderByComparator); 509 } 510 511 /** 512 * Returns the last website in the ordered set where companyId = ? and classNameId = ?. 513 * 514 * <p> 515 * 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. 516 * </p> 517 * 518 * @param companyId the company ID 519 * @param classNameId the class name ID 520 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 521 * @return the last matching website 522 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 523 * @throws SystemException if a system exception occurred 524 */ 525 public static com.liferay.portal.model.Website findByC_C_Last( 526 long companyId, long classNameId, 527 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 528 throws com.liferay.portal.NoSuchWebsiteException, 529 com.liferay.portal.kernel.exception.SystemException { 530 return getPersistence() 531 .findByC_C_Last(companyId, classNameId, orderByComparator); 532 } 533 534 /** 535 * Returns the websites before and after the current website in the ordered set where companyId = ? and classNameId = ?. 536 * 537 * <p> 538 * 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. 539 * </p> 540 * 541 * @param websiteId the primary key of the current website 542 * @param companyId the company ID 543 * @param classNameId the class name ID 544 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 545 * @return the previous, current, and next website 546 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 547 * @throws SystemException if a system exception occurred 548 */ 549 public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext( 550 long websiteId, long companyId, long classNameId, 551 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 552 throws com.liferay.portal.NoSuchWebsiteException, 553 com.liferay.portal.kernel.exception.SystemException { 554 return getPersistence() 555 .findByC_C_PrevAndNext(websiteId, companyId, classNameId, 556 orderByComparator); 557 } 558 559 /** 560 * Returns all the websites where companyId = ? and classNameId = ? and classPK = ?. 561 * 562 * @param companyId the company ID 563 * @param classNameId the class name ID 564 * @param classPK the class p k 565 * @return the matching websites 566 * @throws SystemException if a system exception occurred 567 */ 568 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C( 569 long companyId, long classNameId, long classPK) 570 throws com.liferay.portal.kernel.exception.SystemException { 571 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 572 } 573 574 /** 575 * Returns a range of all the websites where companyId = ? and classNameId = ? and classPK = ?. 576 * 577 * <p> 578 * 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. 579 * </p> 580 * 581 * @param companyId the company ID 582 * @param classNameId the class name ID 583 * @param classPK the class p k 584 * @param start the lower bound of the range of websites 585 * @param end the upper bound of the range of websites (not inclusive) 586 * @return the range of matching websites 587 * @throws SystemException if a system exception occurred 588 */ 589 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C( 590 long companyId, long classNameId, long classPK, int start, int end) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 return getPersistence() 593 .findByC_C_C(companyId, classNameId, classPK, start, end); 594 } 595 596 /** 597 * Returns an ordered range of all the websites where companyId = ? and classNameId = ? and classPK = ?. 598 * 599 * <p> 600 * 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. 601 * </p> 602 * 603 * @param companyId the company ID 604 * @param classNameId the class name ID 605 * @param classPK the class p k 606 * @param start the lower bound of the range of websites 607 * @param end the upper bound of the range of websites (not inclusive) 608 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 609 * @return the ordered range of matching websites 610 * @throws SystemException if a system exception occurred 611 */ 612 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C( 613 long companyId, long classNameId, long classPK, int start, int end, 614 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 615 throws com.liferay.portal.kernel.exception.SystemException { 616 return getPersistence() 617 .findByC_C_C(companyId, classNameId, classPK, start, end, 618 orderByComparator); 619 } 620 621 /** 622 * Returns the first website in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 623 * 624 * <p> 625 * 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. 626 * </p> 627 * 628 * @param companyId the company ID 629 * @param classNameId the class name ID 630 * @param classPK the class p k 631 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 632 * @return the first matching website 633 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 634 * @throws SystemException if a system exception occurred 635 */ 636 public static com.liferay.portal.model.Website findByC_C_C_First( 637 long companyId, long classNameId, long classPK, 638 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 639 throws com.liferay.portal.NoSuchWebsiteException, 640 com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence() 642 .findByC_C_C_First(companyId, classNameId, classPK, 643 orderByComparator); 644 } 645 646 /** 647 * Returns the last website in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 648 * 649 * <p> 650 * 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. 651 * </p> 652 * 653 * @param companyId the company ID 654 * @param classNameId the class name ID 655 * @param classPK the class p k 656 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 657 * @return the last matching website 658 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 659 * @throws SystemException if a system exception occurred 660 */ 661 public static com.liferay.portal.model.Website findByC_C_C_Last( 662 long companyId, long classNameId, long classPK, 663 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 664 throws com.liferay.portal.NoSuchWebsiteException, 665 com.liferay.portal.kernel.exception.SystemException { 666 return getPersistence() 667 .findByC_C_C_Last(companyId, classNameId, classPK, 668 orderByComparator); 669 } 670 671 /** 672 * Returns the websites before and after the current website in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 673 * 674 * <p> 675 * 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. 676 * </p> 677 * 678 * @param websiteId the primary key of the current website 679 * @param companyId the company ID 680 * @param classNameId the class name ID 681 * @param classPK the class p k 682 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 683 * @return the previous, current, and next website 684 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 685 * @throws SystemException if a system exception occurred 686 */ 687 public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext( 688 long websiteId, long companyId, long classNameId, long classPK, 689 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 690 throws com.liferay.portal.NoSuchWebsiteException, 691 com.liferay.portal.kernel.exception.SystemException { 692 return getPersistence() 693 .findByC_C_C_PrevAndNext(websiteId, companyId, classNameId, 694 classPK, orderByComparator); 695 } 696 697 /** 698 * Returns all the websites where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 699 * 700 * @param companyId the company ID 701 * @param classNameId the class name ID 702 * @param classPK the class p k 703 * @param primary the primary 704 * @return the matching websites 705 * @throws SystemException if a system exception occurred 706 */ 707 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P( 708 long companyId, long classNameId, long classPK, boolean primary) 709 throws com.liferay.portal.kernel.exception.SystemException { 710 return getPersistence() 711 .findByC_C_C_P(companyId, classNameId, classPK, primary); 712 } 713 714 /** 715 * Returns a range of all the websites where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 716 * 717 * <p> 718 * 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. 719 * </p> 720 * 721 * @param companyId the company ID 722 * @param classNameId the class name ID 723 * @param classPK the class p k 724 * @param primary the primary 725 * @param start the lower bound of the range of websites 726 * @param end the upper bound of the range of websites (not inclusive) 727 * @return the range of matching websites 728 * @throws SystemException if a system exception occurred 729 */ 730 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P( 731 long companyId, long classNameId, long classPK, boolean primary, 732 int start, int end) 733 throws com.liferay.portal.kernel.exception.SystemException { 734 return getPersistence() 735 .findByC_C_C_P(companyId, classNameId, classPK, primary, 736 start, end); 737 } 738 739 /** 740 * Returns an ordered range of all the websites where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 741 * 742 * <p> 743 * 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. 744 * </p> 745 * 746 * @param companyId the company ID 747 * @param classNameId the class name ID 748 * @param classPK the class p k 749 * @param primary the primary 750 * @param start the lower bound of the range of websites 751 * @param end the upper bound of the range of websites (not inclusive) 752 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 753 * @return the ordered range of matching websites 754 * @throws SystemException if a system exception occurred 755 */ 756 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P( 757 long companyId, long classNameId, long classPK, boolean primary, 758 int start, int end, 759 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 760 throws com.liferay.portal.kernel.exception.SystemException { 761 return getPersistence() 762 .findByC_C_C_P(companyId, classNameId, classPK, primary, 763 start, end, orderByComparator); 764 } 765 766 /** 767 * Returns the first website in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 768 * 769 * <p> 770 * 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. 771 * </p> 772 * 773 * @param companyId the company ID 774 * @param classNameId the class name ID 775 * @param classPK the class p k 776 * @param primary the primary 777 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 778 * @return the first matching website 779 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 780 * @throws SystemException if a system exception occurred 781 */ 782 public static com.liferay.portal.model.Website findByC_C_C_P_First( 783 long companyId, long classNameId, long classPK, boolean primary, 784 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 785 throws com.liferay.portal.NoSuchWebsiteException, 786 com.liferay.portal.kernel.exception.SystemException { 787 return getPersistence() 788 .findByC_C_C_P_First(companyId, classNameId, classPK, 789 primary, orderByComparator); 790 } 791 792 /** 793 * Returns the last website in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 794 * 795 * <p> 796 * 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. 797 * </p> 798 * 799 * @param companyId the company ID 800 * @param classNameId the class name ID 801 * @param classPK the class p k 802 * @param primary the primary 803 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 804 * @return the last matching website 805 * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found 806 * @throws SystemException if a system exception occurred 807 */ 808 public static com.liferay.portal.model.Website findByC_C_C_P_Last( 809 long companyId, long classNameId, long classPK, boolean primary, 810 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 811 throws com.liferay.portal.NoSuchWebsiteException, 812 com.liferay.portal.kernel.exception.SystemException { 813 return getPersistence() 814 .findByC_C_C_P_Last(companyId, classNameId, classPK, 815 primary, orderByComparator); 816 } 817 818 /** 819 * Returns the websites before and after the current website in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 820 * 821 * <p> 822 * 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. 823 * </p> 824 * 825 * @param websiteId the primary key of the current website 826 * @param companyId the company ID 827 * @param classNameId the class name ID 828 * @param classPK the class p k 829 * @param primary the primary 830 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 831 * @return the previous, current, and next website 832 * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found 833 * @throws SystemException if a system exception occurred 834 */ 835 public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext( 836 long websiteId, long companyId, long classNameId, long classPK, 837 boolean primary, 838 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 839 throws com.liferay.portal.NoSuchWebsiteException, 840 com.liferay.portal.kernel.exception.SystemException { 841 return getPersistence() 842 .findByC_C_C_P_PrevAndNext(websiteId, companyId, 843 classNameId, classPK, primary, orderByComparator); 844 } 845 846 /** 847 * Returns all the websites. 848 * 849 * @return the websites 850 * @throws SystemException if a system exception occurred 851 */ 852 public static java.util.List<com.liferay.portal.model.Website> findAll() 853 throws com.liferay.portal.kernel.exception.SystemException { 854 return getPersistence().findAll(); 855 } 856 857 /** 858 * Returns a range of all the websites. 859 * 860 * <p> 861 * 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. 862 * </p> 863 * 864 * @param start the lower bound of the range of websites 865 * @param end the upper bound of the range of websites (not inclusive) 866 * @return the range of websites 867 * @throws SystemException if a system exception occurred 868 */ 869 public static java.util.List<com.liferay.portal.model.Website> findAll( 870 int start, int end) 871 throws com.liferay.portal.kernel.exception.SystemException { 872 return getPersistence().findAll(start, end); 873 } 874 875 /** 876 * Returns an ordered range of all the websites. 877 * 878 * <p> 879 * 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. 880 * </p> 881 * 882 * @param start the lower bound of the range of websites 883 * @param end the upper bound of the range of websites (not inclusive) 884 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 885 * @return the ordered range of websites 886 * @throws SystemException if a system exception occurred 887 */ 888 public static java.util.List<com.liferay.portal.model.Website> findAll( 889 int start, int end, 890 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 891 throws com.liferay.portal.kernel.exception.SystemException { 892 return getPersistence().findAll(start, end, orderByComparator); 893 } 894 895 /** 896 * Removes all the websites where companyId = ? from the database. 897 * 898 * @param companyId the company ID 899 * @throws SystemException if a system exception occurred 900 */ 901 public static void removeByCompanyId(long companyId) 902 throws com.liferay.portal.kernel.exception.SystemException { 903 getPersistence().removeByCompanyId(companyId); 904 } 905 906 /** 907 * Removes all the websites where userId = ? from the database. 908 * 909 * @param userId the user ID 910 * @throws SystemException if a system exception occurred 911 */ 912 public static void removeByUserId(long userId) 913 throws com.liferay.portal.kernel.exception.SystemException { 914 getPersistence().removeByUserId(userId); 915 } 916 917 /** 918 * Removes all the websites where companyId = ? and classNameId = ? from the database. 919 * 920 * @param companyId the company ID 921 * @param classNameId the class name ID 922 * @throws SystemException if a system exception occurred 923 */ 924 public static void removeByC_C(long companyId, long classNameId) 925 throws com.liferay.portal.kernel.exception.SystemException { 926 getPersistence().removeByC_C(companyId, classNameId); 927 } 928 929 /** 930 * Removes all the websites where companyId = ? and classNameId = ? and classPK = ? from the database. 931 * 932 * @param companyId the company ID 933 * @param classNameId the class name ID 934 * @param classPK the class p k 935 * @throws SystemException if a system exception occurred 936 */ 937 public static void removeByC_C_C(long companyId, long classNameId, 938 long classPK) 939 throws com.liferay.portal.kernel.exception.SystemException { 940 getPersistence().removeByC_C_C(companyId, classNameId, classPK); 941 } 942 943 /** 944 * Removes all the websites where companyId = ? and classNameId = ? and classPK = ? and primary = ? from the database. 945 * 946 * @param companyId the company ID 947 * @param classNameId the class name ID 948 * @param classPK the class p k 949 * @param primary the primary 950 * @throws SystemException if a system exception occurred 951 */ 952 public static void removeByC_C_C_P(long companyId, long classNameId, 953 long classPK, boolean primary) 954 throws com.liferay.portal.kernel.exception.SystemException { 955 getPersistence() 956 .removeByC_C_C_P(companyId, classNameId, classPK, primary); 957 } 958 959 /** 960 * Removes all the websites from the database. 961 * 962 * @throws SystemException if a system exception occurred 963 */ 964 public static void removeAll() 965 throws com.liferay.portal.kernel.exception.SystemException { 966 getPersistence().removeAll(); 967 } 968 969 /** 970 * Returns the number of websites where companyId = ?. 971 * 972 * @param companyId the company ID 973 * @return the number of matching websites 974 * @throws SystemException if a system exception occurred 975 */ 976 public static int countByCompanyId(long companyId) 977 throws com.liferay.portal.kernel.exception.SystemException { 978 return getPersistence().countByCompanyId(companyId); 979 } 980 981 /** 982 * Returns the number of websites where userId = ?. 983 * 984 * @param userId the user ID 985 * @return the number of matching websites 986 * @throws SystemException if a system exception occurred 987 */ 988 public static int countByUserId(long userId) 989 throws com.liferay.portal.kernel.exception.SystemException { 990 return getPersistence().countByUserId(userId); 991 } 992 993 /** 994 * Returns the number of websites where companyId = ? and classNameId = ?. 995 * 996 * @param companyId the company ID 997 * @param classNameId the class name ID 998 * @return the number of matching websites 999 * @throws SystemException if a system exception occurred 1000 */ 1001 public static int countByC_C(long companyId, long classNameId) 1002 throws com.liferay.portal.kernel.exception.SystemException { 1003 return getPersistence().countByC_C(companyId, classNameId); 1004 } 1005 1006 /** 1007 * Returns the number of websites where companyId = ? and classNameId = ? and classPK = ?. 1008 * 1009 * @param companyId the company ID 1010 * @param classNameId the class name ID 1011 * @param classPK the class p k 1012 * @return the number of matching websites 1013 * @throws SystemException if a system exception occurred 1014 */ 1015 public static int countByC_C_C(long companyId, long classNameId, 1016 long classPK) 1017 throws com.liferay.portal.kernel.exception.SystemException { 1018 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 1019 } 1020 1021 /** 1022 * Returns the number of websites where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1023 * 1024 * @param companyId the company ID 1025 * @param classNameId the class name ID 1026 * @param classPK the class p k 1027 * @param primary the primary 1028 * @return the number of matching websites 1029 * @throws SystemException if a system exception occurred 1030 */ 1031 public static int countByC_C_C_P(long companyId, long classNameId, 1032 long classPK, boolean primary) 1033 throws com.liferay.portal.kernel.exception.SystemException { 1034 return getPersistence() 1035 .countByC_C_C_P(companyId, classNameId, classPK, primary); 1036 } 1037 1038 /** 1039 * Returns the number of websites. 1040 * 1041 * @return the number of websites 1042 * @throws SystemException if a system exception occurred 1043 */ 1044 public static int countAll() 1045 throws com.liferay.portal.kernel.exception.SystemException { 1046 return getPersistence().countAll(); 1047 } 1048 1049 public static WebsitePersistence getPersistence() { 1050 if (_persistence == null) { 1051 _persistence = (WebsitePersistence)PortalBeanLocatorUtil.locate(WebsitePersistence.class.getName()); 1052 1053 ReferenceRegistry.registerReference(WebsiteUtil.class, 1054 "_persistence"); 1055 } 1056 1057 return _persistence; 1058 } 1059 1060 public void setPersistence(WebsitePersistence persistence) { 1061 _persistence = persistence; 1062 1063 ReferenceRegistry.registerReference(WebsiteUtil.class, "_persistence"); 1064 } 1065 1066 private static WebsitePersistence _persistence; 1067 }