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