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