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